FUZZY CONTROL AND MODELING
IEEE Press Series on Biomedical Engineering The focus of our series is to introduce current and emerging technologies to biomedical and electrical engineering practitioners, researchers, and students. This series seeks to foster interdisciplinary biomedical engineering education to satisfy the needs of the industrial and academic areas. This requires an innovative approach that overcomes the difficulties associated with the traditional textbook and edited collections. Metin Akay, Series Editor Dartmouth College
Advisory Board Thomas Budinger Ingrid Daubechies Andrew Daubenspeck Murray Eden James Greenleaf
Simon Haykin Murat Kunt Paul Lauterbur Larry McIntire Robert Plonsey
Richard Robb Richard Satava Malvin Teich Herbert Voigt Lotfi Zadeh
Editorial Board Eric W. Abel Dan Adam Peter Adlassing Berj Bardakjian Erol Basar Katarzyna Blinowska Bernadette Bouchon-Meunier Tom Brotherton Eugene Bruce Jean-Louis Coatrieux Sergio Cerutti Maurice Cohen John Collier Steve Cowin Jerry Daniels Jaques Duchene Walter Greenleaf Daniel Hammer Dennis Healy
Gabor Herman Helene Hoffman Donna Hudson Yasemin Kahya Michael Khoo Yongmin Kim Andrew Laine Rosa Lancini Swamy Laxminarayan Richard Leahy Zhi-Pei Liang Jennifer Linderman Richard Magin Jaakko Malmivuo Jorge Monzon Michael Neuman Banu Onaral Keith Paulsen Peter Richardson
Kris Ropella Joseph Rosen Christian Roux Janet Rutledge Wim L. C. Rutten Alan Sahakian Paul S. Schenker G. W. Schmid-Schonbein Ernest Stokely Ahmed Tewfik Nitish Thakor Michael Unser Eugene Veklerov Al Wald Bruce Wheeler Mark Wiederhold William Williams Andy Yagle Yuan-Ting Zhang
Books in the IEEE Press Series on Biomedical Engineering Akay, M., Time Frequency and Wavelets in Biomedical Signal Processing Hudson, D. L. and M. E. Cohen, Neural Networks and Artificial Intelligence for Biomedical Engineering Khoo, M. C. K., Physiological Control Systems: Analysis, Simulation, and Estimation Liang, z-~ and P C. Lauterbur, Principles of Magnetic Resonance Imaging: A Signal Processing Perspective Akay, M., Nonlinear Biomedical Signal Processing: Volume I Fuzzy Logic, Neural Networks, and New Algorithms Akay, M., Nonlinear Biomedical Signal Processing: Volume II Dynamic Analysis and Modeling Ying, H., Fuzzy Control and Modeling: Analytical Foundations and Applications
FUZZY CONTROL AND MODELING Analytical Foundations and Applications
Hao Ying Department ofPhysiology and Biophysics Biomedical Engineering Center The University of Texas Medical Branch, Galveston
IEEE Engineering in Medicine and Biology Society, Sponsor
A. T
IEEE Press Series on Biomedical Engineering Metin Akay, Series Editor
IEEE PRESS
The Institute of Electrical and Electronics Engineers, Inc., New York
This book and other books may be purchased at a discount from the publisher when ordered in bulk quantities. Contact: IEEE Press Marketing Attn: Special Sales 445 Hoes Lane ~O. Box 1331 Piscataway, NJ 08855-1331 Fax: +1 732 981 9334 For more information about IEEE Press products, visit the IEEE Online Catalog & Store: http://www.ieee.org/org/ieeestore.
© 2000 by the Institute of Electrical and Electronics Engineers, Inc., 3 Park Avenue, 17th Floor, New York, NY 10016-5997. All rights reserved. No part of this book may be reproduced in any form, nor may it be stored in a retrieval system or transmitted in any form, without written permission from the publisher. Printed in the United States of America. 10
9
8
7
6
5
4
3
2
ISBN 0-7803-3497-3 IEEE Order No. PC5729
Library of Congress Cataloging-in-Publication Data Ying, Hao, 1958Fuzzy control and modeling : analytical foundations and applications / Hao Ying. p. em, - - (IEEE Press series on biomedical engineering) Includes bibliographical references and index. ISBN 0-7803-3497-3 1. Automatic control. 2. Fuzzy systems. 3. Mathematical models. I. Title. II. Series. TJ211.Y562000 629.8- -dc21 00-022760
To my parents and my family
IEEE Press 445 Hoes Lane, ~O. Box 1331 Piscataway, NJ 08855-1331
IEEE Press Editorial Board Robert 1. Herrick, Editor in Chief M. Akay 1. B. Anderson ~
M. Anderson
1. E. Brewer
M. Eden M. E. El-Hawary R. F. Hoyt S. V. Kartalopoulos
M. S. Newman . M. Padgett W. D. Reeve G. Zobrist
D. Kirk
Kenneth Moore, Director ofIEEE Press Catherine Faduska, Senior Acquisitions Editor Linda C. Matarazzo, Associate Acquisitions Editor Surendra Bhimani, Production Editor IEEE Engineering in Medicine and Biology Society, Sponsor EMB-S Liaison to IEEE Press, Metin Akay Cover design: William T. Donnelly, WT Design
Technical Reviewers Anna Bianchi, Polytechnic ofMilan Guanrong Chen, University ofHouston Oscar Gonzalez, Old Dominion University, Norfolk, VA Reza Langari, Texas A & M University Frank L. Lewis, University of Texas at Arlington Liang Wang, CASA, Inc., Los Alamos, NM John Yen, Texas A & M University
Books of Related Interest from the IEEE Press ROBUST VISION FOR VISION-BASED CONTROL OF MOTION Edited by Gregory D. Hager and Markus Vincze A volume in the SPIE/IEEE Press Imaging Science & Engineering Series 2000 Hardcover 264 pp IEEE Order No. PC5403 ISBN 0-7803-5378-1 EVOLUTIONARY COMPUTATION: Toward a New Philosophy ofMachine Intelligence Second Edition David B. Fogel 2000 Hardcover 296 pp IEEE Order No. PC5818 ISBN 0-7803-5379-X UNDERSTANDING NEURAL NETWORKS AND FUZZY LOGIC: Basic Concepts and Applications Stamatios V. Kartalopoulos A volume in the IEEE Press Understanding Science & Technology Series 1996 Softcover 232 pp IEEE Order No. PP5591 ISBN 0-7803-1128-0 THE CONTROL HANDBOOK Edited by William S. Levine A CRC Handbook published in cooperation with IEEE Press 1996 Hardcover 1566 pp IEEE Order No. PC5649
ISBN 0-8493-8570-9
Contents
FOREWORD PREFACE
xvii
xix
ACKNOWLEDG MENTS LIST OF FIGURES
xxiii
xxv
CHAPTER 1 Basic Fuzzy Mathematics for Fuzzy Control and Modeling 1 1.1. Introduction 1 1.2. Classical Sets, Fuzzy Sets, and Fuzzy Logic 1 1.2.1. Limitation of Classical Sets 1 1.2.2. Fuzzy Sets 1 1.2.3. Fuzzy Logic Operations 6
1.3. Fuzzification 7 1.4. Fuzzy Rules 8 1.4.1. Mamdani Fuzzy Rules 8 1.4.2. TS Fuzzy Rules 9
1.5. Fuzzy Inference 10 1.6. Defuzzification 11 1.6.1. Generalized Defuzzifier 12 1.6.2. Centroid Defuzzifier, Mean of Maximum Defuzzifier, and Linear Defuzzifier 12
1.7. Summary 13 1.8. Notes and References 13 Exercises 13 vii
Contents
viii
CHAPTER 2
Introduction to Fuzzy Control and Modeling
15
2.1. 2.2. 2.3. 2.4. 2.5.
Introduction 15 Why Fuzzy Control 15 Conventional Modeling 16 Why Fuzzy Modeling 17 Two Types of Fuzzy Control and Modeling: Mamdani Type and TS Type 17 2.6. Typical SISO Mamdani Fuzzy Controllers 17 2.6.1. 2.6.2. 2.6.3. 2.6.4.
Fuzzification 18 Fuzzy Rules 21 Fuzzy Inference 23 Defuzzification 24
2.7. Typical MISO Mamdani Fuzzy Controllers 26 2.8. Typical MISO and SISO TS Fuzzy Controllers 28 2.9. Relationship between Fuzzy Control and Conventional Control 29 2.10. Fuzzy Control vs. Classical Control 30 2.10.1. Advantages of Fuzzy Control 30 2.10.2. Disadvantages of Fuzzy Control 30
2.11. When to Use Fuzzy Control 31 2.11.1. Two Criteria 31 2.11.2. Applicability of Fuzzy Control 32 2.11.3. When to Avoid Fuzzy Control 32
2.12. Analytical Issues in Fuzzy Control 33 2.12.1. Brief Background 33 2.12.2. Significant, Inherent Difficulties for Analytical Study of Fuzzy Control 34 2.12.3. Analytical Issues 34
2.13. Fuzzy Modeling 35 2.13.1. Mamdani Fuzzy Model 35 2.13.2. TS Fuzzy Model 36 2.13.3. Relationship between Fuzzy Model and Fuzzy Controller 36
2.14. Applicability and Limitation of Fuzzy Modeling 36 2.15. Analytical Issues in Fuzzy Modeling 37 2.16. Summary 37 2.17. Notes and References 38 Exercises 38
CHAPTER 3
Mamdani Fuzzy PID Controllers
41
3.1. Introduction 41 3.2. PID Control 42 3.2.1. Position Form and Incremental Form 42
Contents
ix 3.2.2. PI and PD Controllers and Their Relationship 42
3.3. Different Types of Fuzzy Controllers 43 3.3.1. Linear Fuzzy Controller and Nonlinear Fuzzy Controller 43 3.3.2. Fuzzy PID Controller, Fuzzy Controller of PID Type, and Fuzzy Controller of Non-PID Type 43
3.4. Fuzzy PIjPD Controllers as Linear PIjPD Controllers 44 3.4.1. Fuzzy PI Controller Configuration 44 3.4.2. Derivation and Resulting Structures 47
3.5. Fuzzy PIjPD Controllers as Piecewise Linear PI/PD Controllers 47 3.6. Simplest Fuzzy PI Controller as Nonlinear Variable Gain PI Controller 51 3.6.1. Derivation and Resulting Structure 51 3.6.2. Characteristics of Gain Variation 52 3.6.3. Performance Enhancement Due to Gain Variation 53
3.7. Another Simplest Fuzzy PI Controller as Nonlinear Variable Gain PI Controller 55 3.8. Simulation Comparison between Fuzzy and Linear PI Controllers 56 3.8.1. System Models and Comparison Conditions 56 3.8.2. Comparison Results for the Linear Models 57 3.8.3. Comparison Results for the Time-Delay Model and the Nonlinear Model 58 3.8.4. Superior Fuzzy Control Performance at a Price 64
3.9. Simplest Fuzzy PI Controllers Using Different Fuzzy Inference Methods 65 3.9.1. 3.9.2. 3.9.3. 3.9.4.
Configurations of Fuzzy PI Controllers 65 Derivation and Resulting Structures 66 Characteristics of Gain Variation 68 Performance Enhancement by Gain Variation 70 3.9.5. Unreasonable Gain Variation Characteristics Produced by the Bounded Product Inference Method 70 3.9.6. Conclusion on Fuzzy Inference Methods for Control 73
3.10. Simplest TITO Fuzzy PI Controller as TITO Nonlinear Variable Gain PI Controller 73 3.10.1. Fuzzy Controller Configuration 73 3.10.2. Derivation and Resulting Structure 75
3.11. Fuzzy PD Controllers 76 3.12. Fuzzy PID Controllers as Nonlinear PID Controllers with Variable Gains 77
Contents
x
3.13. Summary 78 3.14. Notes and References 78 Exercises 79
CHAPTER 4
Mamdani Fuzzy Controllers of Non-PID Type 4.1. 4.2. 4.3. 4.4.
81
Introduction 81 Multilevel Relay 81 Linear Fuzzy Rules and Nonlinear Fuzzy Rules 83 Fuzzy Controller with Linear Fuzzy Rules as Linear Controller 84 4.4.1. Fuzzy Controller Configuration 84 4.4.2. Structure Derivation and Explicit Results 86
4.5. Typical Fuzzy Controller with Linear Fuzzy Rules 87 4.5.1. Structure Derivation 88 4.5.2. Resulting Structure 89 4.5.3. Relationship with the Simplest Fuzzy PI Controller 92
4.6. Fuzzy Controller Using Linear Fuzzy Rules and Trapezoidal Output Fuzzy Sets 92 4.7. Fuzzy Controller Using Linear Fuzzy Rules and Three Input Variables 94 4.8. Typical TITO Fuzzy Controller with Linear Fuzzy Rules 96 4.8.1. Fuzzy Controller Configuration 96 4.8.2. Derived Structure 97
4.9. Typical Fuzzy Controller with Nonlinear Fuzzy Rules 98 4.9.1. 4.9.2. 4.9.3. 4.9.4. 4.9.5.
Fuzzy Controller Configuration 98 Derivation and Resulting Structure 100 Structure Decomposition and Duality 105 Gain Variation Characteristics 105 Direct Generation of Other Fuzzy Controllers' Structures 106
4.10. Structure Decomposition of General Fuzzy Controllers 109 4.10.1. Configuration of General Fuzzy Controllers 109 4.10.2. Structure Decomposition Theorem 111 4.10.3. Structure of Global Controllers for Linear Fuzzy Rules 112
4.11. Limit Structure of General Fuzzy Controllers 113 4.11.1. Degree of Nonlinearity for Fuzzy Controllers with Linear Fuzzy Rules 113 4.11.2. Limit Structure for Fuzzy Controllers with Linear Rules 114 4.11.3. Limit Structure for General Fuzzy Controllers with Nonlinear Rules 115
xi
Contents
4.12. Structure Decomposition and Limit Structure of General Fuzzy Models 116 4.13. Summary 117 4.14. Notes and References 117 Exercises 117
CHAPTER 5 TS Fuzzy Controllers with Linear Rule Consequent
119
5.1. Introduction 119 5.2. Why Not Use Nonlinear Rule Consequent 119 5.3. General TS Fuzzy Controllers as Nonlinear Variable Gain Controllers of PID Type 120 5.3.1. Configuration of General Fuzzy Controllers 120 5.3.2. Analytical Structure as Nonlinear Controllers of PID Type 120 5.3.3. General Fuzzy Controllers as Linear Controllers 121
5.4. Simple TS Fuzzy PI/PD Controllers as Nonlinear Variable Gain PI/PO Controllers 121 5.4.1. 5.4.2. 5.4.3. 5.4.4.
Configuration of Fuzzy Controller 121 Derivation and Resulting Structure 122 General Characteristics of Variable Gains 124 Three Specific Types of Gain Variation Characteristics 127 5.4.5. Performance Improvement Due to Variable Gains 128 5.4.6. Design of Gain Variation Characteristics 132 5.4.7. Simulated Control of Tissue Temperature in Hyperthermia 133
5.5. Typical TS Fuzzy PI/PO Controllers as Nonlinear Variable Gain PI/PO Controllers 135 5.5.1. 5.5.2. 5.5.3. 5.5.4.
Fuzzy Controller Configuration 135 Derivation and Resulting Structure 137 Analysis of Gain Variation Characteristics 141 Relationship with the Simple TS Fuzzy Controller 143 5.5.5. Simulated Control of Tissue Temperature in Hyperthermia 143
5.6. Simplified TS Fuzzy Rule Scheme 145 5.6.1. Disadvantages ofTS Fuzzy Rule Scheme 145 5.6.2. Simplified Linear TS Fuzzy Rule Scheme 147 5.6.3. Parameter Reduction as Compared with Original TS Rule Scheme 148 5.6.4. Simplified Nonlinear TS Fuzzy Rule Scheme 149 5.6.5. General Analytical Structure of Fuzzy Controllers with Simplified TS Fuzzy Rules 149
Contents
xii
5.7. Simple Fuzzy PI/PD Controllers with Simplified Linear TS Fuzzy Rule Consequent 150 5.7.1. Configuration and Explicit Structure Derivation 150 5.7.2. Gain Variation Characteristics and Their Effect on Enhancing Control Performance 152 5.7.3. Attaining Desired Gain Variation Characteristics 154 5.7.4. Other Simple Fuzzy PI/PD Controllers with Simplified Linear TS Fuzzy Rule Consequent 155
5.8. Fuzzy PID Controller with Simplified Linear TS Rule Scheme 157 5.8.1. Configuration and Explicit Structure Derivation 157 5.8.2. Simulated Control of Mean Arterial Pressure 158
5.9. Comparing TS Fuzzy Control with Mamdani Fuzzy Control 160 5.9.1. Major Features of Mamdani Fuzzy Control 160 5.9.2. Primary Characteristics of TS Fuzzy Control 162 5.9.3. Comparison Conclusions 162
5.10. Summary 163 5.11. Notes and References 163 Exercises 163
CHAPTER 6
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems 165 6.1. Introduction 165 6.2. Global Stability, Local Stability, and BIBO Stability 166 6.2.1. Why Study Local Stability Instead of Global Stability 166
6.3. Local Stability of Mamdani and TS Fuzzy PID Control Systems 167 6.3.1. Local Stability Determined by Lyapunov's Linearization Method 167 6.3.2. System Linearizability Criterion 168
6.4. Local Stability of Mamdani Fuzzy Control Systems of Non-PID Type 169 6.5. Local Stability of General TS Fuzzy Control Systems 170 6.5.1. Theoretical Development 170 6.5.2. Numeric Example 171
6.6. Bmo Stability ofMamdani Fuzzy PI/PD Control Systems 173
Contents
xiii
6.6.1. Small Gain Theorem 173 6.6.2. BffiO Stability Conditions 175 6.6.3. Numeric Example 176
6.7. BIBO Stability of TS Fuzzy PI/PD Control Systems 177 6.7.1. Theoretical Derivation 177 6.7.2. Numeric Example 179
6.8. Design ofMamdani Fuzzy Control Systems 180 6.8.1. 6.8.2. 6.8.3. 6.8.4. 6.8.5. 6.8.6.
Design Principle 180 Justifications for Design Principle 181 Design Procedure 182 Design Example 184 System Tuning Guidelines 186 Examples of Designing More Complicated Fuzzy Control Systems 187
6.9. Design of General TS Fuzzy Control Systems 191 6.9.1. Design Technique 191 6.9.2. Design Examples 192
6.10. General TS Fuzzy Dynamic Systems as Nonlinear ARX Systems 193 6.11. General TS Fuzzy Filters as Nonlinear FIR/IIR Filters 195 6.12. Local Stability of General TS Fuzzy Models 195 6.12.1. Local Stability Conditions and Their Use for Model Quality Check 195 6.12.2. Numeric Example 197
6.13. Design of Perfect Tracking Controllers for General TS Fuzzy Models 199 6.13.1. Controller Design via Feedback Linearization Method 199 6.13.2. Stability of Designed Controllers 200 6.13.3. Numeric Examples 202
6.14. Summary 206 6.15. Notes and References 207 Exercises 207
CHAPTER 7
Mamdani and TS Fuzzy Systems as Functional 209
~pproximators
7.1. Introduction 209 7.2. Fuzzy Controller and Fuzzy Model as Functional Approximators 209 7.3. Polynomial Approximation of Continuous Functions 210 7.4. Sufficient Approximation Conditions for General MISO Mamdani Fuzzy Systems 211
Contents
xiv 7.4.1. Formulation of General Fuzzy Systems 211 7.4.2. Statement of Approximation Problems 211 7.4.3. Uniform Approximation of Polynomials by General Fuzzy Systems 211 7.4.4. General Fuzzy Systems as Universal Approximators 214 7.4.5. Sufficient Approximation Conditions 215 7.4.6. Numeric Examples 217
7.5. Sufficient Approximation Conditions for General MISO TS Fuzzy Systems 219 7.5.1. Sufficient Approximation Conditions 219 7.5.2. Numeric Example 223
7.6. Necessary Approximation Conditions for General SISO Mamdani Fuzzy Systems 224 7.6.1. Problem Statement and Assumptions 224 7.6.2. Configuration of General Fuzzy Systems 225 7.6.3. Lemmas for Establishing Necessary Conditions 226 7.6.4. Necessary Approximation Conditions 227 7.6.5. Strength and Limitation of SISa Mamdani Fuzzy Systems as Functional Approximators 229
7.7. Necessary Approximation Conditions for General MISO Mamdani Fuzzy Systems 230 7.7.1. Configuration of General Fuzzy Systems 230 7.7.2. Lemmas for Developing Necessary Conditions 231 7.7.3. Necessary Approximation Conditions 236 7.7.4. Merits and Pitfalls of MISO Mamdani Fuzzy Systems as Functional Approximators 238 7.7.5. Numeric Example 238
7.8. Necessary Approximation Conditions for Typical TS Fuzzy Systems 240 7.8.1. Configuration of Typical Fuzzy Systems 240 7.8.2. Preparation for Setting Up Necessary Conditions 242 7.8.3. Necessary Approximation Conditions 247 7.8.4. Advantages and Disadvantages of TS Fuzzy Systems as Functional Approximators 248
7.9. Comparison of Minimal Approximator Configuration Between Mamdani and TS Fuzzy Systems 248 7.9.1. IfTS Fuzzy Systems Use Trapezoidal or Triangular Input Fuzzy Sets 248 7.9.2. If TS Fuzzy Systems Use Other Types of Input Fuzzy Sets 250 7.9.3. Comparison Results 251
7.10.
Conclusions on Mamdani and TS Fuzzy Systems as Functional Approximators 251 7.11. Summary 251
Contents
xv
7.12. Notes and References 252 Exercises 252 CHAPTER 8
Real-Time Fuzzy Control of Biomedical Systems
255
8.1. Introduction 255 8.2. Common Complexity of Biomedical Systems Ideal for Fuzzy Control 255 8.3. Mamdani Fuzzy PI Control of Mean Arterial Pressure in Postsurgical Cardiac Patients 256 8.3.1. 8.3.2. 8.3.3. 8.3.4.
Hypertension After Cardiac Surgery 256 Patient Model 257 Design of Fuzzy Control Drug Delivery System 257 Clinical Implementation and Fine-Tuning of Fuzzy Controller 259 8.3.5. Clinical Results 262
8.4. Thermal Treatment of Tissue Lesions 265 8.4.1. Different Kinds of Thermal Therapies 265 8.4.2. Statement of Problems 266 8.4.3. Laser Thermal Therapies 267
8.5. Fuzzy PD Control of Tissue Temperature During Laser Heating 268 8.5.1. Experimental Setup 268 8.5.2. Design of Mamdani Fuzzy PD Controller 269 8.5.3. Derivation of Fuzzy Controller Structure and Explicit Results 271 8.5.4. Temperature Control Performance for Laser Hyperthermia, Coagulation, and Welding 277
8.6. Ultrasound-Guided Fuzzy PD Control of Laser-Tissue Coagulation 280 8.6.1. Development of Noninvasive Ultrasonic Sensor 281 8.6.2. Setup for Ultrasound-Guided Fuzzy Control Experiments 285 8.6.3. Design of the Mamdani Fuzzy PD Controller 286 8.6.4. Control Results of Laser-Tissue Coagulation 287
8.7. Summary 290 8.8. Notes and References 290 BIBLIOGRAPHY
291
INDEX 305 ABOUT THE AUTHOR 309
Foreword
Close to a quarter of a century has passed since fuzzy control made its debut. During this period, the literature on fuzzy control and its applications has grown at a geometrical rate. Taking as an index of growth, the number of papers in the INSPEC database with "fuzzy control" in the title have grown from 38 during 1970-1979 to 214 during 1980-1989 and to 4,356 during 1990-1999, with the data for 1999 not yet complete. And yet fuzzy control has been, and remains, an object of controversy with some--especially within the academic control systems establishment-expressing the view that anything that can be done with fuzzy control can be done equally well with conventional methods. This view is reflected in the fact that almost no papers on fuzzy control have been published in the IEEE Transactions on Automatic Control and this is the backdrop against which the publication of Professor Ying's monumental work Fuzzy Control and Modeling: Analytical Foundations and Applications should be viewed. First, a bit of history. When I wrote my first paper on fuzzy sets in 1965, my expectation was that the theory of fuzzy sets would find its main applications in the realm of what may be called humanistic systems-systems exemplified by economic systems, societal systems, biological systems, linguistics, and psychology. It did not take me long, however, to see that the theory could be applied to mechanistic systems, especially to control. The groundwork for such applications was laid in my papers "Toward a Theory of Fuzzy Systems" (1971); "A Rationale for Fuzzy Control" (1972); "Outline of a New Approach to the Analysis of Complex Systems and Decision Processes" (1973); and "On the Analysis of Large Scale Systems" (1974). These papers, especially my 1973 paper, introduced the basic concepts ofa linguistic variable, fuzzy if-then rule, and fuzzy graph. These concepts have played, and are continuing to play, key roles in almost all applications of fuzzy set theory (or fuzzy logic), including fuzzy control. Although the basic ideas underlying fuzzy control were introduced in these papers, it was the seminal work of Mamdani and Assilian in 1974-1975, which showed that the ideas could be used to construct a working model of a fuzzy control system. This was the beginning of the era of fuzzy control. xvii
xviii
Foreword
What is not fully recognized, however, is that fuzzy control (FC) and conventional crisp control (CC) are, for the most part, complementary rather than competitive. Thus, FC is rulebased whereas CC is differential-equation-based; FC is task-oriented whereas CC is set-pointoriented; and CC is model-based whereas, in the case ofFC, what suffices is a linguistic, rulebased description of the model. Today we see more clearly that fundamentally CC is measurement-based whereas FC is perception-based. In this sense, the role model for FC is the remarkable human capability to perform a wide variety of tasks without any measurements and any computations. A canonical example of such tasks is that of driving a car in city traffic. Classical control provides no methods for automation of tasks of this type. Because it is close to human intuition, fuzzy control is easy to learn and easy to apply. For this reason, there are many applications of fuzzy control in the realm of consumer products. However, as a system becomes more complex, a limited mastery offuzzy rule-based techniques ceases to be adequate. This is when a deep understanding of the theory of fuzzy control becomes a necessity, and it is this necessity that motivates the analytical theory of fuzzy control developed in the work of Professor Ying. Professor Ying's book contains much that is new, important, and detailed. Particularly noteworthy are the chapters that focus on the Mamdani and Takagi-Sugeno types of controllers. In these chapters, a novel approach to stability theory is described and a theory of universal approximation is developed in detail. His linkage of basic theory to real-world applications is very impressive. The last chapter in the book deals with a subject in which Professor Ying is a foremost authority, namely, application of fuzzy control to biomedical systems. Such applications are likely to grow in importance in the years ahead. Professor Ying's work should go a long way toward countering the view that fuzzy control is a collection of applications without a solid theory. The deep theory of fuzzy control developed by Professor Ying is of great importance both as a theory and as a foundation for major advances in applications of fuzzy control in industry, biomedicine, and other fields. As the author of Fuzzy Control and Modeling: Analytical Foundations and Applications, he and the publisher, the IEEE Press, deserve our thanks and congratulations. Lotfi A. Zadeh Berkeley, CA February 27, 2000
Preface
In the past decade, fuzzy system technology - especially fuzzy control which is its most active and victorious component - has gained tremendous acceptance in academia and industry. The worldwide success of countless commercial products and applications has proved the technology to be not only practical and powerful, but also cost effective. Realworld systems are nonlinear; accurate modeling is difficult, costly, and even impossible in most cases. Fuzzy control has the unique ability to successfully accomplish control tasks without knowing the mathematical model of the system, even if it is nonlinear and complex. Applications are currently being developed in an ad hoc manner requiring significant trial-and-error effort, however. The fuzzy systems developed are mostly treated as (magic) black boxes with little analytical understanding and explanation. Thus, there is an urgent need for developing an analytical theory of fuzzy systems to support and accelerate the growth of the technology and eliminate the existing misunderstanding and controversy. The overall objective of this book is to establish comprehensive and unified analytical foundations for fuzzy control and modeling. My approach is first to establish explicit relationships between fuzzy controllers/models and their classical counterparts, and then to utilize the well-developed conventional linear and nonlinear system techniques for analytical analysis and design of fuzzy systems. The results are unified in an analytical framework and presented cohesively.
UNIQUENESS OF THE BOOK This is a unique textbook whose contents are unavailable in any other book. It is the only book at present that exclusively addresses analytical issues of fuzzy control and modeling by rigorously connecting fuzzy controllers/models to classical controllers/models. In comparison with other books, the text is unique in the following aspects: xix
xx
Preface
Completely Analytical Approach From the beginning to the end, every topic in the book is treated analytically. Every fuzzy controller and fuzzy model is studied mathematically using analytical techniques. All the results are analytical and rigorous. Connection to Classical Control and System Theories Every result derived and technique developed is rigorously linked to conventional control and system theories. The connection is clearly presented and explained in the context of the conventional theories. Comprehensive and In-Depth Coverage Major types of fuzzy controllers and models are covered. For every type, typical configurations are systematically examined. The focus is not only on individual fuzzy systems, but also on their general classes. Many analytical issues in the analysis and design of fuzzy systems are extensively studied. Practicality To make the theory practically useful, the system model is assumed to be unknown throughout the book, except for a portion of the stability analysis. My approach is to concentrate on fuzzy controllers, as opposed to fuzzy control systems, and to relate their analytical structures and gain characteristics to their control behavior in such a way that the linkage holds for general systems. This approach is effective as evidenced by applications, including a life-critical real-time control application. Unified and Cohesive Presentation A wide variety of fuzzy controllers are unified in one analytical framework, which also unifies the fuzzy models. The common framework makes the presentation consistent and cohesive. Latest and Long-Term Research Findings Presented in a Textbook Style The book contents are based on my fuzzy system publications since 1987, including 37 peerreviewed journal papers. A significant amount of introductory and background materials have been added. The materials from the papers are logically integrated and organized as well as systematically enhanced. Coupled with the above-mentioned unique features, this book is a self-contained textbook that provides up-to-date information on some of the most active and fruitful frontiers of analytical research and development of fuzzy systems.
INTENDED READERSHIP OF THE BOOK
This self-contained textbook is intended for anyone seeking to understand fuzzy control and modeling in the context of traditional control and modeling. It is also for anyone who is interested in analytical aspects of fuzzy control and modeling and wants to know precisely their connections with the classical counterparts. The book is written for readers who possess a basic knowledge of control and modeling. Fuzzy mathematics is not a prerequisite nor is highly advanced mathematics; undergraduate calculus suffices. To facilitate the reading and understanding, I provide a brief introduction or review for every major classical concept, algorithm, and technique before it is used. Analytical derivation is presented step by step, complete, and easy to follow. Concrete numeric examples and computer simulation are provided to highlight or confirm the analytical work. Graphical representation, including three-dimensional plots, is extensively utilized to illustrate the theoretical development. The book can be used as a textbook for engineering senior and graduate students. Since the book presents state-of-the-art analytical research, a particular topic may be selected for a research project leading to a Ph.D., M.S., or senior graduation thesis. The text can also be
Preface
xxi
used in conjunction with other books as a supplement or reference book to provide analytical insight and in-depth knowledge on the relevant topics. This is also a self-study book ideal for engineering professionals in diverse technical fields and industries, especially those in the fields of control and modeling. The book helps those people take advantage of their expertise in conventional techniques when using fuzzy system technology to solve particular problems. It provides a familiar entrance into the field of fuzzy systems. Given that the analytical theory of fuzzy control and modeling is still in its early development stage, combining one's expertise with the book could be fruitful in generating significant theoretical and practical results. OVERVIEW OF THE BOOK
The book consists of eight chapters that can be divided into four parts. The first part is two chapters long and contains background material for the rest of the book. Chapter 1 provides a minimum but adequate amount of fuzzy mathematics and notations for fuzzy control and modeling. In Chapter 2, both Mamdani and Takagi-Sugeno (TS) fuzzy controllers and models are introduced. They are mathematically formulated to demonstrate that fuzzy controllers and models are actually conventional nonlinear variable gain controllers and models, respectively. The advantages and disadvantages of fuzzy control are pointed out in comparison with conventional control. This is followed by a discussion of when fuzzy control should and should not be used, the major analytical issues, and the special technical difficulties associated with fuzzy control study. Brief background information is also included regarding the early attempts in analytical studies. Finally, fuzzy modeling and its strengths, weaknesses, and usability are discussed. Chapters 3 to 5 form the second part, which focuses on the analytical structures and characteristics of a variety of fuzzy controllers and their precise connections to the conventional controllers. Chapter 3 concentrates on different types of Mamdani fuzzy PID controllers and compares their performances with the linear PID controller in computer simulation using various system models. Chapter 4 deals with more complicated and general classes of Mamdani fuzzy controllers that are of the non-PID type. Structure decomposition property as well as limit structure are revealed for the fuzzy controllers when the number of fuzzy rules becomes infinitely large. Different TS fuzzy controllers with linear rule consequent are investigated in Chapter 5. A new, simplified TS fuzzy rule scheme is introduced to reduce the number of design parameters. The third part, which contains Chapters 6 and 7, provides analytical analysis and design of different types of fuzzy systems. In Chapter 6, local stability as well as bounded-input bounded-output (BIBO) stability conditions are established for both Mamdani and TS fuzzy control systems. System design techniques are developed, including a feedback linearization scheme for controlling general TS fuzzy models to achieve perfect output tracking control. Fuzzy systems are also related to nonlinear ARX models and nonlinear FIR/IIR filters. Chapter 7 examines whether fuzzy systems are universal approximators and establishes the sufficient and necessary approximation conditions. It also compares Mamdani fuzzy approximators with TS fuzzy approximators in terms of minimal system configuration and draws conclusions on the strengths and limitations of the fuzzy approximators as a whole. Chapter 8, the last part, shows three real-world applications that we have developed using the analytical work. In one application, a Mamdani fuzzy PI controller is designed, tuned, and clinically implemented to control mean arterial pressure in real time in postsurgical cardiac patients in the Cardiac Surgical Intensive Care Unit.
xxii
Preface
The bibliography at the end of the book lists the publications cited in the text as well as other relevant publications that are not cited. Significant effort has been made to ensure the inclusion of all the publications relevant to the topics and approaches of the book. Nevertheless, given the vast volume of the literature, it is inevitable that the bibliography is still incomplete. Hao Ying Department ofPhysiology and Biophysics Biomedical Engineering Center The University of Texas Medical Branch, Galveston
Acknowledgments
I extend my appreciation, first to my parents, Meilang Ying and Yiying Zhang. Much of what I have accomplished can be attributed to their nurturing and love and to their years as my role models. Their continued encouragement, advice, and help have been invaluable. I am also very appreciative of my wife Julia Cheng for her understanding and support throughout the writing of this book for more than two years. I am deeply indebted to my little son Andrew Y. Ying, who was not able to get my full attention during this time. I am pleased to be able to devote more time now to my newborn daughter Alice C. Ying. I wish to thank my Ph.D. advisor, Professor Louis C. Sheppard, for his support and encouragement. I am also grateful to my master's advisor, Professor Shihuang Shao, for bringing me into the field of fuzzy control in 1981. My thanks also go to Professor Metin Akay for inviting me to write this book and for giving me thoughtful advice, as well as to the IEEE Press editors, Karen L. Hawkins, Linda Matarazzo, and Surendra Bhimani for their assistance. I am appreciative of my former Ph.D. student Dr. Yongsheng Ding for drawing part of the figures in the first three chapters and compiling part of the bibliography. My appreciation also extends to the anonymous reviewers for their constructive suggestions and useful comments. A significant portion of the results in the book was achieved throught my research projects partially funded by the Whitaker Foundation and the Texas Higher Education Coordinating Board. I am very grateful for their support. Hao Ying Department ofPhysiology and Biophysics Biomedical Engineering Center The University of Texas Medical Branch, Galveston
xxiii
List of Figures
1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9
A possible description of the vague concept "young" by a crisp set. A possible description of the vague concept "young" by a fuzzy set. Two more possible descriptions of the vague concept "young" by fuzzy sets. An example of the membership function of a singleton fuzzy set. An example of a subnormal fuzzy set. A definition of the center of a fuzzy set for four different cases. An example of a convex fuzzy set. An example of a nonconvex fuzzy set. Examples of four commonly used input fuzzy sets in fuzzy control and modeling: (a) trapezoidal, (b) triangular, (c) Gaussian and (d) bell-shaped. Note that they are all continuous, normal, and convex fuzzy sets. 1.10 An example showing how fuzzification works. 1.11 Graphical illustration of the definitions of the four popular fuzzy inference methods whose mathematical definitions are provided in Table 1.1: (a) the Mamdani minimum inference method, (b) the Larsen product inference method, (c) the drastic product inference method, and (d) the bounded product inference method. 1.12 For Mamdani fuzzy controllers and models using singleton fuzzy sets in the rule consequent, the outcome of using the four different inference methods is identical. 2.1 2.2 2.3 2.4 2.5 2.6
Structure of a SISO Mamdani fuzzy control system, which is comprised of a typical Mamdani fuzzy controller and a system under control. Illustration of how input variables are fuzzified by input fuzzy sets. Example of singleton fuzzy sets as output fuzzy sets for Mamdani fuzzy controllers. A graphical description of the fuzzy controller example to show concretely how fuzzification, fuzzy inference, and defuzzification operations work. Structure of a typical MISO Mamdani fuzzy controller. Structure of a typical SISO TS fuzzy control system. xxv
xxvi
List of Figures
3.1
3.2 3.3 3.4
3.5 3.6
3.7
3.8
3.9
3.10
3.11
3.12
Graphical definitions of input and output fuzzy sets used by the linear fuzzy PI controller: (a) two input fuzzy sets Positive and Negative for E(n) and R(n), and (b) three singleton output fuzzy sets, Positive, Zero and Negative. Illustration of how merely four fuzzy rules can cover all possible situations. Division of the E(n) - R(n) input space into 12 regions for applying the Zadeh fuzzy AND operation in the four fuzzy rules. (a) Three-dimensional plot of L\u(n) of the piecewise linear fuzzy PI controller with respect to e(n) and r(n) whose ranges are [-2L,2L], and (b) L\u(n) of the corresponding linear PI controller, L\u(n) = 0.5e(n) + 0.25r(n), for the same ranges of e(n) and r(n). The values of the parameters are: L = H = 1, K; = 1, K; = 0.5, and K Au = 1. Three-dimensional plots of p(e,r) with respect to e(n) and r(n) whose ranges are [-L,L]. The values of the parameters are: L = H = 1, K Au = 1, K; = 1, and (a) K, = 1, (b) K, = 0.6, and (c) K; = 0.2. Three-dimensional plots of L\u(n) of the simplest nonlinear fuzzy PI controller with respect to e(n) and r(n) whose ranges are [-2L,2L]. The values of the parameters used to generate plots (a}-(c) are the same as those used in Figs. 3.5a-e, respectively. Performance comparison between the simplest nonlinear fuzzy PI controller and the corresponding linear PI controller when the linear first-order system model (3.14) is used: (a) output of the two control systems and (b) trajectory of E(n) vs. R(n). For the fuzzy controller, the values of the parameters are: L = H = 1, K; = 0.3, K; = 16, and K Au = 1. The gains of the corresponding PI controller are: Kp(O,O) = 4 and Ki(O,O) = 0.075. Performance comparison between the simplest nonlinear fuzzy PI controller and the corresponding linear PI controller when the linear second-order system (3.15) is used: (a) output of the two control systems and (b) the trajectory of E(n) vs. R(n). For the fuzzy controller, the values of the parameters are: L = H = 1, K; = 0.3, K; = 60, and K Au = 0.075. The gains of the corresponding PI controller are: Kp(O,O) = 1.125 and Ki(O,O) = 0.005625. Performance comparison between the simplest nonlinear fuzzy PI controller and the corresponding linear PI controller when the linear second-order system model (3.15) is used. The values of the parameters of the fuzzy PI controller are the same as those given in Fig. 3.8, but the gains of the linear PI controller are fine tuned to achieve a comparable performance to the fuzzy control performance. For the linear PI controller, Kp(O,O) = 1.33125 and Ki(O,O) = 0.005625. Performance comparison between the simplest nonlinear fuzzy PI controller and the corresponding linear PI controller when the first-order system with a time delay (3.16) is used: (a) output of the two control systems, and (b) trajectory of E(n) vs. R(n). For the fuzzy controller, the values of the parameters are: L = H = 1, K; = 0.3, K; = 50, and K Au = 0.0078. The gains of the corresponding PI controller are: Kp(O, 0) = 0.0975 and Ki(O,O) = 0.000585. Performance comparison between the simplest nonlinear fuzzy PI controller and the corresponding linear PI controller when the first-order system with a time delay (3.16) is used. The values of the parameters of the fuzzy PI controller are the same as those given in Fig. 3.10. For the linear PI controller, (a) Kp(O,O) = 0.002175 and Ki(O,O) = 0.0006525, and (b) Kp(O,O) = 0.0035 and Ki(O,O) = 0.00105. Performance comparison between the simplest nonlinear fuzzy PI controller and the corresponding linear PI controller when the nonlinear system (3.17) is used: (a) output of the two control systems, and (b) trajectory of E(n) vs. R(n). For the fuzzy controller,
List of Figures
3.13
3.14 3.15 3.16
xxvii
the values of the parameters are: L = H = 1, K; = 0.595, K, = 12, and K Au = 45. The gains of the corresponding PI controller are: Kp(O,O) = 135 and K;(O,O) = 6.60375. Performance comparison between the simplest nonlinear fuzzy PI controller and the corresponding linear PI controller when the nonlinear system (3.17) is used. The values of the parameters of the fuzzy PI controller are the same as those given in Fig. 3.12. The gains of the linear PI controller are carefully tuned: (a) Kp(O,O) = 81 and K;(O,O) = 6.69375 and (b) Kp(O,O) = 56.25 and K;(O,O) = 6.69375. Three trapezoidal output fuzzy sets for the simplest nonlinear fuzzy PI controllers using the four different inference methods. Fuzzy inference results: Shadow areas representing the results of applying the four different inference methods to the trapezoidal output fuzzy sets. A three-dimensional plot of pM(e,r) for visualizing its properties analyzed in the text. For the plot, (J = 0, K; = K; = K Au = L = H = 1. It can be seen that starting from the minimum at Kee(n) = and Krr(n) = 0, pM(e,r) strictly monotonically increases with an increase of Kele(n)1 and Krlr(n)1 in all directions. pM(e,r) achieves its maximum at (L,-L) and (-L,L). A three-dimensional plot of pL(e, r) and pDP(e,r) for visualizing their properties analyzed in the text. For the plot, (J = 0, K, = K; = K Au = L = H = 1. It can be seen that starting from the minimum at Kee(n) = and Krr(n) = 0, pM(e,r) strictly monotonically increases with an increase of Kele(n)1 and Krlr(n)1 in all directions. pL(e,r) and pDP(e,r) achieves their maximum when Kele(n)1 = L and Krlr(n)1 = L A three-dimensional plot of pBP (e,r) for visualizing its properties analyzed in the text. For the plot, K; = K; = K Au = L = H = 1. (a) (J = 0. happens at (L,-L) and (-L,L), and takes place at (0.634L, 0.366L), (O.366L, 0.634L), (-0.634L, -0.366L), and (-0.366L, -0.634L) (b) (J = 0.5. happens at (0,0), and takes place at (L, 0.4772L), (O.4772L, L), (-L, -0.4772£), and (-0.4772L, -L). Structure of a simplest nonlinear TITO fuzzy PI controller. Graphical definition of five singleton output fuzzy sets: Positive Large, Positive Small, Approximately Zero, Negative Small, and Negative Large. One combination of fuzzy PI control and fuzzy D control to form fuzzy Pill control. A combination of fuzzy PI control and fuzzy PD control to realize fuzzy PID control.
°
3.17
°
3.18
p:n
3.19 3.20 3.21 3.22 4.1 4.2 4.3 4.4
4.5 4.6 4.7
p:n
P:X P:X
An example of one-dimensional multilevel relay: a one-dimensional three-level relay. An example of two-dimensional multilevel relay: a two-dimensional three-level relay. An example of triangular membership functions that meet the conditions set in (4.3). Here, N = 7 (i.e., J = 3) and S = 5. ICs of E(n) and R(n) must be considered for the Zadeh fuzzy AND operation in the four fuzzy rules rl to r4: (a) four ICs when both E(n) and R(n) are within [-L,L], and (b) 8 ICs when either E(n) or R(n) is outside [-L,L]. 4J + 1 uniformly distributed trapezoidal output fuzzy sets for L\u(n). 2J + 1 uniformly distributed trapezoidal input fuzzy sets. Division of [is, (i + 1)8] x ([jS, (j + 1)8] in E(n) - R(n) input space for applying the Zadeh fuzzy AND operation in the four fuzzy rules rl * to r4*: (a) 16 les when both E(n) and R(n) are within [-L,L], and (b) 12 ICs when either E(n) or R(n) is outside [-L,L].
xxviii
List of Figures
5.1 5.2
5.3 5.4
5.5 5.6 5.7
5.8
5.9
5.10
5.11
5.12
5.13
5.14
5.15 5.16 5.17
Graphical definitions of two input fuzzy sets of the TS fuzzy PI controller, Positive and Negative for both e(n) and r(n). A three-dimensional plot of an example constant proportional-gain shows Kp(e,r) when b i = b2 = b 3 = b4 = 5. The gain surface is a plane parallel to the e(n) - r(n) plane. The values of Kp(e,r) at (0,0) as well as in IC6, IC8, ICI0, and ICI2. A three-dimensional plot showing the first type of gain variation with e(n) and r(n). The parameter values are: b l = 4, b2 = 2, b3 = 3, and b4 = 1. Without loss of generality, L = 1. A three-dimensional plot showing the first type of gain variation with e(n) and r(n). The parameter values are: hi = 4, b2 = 2, b3 = 2, b4 = 1, and L = 1. Because b2 = b3 , the gain surface is symmetric with respect to the line e(n) = r(n). A three-dimensional plot showing the second type of gain variation with e(n) and r(n). The parameter values are: b l = 4, b2 = 1, b3 = 2, b4 = 3, and L = 1. The gain surface is asymmetric. A three-dimensional plot showing the second type of gain variation with e(n) and r(n). The parameter values are: b l = 4, b2 = 1, b3 = 1, b4 = 4, and L = 1. The gain surface is symmetric in terms of both the line e(n) = r( n) and the line e(n) = - r( n). A three-dimensional plot showing the third type of gain variation with e(n) and r(n). The parameter values are: b l = 4, b2 = 3, b3 = 1, b4 = 2, and L = 1. The gain surface is asymmetric. A three-dimensional plot showing the third type of gain variation with e(n) and r(n). The parameter values are: b l = 4, b2 = 1, b3 = 1, b4 = 1, and L = 1. The gain surface is symmetric with respect to the line e(n) = r(n). Simulated performance of the simple TS fuzzy PI control of tissue temperature using the hyperthermia model (5.7). The temperature setpoint is 43°C. Between 0 and 799 seconds, the nominal model parameters (K = 1.1, 't = 250 and 'td = 45) are used. To test the stability and robustness of the fuzzy control system, at time 800 seconds, K and r are suddenly increased by 20% and then abruptly returned to their nominal values at time 1500 seconds Three-dimensional plots of Kp(e,r) and Ki(e,r) of the simple TS fuzzy PI controller controlling the hyperthermia model (5.7): (a) Kp(e,r) with the parameters being b i = 2, b2 = 1.62, b 3 = 1.4, and b4 = 2, and (b) Ki(e,r) with the parameters being al = 0.005, a2 = 0.007, a3 = 0.004, and a4 = 0.006, and L = 1. Illustrative definitions of N = 2J + 1 trapezoidal input fuzzy sets for e(n) and r(n), where 2A and 28 are the upper and lower sides, respectively. Division of input space for analytically deriving structure of the typical TS fuzzy PI controller: (a) 12 ICs for the cases when both e(n) and r(n) are within [-L,L], and (b) eight ICs for the cases when either e(n) or r(n) is outside [-L,L]. Illustrative definitions of three trapezoidal input fuzzy sets used for typical TS fuzzy PI control of tissue temperature in computer simulation, where A = 0.2 and 8 = 1. Simulated fuzzy control performance of tissue temperature using a typical TS fuzzy PI controller and the hyperthermia temperature model (5.7). The temperature setpoint is 43°C. Three-dimensional plots of Kp(~e,~r) and Ki(~e,~r) of the typical TS fuzzy PI controller controlling the hyperthermia temperature model (5.7): (a) Kp(~e,~r), and (b) Ki(~e,~r). The e(n)-r(n) plane is divided into nine ICs for the structure derivation of the simple TS fuzzy PI controller with the simplified linear TS rules.
List of Figures
xxix
5.18 Three-dimensional plot of p(e,r) when k1 = 1, k2 = k3 = 0, k4 = 1, and L = 1. The gain surface is symmetric in terms of the line e(n) = r(n) and the line e(n) = -r(n). 5.19 Three-dimensional plot of p(e,r) when k 1 = 1, k2 = k3 = 0, k4 = 1/3, and L = 1. The gain surface is symmetric in terms of the line e(n) = r(n). 5.20 Three-dimensional plot of p(e,r) when k, = 1, ~ = k3 = 0, k4 = -1, and L = 1. The gain surface is symmetric in terms of the line e(n) = r(n). The plot shows that inappropriate values of '9 can lead to unreasonable and illogical gain variation characteristics and hence an unusable controller. Specifically in this example, P= 0, resulting in zero control gain at the equilibrium point. 5.21 Three-dimensional plot of p(e,r) when k 1 = 1, ~ = 1/8, k3 = 1/2, k4 = 1, and L = 1. The gain surface is symmetric in terms of the line e(n) = r(n). 5.22 Three-dimensional plot of pee, r) when k 1 = 1, k2 = 1/8, k3 = 1/4, k4 = 1/2, and L = 1. The gain surface is asymmetric. 5.23 Comparisons of simulated control performance between the fuzzy Pill controller with the simplified linear TS rules and the corresponding linear Pill controller that uses the steady-state gains of the fuzzy controller (i.e., P(O,O,O)· a., i = 1,2,3). The patient model is given in (8.1). The parameter values are: k 1 = 1, k2 = 0.5, k3 = k4 = k5 = k6 = 0, k7 = 0.1, kg = 0.85, L = 40, al = -0.024, a2 = -1.6, and a3 = -25. The sampling period is 10 seconds. Once set, all the parameters are fixed for both controllers in all the comparisons: (a) the typical patients (K = -0.72), (b) the insensitive patients (K = -0.18), and (c) the oversensitive patients (K = -2.88). 6.1 6.2
Membership functions used by the TS fuzzy controller in Example 6.1. Block diagram of a general nonlinear control system for explaining the Small Gain Theorem and establishing BIBO stability for the Mamdani fuzzy control systems. 6.3 Performances of the PI control system and designed fuzzy control systems with 49 and 9 linear rules. 6.4 Performances of the PI control system and the designed fuzzy control system: (a) initial performances and (b) final, tuned performances. 6.5 Initial and final performances of the PI control system and the designed fuzzy control system for mean arterial pressure control. 6.6 Illustrative definitions of the six fuzzy sets used in Example 6.9. The mathematical definitions are given in (6.25) and (6.26), with the parameter values being listed in Table 6.4. 6.7 Simulated output of the TS fuzzy dynamic system given in Example 6.9, confirming its instability determined analytically by the necessary and sufficient stability condition. The initial system output is set at 0.0001. 6.8 Output of the unstable TS fuzzy dynamic system controlled by an output tracking controller in Example 6.10, which is designed using the feedback linearization technique. Sign 0 represents the desired output trajectory whereas sign + represents the fuzzy system output. The figure shows that perfect tracking is achieved. Note that the final fixed position of the desired trajectory, Sf' is 0.4. 6.9 Output of the output tracking controller designed using the feedback linearization technique in Example 6.10. The controller is stable, confirming the result of the analytical determination. The steady-state output of the controller is 1.8461, the same as the value computed using (6.30). 6.10 Output of the unstable TS fuzzy dynamic system controlled by an output tracking controller in Example 6.11, which is designed in Example 6.10 using the feedback
List of Figures
xxx
linearization technique. Sign 0 represents the desired output trajectory whereas sign + represents the system output. The figure shows that perfect tracking is achieved. Note that the final fixed position of the desired trajectory, Sf' is 0.7 instead of 0.4 as shown in Fig. 6.9 for Example 6.10. 6.11 Output of the tracking controller in Example 6.11. Because of the change of the final position of the desired trajectory from 0.4 in Example 6.10 to 0.7 in Example 6.11, the controller becomes unstable, as predicted by using (6.29). 7.1 7.2 7.3 7.4 7.5 7.6 7.7
7.8
8.1 8.2 8.3
8.4
8.5 8.6 8.7
Illustrative definition of input fuzzy sets for the general SISO Mamdani fuzzy systems. Illustrative definition of triangular input fuzzy sets used by the general SISO Mamdani fuzzy systems. Note that J.li(xl) + J.li+l(Xl) = 1 on [Ci'Ci+ 1 ] for all i. Illustrative definition of input fuzzy sets for the general MISO Mamdani fuzzy systems. Graphical illustration of a simple but highly oscillatory function t/J(x) = Sin(2Xl) COS(3X2) on [0,3n] x [0,3n] which has 48 extrema on (0,3n) x (0,3n). Graphical illustration of trapezoidal input fuzzy sets. Dividing [C} , C} +1] X [CJ ' CJ +1] into nine regions for proving that the typical TS fuzzy 1 1 2. 2 1 1 2 2 systems have at most one extremum in [Ch'Cj1+ 1] x [Cj2,Cj2+2]. Comparison of the minimal system configuration between the typical MISO TS fuzzy systems and the general MISO Mamdani fuzzy systems. The example function to be approximated has two maximum points, whose locations are marked by symbol a, and two minimum points whose locations are marked by symbol e. Panel (a) gives one possible division of the input space for the TS fuzzy systems to be minimal, whereas panel (b) provides the necessary input space division for the Mamdani fuzzy systems to be minimal. Comparison of the minimal system configuration between the typical MISO TS fuzzy systems and the general MISO Mamdani fuzzy systems using another example function. The meanings of the symbols are the same as those in Fig. 7.7. This example function has the same number of extrema, but the locations of the minimum points are slightly different from those displayed in Fig. 7.7. Panel (a) gives one possible division of the input space for the TS fuzzy systems to be minimal, whereas panel (b) provides the necessary input space division for the Mamdani fuzzy systems to be minimal. Fuzzy SNP drug delivery control system for patients' MAP regulation. Computer simulation showing the effect of increasing the value of L from 10 to 16 on the performance of the fuzzy controller regulating MAP in the sensitive patients (K = -2.88). Computer simulation showing the effect of changing KfJ.u from - 0.8-0.6. on the performance of the fuzzy controller regulating MAP in the sensitive patients (K = -2.88). Computer simulation showing the effect of changing KfJ.u from - 0.8-0.6 on the performance of the fuzzy controller regulating MAP in the normal patients (K = -0.72). Simulated comparison of MAP in the sensitive patients (K = -2.88) before and after increasing the value of K; from 8.0 to 13.5. Simulated comparison of MAP in the normal patients (K = -0.72) before and after increasing the value of K; from 8.0 to 13.5. (a) MAP response for a patient obtained by using the fuzzy control SNP delivery system clinically; and (b) the corresponding SNP infusion rate. The patient had blood sampled at 12:57,13:42,15:18,15:56, and 17:50. Suctioning the patient began at 13:04,17:00,
List of Figures
8.8
8.9
8.10 8.11 8.12 8.13 8.14 8.1S 8.16
xxxi
and 19:17. The patient was bathed between 15:36 and 15:50. Changing bed linens started at 19:45 and lasted several minutes. Injection of Valium took place at 13:09, 14:41, and 17:57. The drugs Pavulon and Morphine were injected into the patient at 14:50 and 17:10, respectively. Comparison of the variable proportional-gain of the nonlinear PI controller realized by the fuzzy PI controller to the constant proportional-gain of the corresponding linear PI controller (i.e., (Kp(e,r) - Kp(O, O))/Kp(O, 0) showed change of Kp(e,r) over time corresponding to the nonlinearities in MAP for this patient. Change of K;(e,r) over time is the same as that of Kp(e,r) since (K;(e,r) - K;(O,O))/K;(O, 0)) = (Kp(e,r) - Kp(O,O))/Kp(O,O). Simulated MAP for sensitive patients (K = -2.88), normal patients (K = -0.72), and insensitive patients (K = -0.18), using the clinically fine-tuned parameters of the fuzzy controller. Experimental setup for fuzzy laser control of tissue temperature. Block diagram of fuzzy temperature control system. Fuzzy sets for input variable E(t k) and R(tk) of the fuzzy controller. Singleton output fuzzy sets of the fuzzy controller: (a) four fuzzy sets for Ton(tk), and (b) four fuzzy sets for t« (tk)' Division of E(tk) - R(tk) plane into 28 ICs for analytically deriving the fuzzy controller structure. M consecutive Ton (tk) and N consecutive Toff(tk) signals in one on-off cycle, [tk, tk+M=N]' Three-dimensional plots of TojJ (~ and TOll(t~ of the ~ controller for laser hyperthermia: (a) Toff(tk) where 'T:~ = 80rns, 'T:~ = 50ms, 'T:~ = 30ms, 'T:~ = Oms, and L = 1, (b) Ton(tk) where 'T:Ln = 800 ms, 7:}j = 600 ms, 'T: n = 500 ms, 'T:VS = 300 ms, and L = 1. Fuzzy control performance in a laser hyperthermia experiment with temperature setpoint being 43°C. The maximum positive and negative derivations of controlled temperature are O.ll°C and 0.21°C, respectively. Fuzzy control performance in another laser hyperthermia experiment with the temperature setpoint being 43°C. The maximum positive and negative derivations of controlled temperature are 0.31°C and 0.94°C, respectively. Fuzzy control performance in a laser coagulation experiment with the temperature setpoint being 65°C. The maximum positive and negative derivations of controlled temperature are 0.78°C and 0.30°C, respectively. Fuzzy control performance in a laser welding experiment with the temperature setpoint being 85°C. The maximum positive and negative derivations of controlled temperature are 3.0°C and 2.2°C, respectively. Comparison between visually and ultrasonically determined coagulation depths for 35 experiments. Progress of the coagulation front during laser heating in one of the 35 experiments, as determined by the ultrasound technique. Experimental setup for ultrasound-guide fuzzy control of laser-tissue coagulation. Graphical definitions of the fuzzy sets Small and Large for E(n) and R(n). Division of the E(n)-R(n) plane into 12 les for analytical structure derivation of the Mamdani fuzzy PD controller. The input fuzzy sets are shown in the last figure. One experimental result of real-time fuzzy control of laser coagulation. The target coagulation depth is 12 mm. Dynamic progress of coagulation depth, measured by the
s
8.17 8.18
8.19
8.20 8.21 8.22 8.23 8.24 8.2S 8.26
xxxii
List of Figures
ultrasonic technique, and the corresponding laser intensity are shown. The final coagulation position is confirmed by gross inspection. 8.27 The laser coagulation control results in all 21 experiments as compared with the corresponding setpoints ranging from 4mm to 14mm with a 2-mm increment.
Basic Fuzzy Mathematics for Fuzzy Control and Modeling 1.1. INTRODUCTION Fuzzy control and modeling use only a small portion of the fuzzy mathematics that is available; this portion is also mathematically quite simple and conceptually easy to understand. In this chapter, we introduce some essential concepts, terminology, notations, and arithmetic offuzzy sets and fuzzy logic. We include only a minimum though adequate amount of fuzzy mathematics necessary for understanding fuzzy control and modeling. To facilitate easy reading, these background materials are presented in plain English and in a rather informal manner with simple and clear notation as well as explanation. Whenever possible, excessively rigorous mathematics is avoided. The materials covered in this chapter are intended to serve as an introductory foundation for the reader to understand not only the fuzzy controllers and models in this book but also many others in the literature.
1.2. CLASSICAL SETS, FUZZY SETS, AND FUZZY LOGIC 1.2.1. Limitation of Classical Sets In traditional set theory, membership of an object belonging to a set can only be one of two values: 0 or 1. An object either belongs to a set completely or it does not belong at all. No partial membership is allowed. Crisp sets handle black-and-white concepts well, such as "chairs," "ships," and "trees," where little ambiguity exists. They are not sufficient, however, to realistically describe vague concepts. In our daily lives, there are countless vague concepts that we humans can easily describe, understand, and communicate with each other but that traditional mathematics, including the set theory, fails to handle in a rational way. The concept "young" is an example. For any specific person, his or her age is precise. However, relating a particular age to "young" involves fuzziness and is sometimes confusing and difficult. What age is young and what age is not? The nature of such questions is deterministic and has nothing to do with stochastic concepts such as probability or possibility. 1
2
Chapter 1 •
Basic Fuzzy Mathematics for Fuzzy Control and Modeling
Membership
Young
o
35
.. Age (year)
Figure 1.1 A possible description of the vague concept "young" by a crisp set.
A hypothetical crisp set "young" is given in Fig. 1.1. This set is unreasonable because of the abrupt change of the membership value from 1 to 0 at 35. Although a different cutoff age at which membership value changes from 1 to 0 may be used, a fundamental problem exists. Why is it that a 34.9-year-old person is completely "young," while a 35.1-year-old person is not "young" at all? No crisp set can realistically capture, quantitatively or even qualitatively, the essence of the vague concept "young" to reasonably match what "young" means to human beings. This simple example is not meant to discredit the traditional set theory. Rather, the intention is to demonstrate that crisp sets and fuzzy sets are two different and complementary tools, with each having its own strengths, limitations, and most effective application domains.
1.2.2. Fuzzy Sets Fuzzy set theory was proposed by Professor L. A. Zadeh at the University of California at Berkeley in 1965 to quantitatively and effectively handle problems of this nature [277]. The theory has laid the foundation for computing with words [285][287]. Fuzzy sets theory generalizes 0 and 1 membership values of a crisp set to a membership function of a fuzzy set. Using the theory, one relates an age to "young" with a membership value ranging from 0 to 1; o means no association at all, and 1 indicates complete association. For instance, one might think that age 10 is "young" with membership value 1, age 30 with membership value 0.75, age 50 with membership value 0.1, and so on. That is, every age/person is "young" to a certain degree. By plotting membership values versus ages, like the one shown in Fig. 1.2, we generate a fuzzy set "young." The curve in the figure is called the membership function of the fuzzy set "young." All possible ages, say 0 to 130, form a universe of discourse. From this example, a definition of fuzzy sets naturally follows. Fuzzy set: A fuzzy set consists of a universe of discourse and a membership function that maps every element in the universe of discourse to a membership value between 0 and 1. Unless otherwise stated, we always use a capital letter and tilde (e.g., A) to represent a
fuzzy set in this book. If an element is denoted by x E X, where X is a universe of discourse,
the membership function of fuzzy set A is mathematically expressed as J..lA(x), J..lA' or simply u. We will use all three representations in the book; the decision of which one to use depends
Section 1.2. •
Classical Sets, Fuzzy Sets, and Fuzzy Logic
3
Membership
0.75 Young
o
10
30
50
90
70
Age (year)
Figure 1.2 A possible description of the vague concept " young" by a fuzzy set.
on the circumstance. For the above age example, X = [0,130]. Letting A denote fuzzy set "young," we can represent its membership function by J1.A(x), where x EX. People have different views on the same (vague) concept. Fuzzy sets can be used to easily accommodate this reality. Continue the age example. Some people might think age 50 is "young" with membership value as high as 0.9, whereas others might consider that 20 is " young" with membership value merely 0.2. Different membership functions can be used to represent these different versions of " young." Figure 1.3 shows two more possible definitions of the fuzzy set "young." Not only do different people have different membership functions for the same concept, but even for the same person, the membership function for "young" can be different when the context in which age is addressed varies . For instance, a 40-year-old president of a country would likely be regarded as young, whereas a 40-year-old athlete would not. Two different fuzzy sets "young" are needed to effectively deal with the two situations. These examples show that (1) fuzzy sets can practically and quantitatively represent vague concepts; and (2) people can use different membership functions to describe the same vague concept. We now introduce some definitions needed to describe fuzzy controllers and models. Membership
"--- t - - - --t--
o
10
30
===---+------==::::f=-
50
70
-
-
---f---. Age (year)
90
Figure 1.3 Two more possible descriptions of the vague concept "young" by fuzzy sets .
Chapter 1 • Basic Fuzzy Mathematics for Fuzzy Control and Modeling
4
o
------~-----------.x
3.5
Figure 1.4 An example of the membership function of a singleton fuzzy set.
Continuous fuzzy sets: A fuzzy set is said to be continuous if its membership function is continuous. Most fuzzy controllers and models nowadays use continuous fuzzy sets. Singleton fuzzy sets: A fuzzy set that has nonzero membership value for only one element of the universe of discourse is called a singleton fuzzy set. Figure 1.4 exhibits a singleton fuzzy set whose membership value is 0 everywhere except at x = 3.5 where the membership value is 1. The majority of typical fuzzy controllers and models employ singleton fuzzy sets in the consequent of fuzzy rules, as will be shown later in this book. Support of a fuzzy set: For a fuzzy set whose universe of discourse is ~ all the elements in X that have nonzero membership values form the support of the fuzzy set. As an illustrative example, the support for the fuzzy set "young," shown in Fig. 1.2, is [0,70]. Height of a fuzzy set: The largest membership value of a fuzzy set is called the height of the fuzzy set. For instance, the height of the fuzzy set "young" in Fig. 1.2 is 1. The height of the fuzzy sets used in fuzzy controllers and models is almost always 1. Normal fuzzy set and subnormal fuzzy set: A fuzzy set is called normal if its height is 1. If the height of a fuzzy set is not 1, the fuzzy set is said to be subnormal. The fuzzy sets in Figs. 1.2 and 1.3 are normal fuzzy sets, whereas the fuzzy set in Fig. 1.5 is a subnormal one. Subnormal fuzzy sets are rarely used in fuzzy controllers and models. Center of a fuzzy set: We need to define this concept for four different situations. If the membership function of a fuzzy set reaches its maximum at only one element of the universe of discourse, the element is called center of the fuzzy set (Fig. 1.6a). If the membership function of a fuzzy set achieves its maximum at more than one element of the universe of discourse and all these elements are bounded, the middle point of the element is the center (Fig. 1.6b). If the membership function of a fuzzy set attains its maximum at more than one element of the universe of discourse and not all of the elements are bounded, the largest element is the center if it is bounded (Fig. 1.6d); otherwise, the smallest element is the center (Fig. 1.6c).
Section 1.2. •
Classical Sets, Fuzzy Sets, and Fuzzy Logic
5
0.4 Figure 1.5 An example of a subnormal fuzzy set.
x
o
7
Convex fuzzy sets: Fuzzy set A, whose universe of discourse is [a, b), is convex if and only if
where mint) denotes the minimum operator that uses the smaller membership value of the two memberships as the operation result. The fuzzy set illustrated in Fig. 1.7 is convex, whereas the one shown in Fig. 1.8 is not. To avoid possible confusion, it is important to note that the definition of convex fuzzy sets does not necessarily imply that the membership functions of convex fuzzy sets are convex functions. Nevertheless, the definition requires membership functions to be concave. Of course, according to the definition of convex fuzzy sets, if the membership function of a fuzzy set is convex, the fuzzy set is convex. Typical fuzzy controllers and models employ convex fuzzy sets.
o
o
center (a)
center
(c)
x
o
x
o
center (b)
center (d)
x
x
Figure 1.6 A definition of the center of a fuzzy set for four different cases .
According to the definition of fuzzy sets, any function, continuous or discrete, can be a membership function as long as its value falls in [0,1]. The discrete type is uncommon,
Chapter 1 • Basic Fuzzy Mathematics for Fuzzy Control and Modeling
6
J.1(X)
o
x
Figure 1.7 An example of a convex fuzzy set.
fl(X)
o
x
Figure 1.8 An example of a nonconvex fuzzy set.
however. Indeed, one of the key issues in the theory and practice offuzzy sets is how to define the proper membership functions of fuzzy sets. Fuzzy control and modeling are no exception. Primary approaches include (1) asking the control/modeling expert to define them; (2) using data from the system to be controlled/modeled to generate them; and (3) making them in a trial-and-error manner. Each different approach has its benefits and drawbacks. In more than 25 years of practice, it has been found that the third approach, though ad hoc, works effectively and efficiently in many real-world applications. Numerous applications have shown that only four types of membership functions are needed in most circumstances: trapezoidal, triangular (a special case of trapezoidal), Gaussian, and bell-shaped. Figure 1.9 shows an example of each type. All these fuzzy sets are continuous, normal, and convex. Among the four, the first two are more widely used. In the figure, we purposely use asymmetric membership functions to make the illustration more general. More often than not, however, symmetric functions are used. 1.2.3. Fuzzy Logic Operations In classical set theory, there are binary logic operators AND (i.e., intersection), OR (i.e., union), NOT (i.e., complement), and so on. The corresponding fuzzy logic operators exist in fuzzy set theory. Fuzzy logic AND and OR operations are used in fuzzy controllers and models. Unlike the binary AND and OR operators whose operations are uniquely defined, their fuzzy counterparts are nonunique. Numerous fuzzy logic AND operators and OR operators have been proposed, some of them purely from the mathematics point of view. To a large extent, only the Zadeh fuzzy AND operator, product fuzzy AND operator, the Zadeh
Section 1.3. • Fuzzification
7
J1{x)
o
J.L(x)
0
.. x
-"""----------~
(a)
(b)
f.l(x)
~(x)
o
.. x
-"------~---
o
(c)
.. x
-----'"--------~-
(d)
Figure 1.9 Examples of four commonly used input fuzzy sets in fuzzy control and modeling: (a) trapezoidal, (b) triangular, (c) Gaussian, and (d) bell-shaped. Note that they are all continuous, normal, and convex fuzzy sets.
OR operator, and the Lukasiewicz OR operator have been found to be most useful for fuzzy control and modeling [79]. Their definitions are as follows: Zadeh fuzzy logic AND operator:
JllniJ{x) = min{JlA{x), JlA{x))
product fuzzy logic AND operator:
Jl:4ni1{x) = JlA{x) x JliJ{x)
Zadeh fuzzy logic OR operator:
Jl:4uil{x) = max(JlA{x), JliJ{x))
Lukasiewicz fuzzy logic OR operator:
JlAuA{x) = min{,uA{x) + JlA{x), 1)
where max{) and mint) are the maximum operator and minimum operator, respectively. As a concrete demonstration, suppose that a specific age, say 30, is "young" (a fuzzy set) with a membership value of 0.8 and is "old" (another fuzzy set) with a membership value of 0.3. Then, the membership value for the age being "young and old" (a newly formed fuzzy set) is 0.3 if the Zadeh fuzzy AND operator is used or 0.24 if the product fuzzy AND operation is applied. By the same token, the membership value for the age being "young or old" (another newly formed fuzzy set) is 0.8 if the Zadeh fuzzy OR operator is utilized, or 1 if the Lukasiewicz fuzzy OR operation is involved.
1.3. FUZZIFICATION Fuzzy control and modeling always involve a process called fuzzification at every sampling time. Fuzzification is a mathematical procedure for converting an element in the universe of discourse into the membership value of the fuzzy set. Suppose that fuzzy set A is defined on [a,b]; that is, the universe of discourse is [a,b]; for any x E [a,b], the result offuzzification is simply Jl:4{x). Figure 1.10 shows an example in which the fuzzification result for x = 7 is 0.4.
Chapter 1 • Basic Fuzzy Mathematics for Fuzzy Control and Modeling
8
0.4
o
x
7
Figure 1.10 An example showing how fuzzification works.
1.4. FUZZY RULES A fuzzy controller or model uses fuzzy rules, which are linguistic if-then statements involving fuzzy sets, fuzzy logic, and fuzzy inference. Fuzzy rules playa key role in representing expert control/modeling knowledge and experience and in linking the input variables of fuzzy controllers/models to output variable (or variables). Two major types of fuzzy rules exist, namely, Mamdani fuzzy rules and Takagi-Sugeno (TS, for short) fuzzy rules [202].
1.4.1. Mamdani Fuzzy Rules A simple but representative Mamdani fuzzy rule describing the movement of a car is: IF Speed is High AND Acceleration is Small THEN Braking is (should be) Modest, where Speed and Acceleration are input variables and Braking is an output variable. "High," "Small," and "Modest" are fuzzy sets, and the first two are called input fuzzy sets while the last one is named the output fuzzy set. The variables as well as linguistic terms, such as High, can be represented by mathematical symbols. Thus, a Mamdani fuzzy rule for a fuzzy controller involving three input variables and two output variables can be described as follows: IF
Xl
is A AND Xl is lJ AND x3 is
C THEN ul
is
D,
Ul
is E,
(1.1)
where Xl' Xl' and x3 are input variables (e.g., error, its first derivative and its second derivative), and ul and Ul are output variables (e.g., valve openness). In theory, these variables can be either continuous or discrete; practically speaking, however, they should be discrete ~ec~us~ virtually ~ll fuzzy controllers and models are implemented using digital comyuters. A, B, C, D, and E are fuzzy sets, and AND are fuzzy logic AND operators. "IF Xl is A AND Xl is lJ AND X3 is C" is called the rule antecedent, whereas the remaining part is named the rule consequent. The structure of Mamdani fuzzy rules for fuzzy modeling is the same. The variables involved, however, are different. An example of a Mamdani fuzzy rule for fuzzy modeling is
A AND yen - 1) is lJ AND Yen AND u(n - 1) is E THEN Yen + 1) is P, IF Yen) is
2) is
C AND u(n) is iJ
(1.2)
Section 1.4. • Fuzzy Rules
9
where A, B, C, D, E, and F are fuzzy sets, y(n), y(n - 1), and y(n - 2) are the output of the system to be modeled at sampling time n, n - 1 and n - 2, respectively. And, u(n) and u(n - 1) are system input at time n and n -:- 1, respectively; y(n + 1) is system output at the next sampling time, n. + 1. Obviously, a general Mamdani fuzzy rule, for either fuzzy control or fuzzy modeling, can be expressed as IF
VI
is
81 AND ... AND vM is 8M
THEN ZI is
Wi, ... , Zp is Wp
(1.3)
where Vi' i = 1, ... , M!., is an input variable and Zj' j = 1, ... , P, is an output variable. 8i is an input fuzzy set and Wj an output fuzzy set. As mentioned earlier, for most fuzzy controllers and models, input fuzzy sets are continuous, normal, and convex and are usually of the four common types. Output fuzzy sets are most often of the singleton type. Thus, the general Mamdani fuzzy rule (1.3) can be reduced to IF where
Pj
VI
is
81 AND ... AND vM is 8M
represents singleton fuzzy set
THEN ZI is
PI' •.• , Zp
tfJ that is nonzero only at Zj =
is
pp,
(1.4)
Pj'
1.4.2. TS Fuzzy Rules Now, let us look at the so-called TS fuzzy rules. Unlike Mamdani fuzzy rules, TS rules use functions of input variables as the rule consequent. For fuzzy control, a TS rule corresponding to the Mamdani rule (1.1) is IF Xl is A AND X2 is iJ AND x3 is
C THEN
UI
= f(x1 ,x2,x3), U2 = g(XI ,x2,X3),
where fO and g() are two real functions of any type. Similarly, for fuzzy modeling, a TS rule analogous to the Mamdani rule (1.2) is in the following form: IF y(n) is A AND y(n - 1) is iJ AND y(n - 2) is AND u(n - 1) is E THEN y(n
+ 1) =
C AND u(n) is D
F(y(n),y(n - 1),y(n - 2), u(n), u(n - 1)),
where FO is an arbitrary function. In parallel to the general Mamdani fuzzy rule (1.3), a general TS rule for both fuzzy control and fuzzy modeling is IF
VI
is 81 AND ... AND
THEN z1 =fi(vI"'"
vM
is
VM)"'"
8M Zp =fp(vI"'"
(1.5) VM)'
In theory, fj() can be any real function, linear or nonlinear. It seems to be appealing to use nonlinear functions for all the rules or to use a combination of linear and nonlinear functions as rule consequent (i.e., linear functions for some rules and nonlinear ones for the remaining). In this way, rules are more general and can potentially be more powerful. Unfortunately, this idea is impractical, for properly choosing or determining the mathematical formalism of nonlinear functions for every fuzzy rule is extremely difficult, if not impossible. This difficulty is fundamentally the same as those encountered in classical nonlinear control and modeling theory. It is well known that there is no general nonlinear control or modeling theory because general nonlinear system theory has not been, and most likely will not be, established. For these reasons, linear functions have been employed exclusively in theoretical research and practical development of TS fuzzy controllers and models. We call a TS rule employing a linear (nonlinear) function TS fuzzy rule with linear (nonlinear) rule consequent.
10
Chapter 1 • Basic Fuzzy Mathematics for Fuzzy Control and Modeling
In this book, we focus only on fuzzy controllers and models that use the linear TS rule
consequent.
1.5. FUZZY INFERENCE Fuzzy inference is sometimes called fuzzy reasoning or approximate reasoning. It is used in a fuzzy rule to determine the rule outcome from the given rule input information. Fuzzy rules represent control strategy or modeling knowledge/experience. When specific information is assigned to input variables in the rule antecedent, fuzzy inference is needed to calculate the outcome for output variable(s) in the rule consequent. Mamdani fuzzy rules and TS fuzzy rules use different fuzzy inference methods. For the general Mamdani fuzzy rule (1.3), the question about fuzzy inference is the following: Given Vi = (Xi' for all i, where (Xi are real numbers, what should Zj be? For fuzzy control and modeling, after fuzzifying Vi at (Xi and applying fuzzy logic AND operations on the resulting membership values in the fuzzy rule, we attain a combined membership value, /1, which is the outcome for the rule antecedent. Then, the question is how to compute "THEN" in the rule. Calculating "THEN" is called fuzzy inference. Specifically, the question is: Given /1, how should Zj be computed? Sinc~ mathematically, the computati0I! is the same for different output variables, we use Z and W to represent, respectively, Zj and Wj in the following discussion on fuzzy inference methods. A number of fuzzy inference methods can be used to accomplish this task (e.g., [163]), but only four of them are popular in fuzzy control and modeling and we will use them only in this book [157]). They are the Mamdani minimum inference method, the Larsen product inference method, the drastic product inference method, and the bounded product inference method. We denote them by RM , RL , RDP, and RBP, respectively. The definitions of these methods are given in Table 1.1, where /1w(z) is the membership function of fuzzy set tV in fuzzy rule (1.3) and /1 is the combined membership in the rule antecedent. For a better understanding, we graphically illustrate the definitions in Fig. 1.11. The results of the four fuzzy inference methods are the fuzzy sets formed by the shaded areas. Obviously, the resulting fuzzy sets can be explicitly determined since the formulas describing the shaded areas can be derived mathematically. Among the four methods, the Mamdani method is used most widely in fuzzy control and modeling. TABLE 1.1 Definitions of Four Popular Fuzzy Inference Methods for Fuzzy Control and Modeling: (a) Mamdani minimum inference, (b) Larsen product inference, (c) drastic product inference, and (d) bounded product inference. Fuzzy Inference Method Mamdani minimum inference, RM Larsen product inference, R L Drastic product inference, R DP Bounded product inference, Rap
Definition" min(,u, ,uw(z», for all z ,u x ,uw(z), for all z ,u, for ,uw(z) = 1 ,uw(z), for,u = 1 { 0, for ,u < 1 and ,uw(z) < 1 max(,u + ,uw(z)- 1,0)
8 General Mamdani fuzzy rule (1.3) is utilized in the definitions. ,uw(z) is the membership function of fuzzy set tv representing "Hj in the rule consequent, whereas ,u is the final membership yielded by fuzzy logic AND operators in the rule antecedent.
Section 1.6. •
Defuzzification
11
Membership
Figure 1.11 Graphical illustration of the definitions of the four popular fuzzy inference methods whose mathematical definitions are provided in Table 1.1: (a) the Mamdani minimum inference method, (b) the Larsen product inference method, (c) the drastic product inference method, and (d) the bounded product inference method.
Membership
z Figure 1.12 For Mamdani fuzzy controllers and models using singleton fuzzy sets in the rule consequent, the outcome of using the four different inference methods is identical.
As stated above, typical Mamdani fuzzy controllers and models employ singleton output fuzzy sets as the rule consequent (see rule (1.4). Under this condition, the four different inference methods produce the same inference result, as shown in Fig. 1.12. For TS fuzzy rules, fuzzy inference is simpler and only one method exists . For general TS fuzzy rule (1.5), the result of the fuzzy inference is Jl xfj(v\ •...• vM) for Zj ' Instead of viewing this as a fuzzy inference result, one may also think of it as the rule consequent being weighted by the combined membership value from the rule antecedent.
1.6. DEFUZZIFICATION Defuzzification is a mathematical process used to convert a fuzzy set or fuzzy sets to a real number. It is a necessary step because fuzzy sets generated by fuzzy inference in fuzzy rules must be somehow mathematically combined to come up with one single number as the output of a fuzzy controller or model. After all, actuators for control systems can accept only one value as their input signal, whereas measurement data from physical systems being modeled are always crisp.
12
Chapter 1 •
Basic Fuzzy Mathematics for Fuzzy Control and Modeling
Every fuzzy controller and model uses a defuzzifier, which is simply a mathematical formula, to achieve defuzzification. For fuzzy controllers and models with more than one output variable, defuzzification is carried out for each of them separately but in a very similar fashion. In most cases, only one defuzzifier is employed for all output variables, although it is theoretically possible to use different defuzzifiers for different output variables. Different types of defuzzifiers are suitable for different circumstances; below, we present some of the more popular ones. Since most fuzzy controllers and models use singleton fuzzy sets in the fuzzy rule consequent, our presentation will concentrate on singleton output fuzzy sets. Nonetheless, extending the discussion to nonsingleton fuzzy sets is straightforward.
1.6.1. Generalized Defuzzifier The generalized defuzzifier represents many different defuzzifiers in one simple mathematical formula [64]. Assume that the output variable of a fuzzy controller or model is z. Suppose that evaluating N Mamdani fuzzy rules using some fuzzy inference method produces N membership values, J11' ... , J1N' for N singleton output fuzzy sets in the rules (one value for each rule). Let us say that these fuzzy sets are nonzero only at z = PI' ... , PN. The generalized defuzzifier produces the following defuzzification result: N
LJ1ic·Pk
k=l
z=--N--
(1.6)
LJ1ic
k=l
where ex is a design parameter. Continue the above case, but assume that the fuzzy controller or model uses TS rules instead. Let us say that the rule consequents in the N fuzzy rules are gk(v 1 , ••• , VM), k = 1, ... ,N; then defuzzification outcome is achieved using the generalized defuzzifier N
L J1ic X gk(vI'···' vM) k=l z= --------
(1.7)
1.6.2. Centroid Defuzzifier, Mean of Maximum Defuzzifier, and Linear Defuzzifier
Different types of defuzzifiers are realized using different ex values in the generalized defuzzifier, where 0 ::::; ex + 00. When ex = 1, the most widely used centroid defuzzifier is obtained. The defuzzifier is of the centroid type because it computes, in a sense, the centroid of the singleton fuzzy sets from different rules. The occasionally used mean of maximum defuzzifier is realized when ex = 00.
13
Exercises
A few studies in the literature use a linear defuzzifier. When Mamdani fuzzy rules are involved, the defuzzification result is N
Z
=
L, Ilk
k=1
X
13k'
(1.8)
On the other hand, for TS fuzzy rules, we get Z
=
N
L, Ilk
k=1
X
gk(Vl, ... , VM)'
The difference is obvious: A linear defuzzifier does not have the denominator. We will use the centroid defuzzifier and generalized defuzzifier only in this book because of their popularity. 1.7. SUMMARY
This chapter introduces the concept of fuzzy sets and their advantages over the classical sets. Also presented are concepts and notations of different types of fuzzy sets and fuzzy logic operations. The common building blocks of typical fuzzy controllers and models are described. They include fuzzification, fuzzy rules, fuzzy inference, and defuzzification. 1.8. NOTES AND REFERENCES
There are a number of introductory textbooks on fuzzy set theory and fuzzy systems (e.g., [101][102][242][293]). Fuzzification, fuzzy rules, fuzzy inference, and defuzzification are basic components of a typical fuzzy system, fuzzy controller, or fuzzy model. More information on these segments can be found in these books as well. A brief history of fuzzy sets, fuzzy logic, and fuzzy systems is given in [151]. EXERCISES 1. List some concepts in our daily lives that cannot be accurately described by conventional sets but can be by fuzzy sets.
2. Graphically draw your definitions of continuous fuzzy set "young" in some different circumstances. Can they be described by mathematical formulas? If not, can you approximate your definitions by formulas? Do your definitions belong to the four common types of fuzzy sets mentioned in this chapter? 3. Answer the same questions as in Problem 2 for continuous fuzzy set "middle age." 4. For the fuzzy sets that you defined in the above two problems, what are their supports, heights, and centers? Are they normal? Are they convex?
5. Derive two new fuzzy sets "young and middle age" and "young or middle age" from the fuzzy sets established in Problems 2 and 3. Use different fuzzy logic AND and OR operators discussed in this chapter. Do this exercise graphically and mathematically, if possible. 6. Describe a fuzzy integer 5 using the Gaussian fuzzy set (i.e., use the Gaussian formula in statistics). How do you use a singleton fuzzy set to represent integer 5? 7. What are the apparent similarities between fuzzy set and probability? What are the fundamental differences between them? What are the implications of the differences to application?
14
Chapter 1 • Basic Fuzzy Mathematics for Fuzzy Control and Modeling 8. Make some Mamdani fuzzy rules and TS fuzzy rules of your own. Which type would you prefer? Why? 9. Is it meaningful to compare the effects of the different defuzzifiers? If yes, how can you compare them? If no, why? 10. If the same questions as Problem 9 are asked for the different fuzzy inference methods, what are your answers?
Introduction to Fuzzy Control and Modeling
2.1. INTRODUCTION Fuzzy set theory has been used successfully in virtually all the technical fields, including control, modeling, image/signal processing, and expert systems. The most successful and active field, however, is fuzzy control. In this chapter, we first introduce configuration and operation of typical fuzzy controllers and models, both the single-input single-output (8180) type and the multipleinput single-output (M180) type. We then show that fuzzy controllers and fuzzy models are actually conventional nonlinear controllers and nonlinear models, respectively, with peculiar but advantageous structural changes with input state. Based on this insightful view, we point out the advantages and disadvantages of fuzzy control and modeling and indicate when they should be utilized in practice. Finally, we discuss various analytical issues in fuzzy control and modeling.
2.2. WHY FUZZY CONTROL The world's first fuzzy controller was developed by Professor E. H. Mamdani at the University of London in 1974 [141]. The concept and theoretical foundation of fuzzy control and systems, however, had been developed by Professor L. A. Zadeh a few years earlier (e.g., [279][280][281 ]). The primary thrust of this novel control paradigm is to utilize the human control operator's knowledge and experience to intuitively construct controllers so that the resulting controllers can emulate human control behavior to a certain extent. Compared to the traditional control paradigm, the advantages of the fuzzy control paradigm are twofold. First, a mathematical model of the system to be controlled is not required, and, second, a satisfactory nonlinear controller can often be developed empirically in practice without complicated mathematics. The core value of these advantages is the practicality. Of course, as
15
16
Chapter 2 • Introduction to Fuzzy Control and Modeling
for any paradigms, no technological advantages or benefits come without tradeoffs and pitfalls; fuzzy control is no exception. We discuss them in detail later in this chapter. Proper use of fuzzy control can significantly shorten product research and development time with reduced cost. Since the mid-1980s, companies around the world, particularly those in Japan, have utilized fuzzy control extensively to make better, cheaper, and smarter products. Many of them are commercially available on the market, including fuzzy controlled auto-focus cameras, fuzzy controlled image stabilizer video cameras, fuzzy controlled air conditioners, and fuzzy controlled automobiles, to name just a few (e.g., [120][146] [196][243]).
2.3. CONVENTIONAL MODELING System modeling and system control are two closely related areas. In order to design a conventional controller for controlling a physical system, the mathematical model of the system is needed. A common form of the system model is differential equation for continuous-time systems or difference equation for discrete-time systems. Strictly speaking, all physical systems in existence are nonlinear. Unless physical insight and the laws ofphysics can be applied, establishing an accurate nonlinear model using measurement data and system identification methods is difficult in practice. Nonlinear systems are complex; worse yet, no general theory exists for modeling them. Though difficult, different nonlinear system modeling techniques have still been developed, including the Volterra and Wiener theories of nonlinear systems. Such developed nonlinear system models are called black-box models because they only attempt to mimic the system's input-output relationship with the measurement data and hence can hardly provide any insight on the internal structure of the system. As an alternative, nonlinear systems are usually modeled as (piecewise) linear systems. This approach is sometimes oversimplistic, and it fails to capture diverse and peculiar nonlinear system behaviors, such as limit circles, chaos, and bifurcation. A variety of techniques rely on input-output measurement data to establish a linear discrete-time system model linking input variables to output variables of the system. The popular linear model types include AR (Auto Regressive), ARX (Auto Regressive with eXtra input) and ARMA (Auto Regressive Moving Average), and they are different types of difference equations [135]. These models are black-box models. The linear system models are often adequate for control system development. The whole knowledge base of linear control theory, from classic linear proportional-integralderivative (PID) control to modem linear robust control, has been developed based mainly on the notation of linear system models. Once designed, control performance and system stability, as well as other properties of the linear control system, can usually be examined mathematically. This is because these linear models are difference equations and thus can be analyzed in detail. Whether this linear control development approach will succeed in practice depends largely on whether the linear model captures the essence of the nonlinear physical system and whether it is a reasonable representation and approximation of the physical system. For any modeling problems, linear or nonlinear, two tasks need to be accomplished. The first task is model structure identification, and the second is model parameter identification. Linear system modeling is relatively easy in that there already exists a set of model structures to choose from (e.g., AR, ARX, or ARMA). Once the structure is selected, the
Section 2.6. •
Typical SISO Mamdani Fuzzy Controllers
17
model parameters can be found using the system's input-output data and some system optimization procedures. Nonlinear system modeling, however, is far more complicated because an infinite number of possible model structures exist. Correctly assuming a nonlinear model structure is a very difficult problem in nonlinear system modeling theory. One of the latest advances in this field is the development of artificial neural network system models, which are nonlinear and black box in nature (e.g., [180]). The primary merit of this new approach is that model structure is not preassumed and a neural network can learn it from the system's input-output data. The major drawbacks are: (1) a large amount of training data and long training time are required, and (2) a neural network model can hardly be analytically analyzed or related to the conventional modeling theory.
2.4. WHY FUZZY MODELING Fuzzy modeling is another new modeling paradigm for nonlinear systems. Fuzzy models are nonlinear dynamic models. Compared with the conventional black-box modeling techniques, linear or nonlinear, which can only utilize numerical data, the fuzzy modeling approach is unique in its ability to utilize both qualitative and quantitative information [240]. This advantage is practically important and even crucial in many circumstances. Qualitative information is human modeling expertise and knowledge, which are captured and utilized in the form of fuzzy sets, fuzzy logic, and fuzzy rules. The expertise and knowledge are actually nonlinear structures of physical systems, and the structures are represented in an implicit and linguistic form rather than an explicit and analytical form, as dealt with by the conventional system modeling methodology. Numerous applications have shown the power of fuzzy dynamic modeling. Fuzzy models are more intuitive and easier to understand than neural network models because fuzzy sets, fuzzy logic, and fuzzy rules are all intuitive and meaningful. However, fuzzy models are not as simple as those models that can be expressed in mathematical formulas. In general, fuzzy models should be regarded as black-box models. Under certain conditions, the analytical structure of some fuzzy models can be derived, depending on their configurations. When this is the case, a fuzzy model is no longer a black box.
2.5. TWO TYPES OF FUZZY CONTROL AND MODELING: MAMDANI TYPE AND TS TYPE The two major types of fuzzy controllers are Mamdani type and TS type [202]. The classification depends on the type of fuzzy rules used. If a fuzzy controller or fuzzy model uses the TS type of fuzzy roles, the fuzzy controller or fuzzy model is called the TS fuzzy controller or TS fuzzy model. Otherwise, the controller or model is named the Mamdani fuzzy controller or model. We will first study a typical SISO Mamdani fuzzy controller. Much of the contents hold for MISO Mamdani fuzzy controllers, SISO TS fuzzy controllers, and MISO TS fuzzy controllers, which are examined later in this chapter.
2.6. TYPICAL SISO MAMDANI FUZZY CONTROLLERS Figure 2.1 depicts the structure of a fuzzy control system, which is comprised of a typical SISO Mamdani fuzzy controller and a system under control. The system may be linear or
18
Chapter 2 • Introduction to Fuzzy Control and Modeling
r------------------------------------------------------1
I I I I
,
Typical SISO Mamdani fuUJ' controller
, I
I I I I I I
De~ired output trajectory S(n) I
r------:ll...------,
,+ I I
~--
--------------------------------------------------Figure 2.1 Structure of a SISO Mamdani fuzzy control system, which is comprised of a typical Mamdani fuzzy controller and a system under control.
nonlinear, and its model mayor may not be mathematically known. Virtually all the realworld fuzzy controllers use digital computers for implementations. Hence, fuzzy controllers are discrete-time controllers. For practical purposes, there is no point in considering fuzzy controllers as continuous-time controllers, and we certainly will not do so in this book. The major components of the typical fuzzy controller are fuzzification, fuzzy rule base, fuzzy inference, and defuzzification. They have been described individually in the previous chapter, and we now explain how they operate together to make a fuzzy controller work.
2.6.1. Fuzzification In Fig. 2.1, system output is designated by y(n), where n is a positive integer. The sampling time is nT, where Tis the sampling period. However, as a notational convention, we will use n instead of nT to represent sampling time throughout the book. The desired system output trajectory is denoted as S(n), which can be either constant or time-varying. At time n, y(n) and S(n) are used to compute the input variables of the fuzzy controller. In many cases, error and change of error (for convenience we call it rate) ofy(n) are used as input variables. There are two input variables only because the number of fuzzy rules needed increases dramatically with the increase of the number of input variables (we will explain this in detail later in this chapter). The input variables then are e(n) = S(n) - y(n),
(2.1)
r(n) = e(n) - e(n - 1) = y(n - 1) - y(n).
(2.2)
Both e(n) and r(n) have their ranges, and we assume them to be [at ,btl and [a2,b 2], respectively, which are their respective universes of discourse. Scaling factors are used to scale the input variables before fuzzification (They are called input scaling factors). The purpose is to make fuzzy controller design easier. With them, input fuzzy sets are defined on the scaled universes of discourse instead of on [at ,btl and [a2,b 2]. This allows one to conveniently manipulate the effective fuzzification of the input variables by
Section 2.6. •
19
Typical SISO Mamdani Fuzzy Controllers Membership
Negative Large
Negative Small
Positive Small
Positive Large
0.6 t------+----~-~ 0.21-----lF---
---+
__
E(n)
-4
-2
o
2
2.4
4
Figure 2.2 Illustration of how input variables are fuzzified by input fuzzy sets.
simply changing the values of the scaling factors. Assume the scaling factors for error and rate are K; and K r , respectively. The scaled error is (2.3) and the scaled rate is (2.4) Without loss of generality, E(n) and R(n) are assumed to be defined on [At,Btl and [A 2,B2 l, respectively. The scaled variables are then fuzzified by input fuzzy sets. Input fuzzy sets are fuzzy sets that are defined on [At,Btl and [A2,B2 l. Two arrays offuzzy sets are needed: one for E(n) and the other for R(n). Figure 2.2 shows four input fuzzy sets for E(n) that are hypothetically used by the fuzzy controller. The membership functions are purposely selected as a mixture of three different types, namely, triangular, trapezoidal, and bell-shaped. The use of "Positive" and "Negative" in the linguistic names is necessary because e(n) and r(n) can be positive and negative. Suppose that K; = 2 and at time n = n*, e(n*) = 1.2. Then, E(n*) = 2.4. The fuzzification results, shown in Fig. 2.2, are membership value 0.2 for fuzzy set Positive Small and 0.6 for Positive Large. The membership values for Negative Small and Negative Large are O. Fuzzification can be formulated mathematically. For mathematical convenience, the linguistic naming system should be replaced by a numerical index system. For instance, o~e ~y us_e Ai' i = -2, -1,1,2, to represent the four fuzzy sets for E(n). Thus, {A_ 2 , A_ t, At, A 2 } symbolize {Negative Large, Negative Small, Positive Small, and Positive Large}. Such an indexing system is essential as it makes mathematical analysis of fuzzy control and modeling possible. Now, the example fuzzification of e(n*) = 1.2 can be described as JJA 2 (e(n*) = 0.6,
(2.5)
JJA 1 (e(n*» = 0.2,
(2.6)
JJA -I (e(n*)) = 0,
(2.7)
JJA -2 (e(n*) = O.
(2.8)
20
Chapter 2 •
Introduction to Fuzzy Control and Modeling
Now, let us look at fuzzification of R(n). The fuzzy controller supposedly uses fuzzy sets {.8-2, .8-1, .80' .8 1, .82} for R(n), which symbolize {Negative Large, Negative Small, Approximately Zero, Positive Small, and Positive Large}. The specific definitions of these fuzzy sets are not given, as they are unimportant for the point we are going to make. Assume that R(n*) = 3.5 is computed from r(n*) = 7 and K; = 0.5 and that the fuzzification results are
Jlil2 (r(n*)) = 0,
(2.9)
Jlil l (r(n*)) = 0,
(2.10)
Jlilo(r(n*)) = 0.3,
(2.11)
Jlil -1 (r(n*)) = 0.5,
(2.12)
Jlil -2 (r(n*)) = O.
(2.13)
Having shown concrete examples, let us consider some important and practical design issues. First, input fuzzy sets must cover entire scaled universes of discourse so that any value of input variables will produce at least one nonzero membership value. The number of input fuzzy sets, and their linguistic names and shapes are design parameters determined by the fuzzy controller developer. The basis for the developer's decision includes the characteristics of the system to be controlled, the control operator's knowledge of and experience with the system, the developer's experience with fuzzy control, and personal preference. At present, proper determination of the design parameters is, to a great extent, more an art than a science. No mathematically rigorous formulas or procedures exist to accomplish the design of input fuzzy sets. What do exist in the literature are rules of thumb and empirical knowledge accumulated through many years of practice and studies. Generally, two to 13 fuzzy sets are used for each input variable; a larger number is uncommon. Different numbers of fuzzy sets may be used for different input variables. The shape of fuzzy sets may be different for the same input variable or different input variables. Each input fuzzy set is assigned a linguistic name, preferably unique. The common names include Negative Large, Negative Medium, Negative Small, Approximately Zero, Positive Small, Positive Medium, and Positive Large. They are often abbreviated as NL, NM, NS, AZ, PS, PM, and PL, respectively. Of course, one may employ any other linguistic names. Different naming will not affect the fuzzification result as long as the membership functions remain unchanged. As stated in Chapter 1, the most widely used types of input fuzzy sets are triangular, trapezoidal, Gaussian, and bell-shaped. Regardless of the shape, input fuzzy sets are usually required to be so positioned that (1) any two adjacent membership functions overlap once and (2) at any sampling time, two nonzero membership values are yielded by fuzzification of each input variable. The rationale behind the requirements is to limit the number of fuzzy rules executed at any time to an adequate level. These two requirements are unachievable, however, for Gaussian input fuzzy sets, for a Gaussian function has two infinitely long "tails." This type of fuzzy set is used in the literature largely because the function and its derivatives are smooth and continuous, making the mathematical analysis more tractable and simpler than the other three types of membership functions.
Section 2.6. •
21
Typical SISO Mamdani Fuzzy Controllers
2.6.2. Fuzzy Rules Fuzzification results are used by fuzzy logic AND operations in the antecedent of fuzzy rules to make combined membership values for fuzzy inference. Before we can discuss fuzzy logic operations and fuzzy inference in the next section, we first need to study fuzzy rules. An example of a Mamdani fuzzy rule is IF E(n) is Positive Large AND R(n) is Negative Small
(2.14)
THEN u(n) (or L\u(n)) is Positive Medium,
where Positive Large and Negative Small are input fuzzy sets and Positive Medium is an output fuzzy set. The output variable can either be fuzzy controller output, u(n), or increment of controller output, L\u(n). In essence, rule (2.14) states that if system output is significantly smaller than the desired system output and system output is decreasing slowly, the controller output should be positive medium (or the increment of controller output should be moderate, if L\u(n) is used in the rule consequent instead). Throughout this book, we use u(n) and L\u(n) to represent, respectively, the. output and incremental output ofa fuzzy controller. The scaled versions are denoted as U(n) and L\U(n), respectively (see below). The quantity, linguistic names, symbolic names, and membership functions of output fuzzy sets are all design parameters determined by the controller developer. Linguistic names are similar to those of input fuzzy sets; they can be symbolized as well in similar fashion. In theory, output fuzzy sets can be any shape. Nevertheless, numerous successful applications of fuzzy control have led to the extensive use of singleton fuzzy sets. Figure 2.3 shows five example singleton output fuzzy sets. Using singleton fuzzy sets is by no mean restrictive, both mathematically and functionally. Because of their enormous popularity and practicality, we will study mostly the fuzzy controllers using singleton output fuzzy sets. The number of output fuzzy sets relates to the number of input fuzzy sets. If there are N, and N2 distinct input fuzzy sets for E(n) and R(n), respectively, then there are N, x N 2 different combinations of the input fuzzy sets. Thus, N, x N 2 different fuzzy rules are needed. Subsequently, up to N, X N2 different output fuzzy sets may be required. But usually the actual amount in practice is markedly less than this maximum. Fuzzy rules are often so designed that some of them use the same output fuzzy sets, reducing significantly the number Membership Negative Large
Negative Small l
l
1
Positive Medium
Positive Very Large
l
Approximately Zero
u(n) or Au(n)
-6
-4.5
-3
-1.5
o
3 3.5
6
Figure 2.3 Example of singleton fuzzy sets as output fuzzy sets for Mamdani fuzzy controllers.
22
Chapter 2 • Introduction to Fuzzy Control and Modeling
of different output fuzzy sets needed. The number of output fuzzy sets ranges from three to seven; a larger quantity is usually unnecessary. A modest amount of fuzzy rules usually suffices for a typical fuzzy controller. The exact quantity is determined by the number of input fuzzy sets. A N, x N 2 two-dimensional table is often used to conveniently represent N, x N 2 rules; but this table scheme is not applicable when more than two input variables are involved. Given a particular application, the controller developer and/or the expert operating the system may design fuzzy rules. Rule design is an empirical process that depends partially on trial-and-error effort. There does not exist a set of fuzzy rules universally applicable to any system with guaranteed superior control performance. Using the numerical indexing system, a general fuzzy rule is expressed as IF E(n) is Ai AND R(n) is Bj THEN u(n) (or ~u(n» is Vk'
(2.15)
If Vk is a singleton fuzzy set that is nonzero only at u(n) = Vk (or ~u(n) = Vk), where Vk is a real number, then the general rule becomes IF E(n) is Ai AND R(n) is Bj THEN u(n) (or ~u(n» is Vk'
(2.16)
For any fuzzy rule, the output fuzzy set is always related to input fuzzy sets in certain ways because the rule represents knowledge or experience of human beings. For instance, in rule (2.14), output fuzzy set Positive Medium is linked to input fuzzy set Positive Large for ~(n) and Negative Small for R(n). More generally, in rule (2.1~, Vk depends on Ai and Bj ; this dependence can be represented by relating the indexes of Ai and Bj to Vk as follows. (The same can be said of rule (2.15), but we will not go into detail as it does not use the singleton output fuzzy set.) IF E(n) is Ai AND R(n) is Bj THEN u(n) (or ~u(n») is JfOJ)'
(2.17)
where k = f(i,}). fO can be any function of i and} as long as its value is an integer at every combination of i and}, because the index for Vk must be integer. Without loss of generality, we introduce another function h(i,}) and let h(i,}) = JfOJ) = Vk'
(2.18)
Obviously, he) can be any function, and its value at i and} does not have to be integer. Now, fuzzy rule (2.17) can be expressed as IF E(n) is Ai AND R(n) is Bj THEN u(n) (or ~u(n») is h(i,}). At any sampling time, usually only a handful of fuzzy rules are activated. A fuzzy rule is activated if, after fuzzification.jhe membership values of the input fuzzy sets for E(n) and R(n) are both not zero for the rule. An activated rule contributes its share in calculation of new controller output. If, on the other hand, either of the membership values is zero, the rule will not be activated and subsequently will make no contribution. This principle of determining rule activation applies to all the fuzzy rules.
Section 2.6. •
Typical SISO Mamdani Fuzzy Controllers
23
Let us continue our concrete demonstration. For the fuzzification results in the last section, among the total 20 fuzzy rules (i.e., Nt = 4 and N 2 = 5), only the following four will be activated at time n *: IF E(n) is At AND R(n) is B_ 1 THEN u(n) (or Au(n)) is h(I,-I)
(2.19)
IF E(n) is At AND R(n) is Bo THEN u(n) (or Au(n)) is h(I,O)
(2.20)
IF E(n) is A2 AND R(n) is s, THEN u(n) (or Au(n)) is h(2,-I) IF E(n) is A2 AND R(n) is Bo THEN u(n) (or Au(n)) is h(2,0).
(2.21) (2.22)
Because of the fuzzification, at time n* the membership values for E(n) is At, E(n) is A2, R(n) is B_ t , and R(n) is Eo are 0.2, 0.6, 0.5, and 0.3, respectively (see (2.5) to (2.13)). These membership values now need to be combined by fuzzy logic AND operations. In fuzzy control, the most widely used AND operators are the Zadeh AND operator and the product AND operator. Using other types is rare. For any specific fuzzy controller, it is customary to employ only one type of AND operator for all the fuzzy rules. The reason is perhaps to keep fuzzy rules and hence controllers simple. Theoretically, a mixture of different fuzzy AND operators may be used in different fuzzy rules and/or in a fuzzy rule if three or more input variables are involved.
2.6.3. Fuzzy Inference The membership values produced by fuzzification are first combined by fuzzy logic AND operation in the rule antecedent. The result is then related to the (singleton) output fuzzy set by fuzzy inference (Fig. 2.1). The most popular inference method in fuzzy control is the Mamdani minimum inference method. As pointed out in Chapter 1, the four common inference methods produce the same inference result if the output fuzzy set is singleton. For the four fuzzy rules (2.19) to (2.22), using the Zadeh fuzzy logic AND operator and anyone of the four inference methods yields the following inference results: JlZt = min(JlA 1 (e(n*)), JlB_ 1(r(n*))) = min(0.2, 0.5) = 0.2 for h(l, -1), JlZ2 = min(JlA 1 (e(n*)), JlBo(r(n*))) = min(0.2, 0.3) = 0.2 for h(1,0), JlZ3
= min(JlA
2(e(n*)),
JlB_1(r(n*))) = min(0.6, 0.5)
= 0.5
JlZ4 = min(JlA2(e(n*)), JlBo(r(n*))) = min(0.6, 0.3) = 0.3
for h(2,-I), for h(2,0).
If the product fuzzy logic AND operator is used instead, the inference results will be: Jlpt
= JlA 1(e(n*))
Jln = JlA 1(e(n*)) JlP3 = JlA2(e(n*)) Jlp4
= JlA
2(e(n*))
= 0.2 x 0.5 = 0.1 x Jl.Bo(r(n*)) = 0.2 x 0.3 = 0.06 x Jl.B_1(r(n*)) = 0.6 x 0.5 = 0.3 x Jl.Bo(r(n*)) = 0.6 x 0.3 = 0.18 x JlB_ 1(r(n*))
for h(l, -1), for h(I,O), for h(2,-I), for h(2,0).
Conceptually, anyone of these inference results may be thought as the singleton output fuzzy set weighted (or scaled) by the membership value combined by the fuzzy logic AND operation. If output fuzzy sets in some rules are the same, fuzzy logic OR operation is sometimes used to combine the memberships. This step, however, is not essential; many fuzzy controllers
24
Chapter 2 •
Introduction to Fuzzy Control and Modeling
can function properly without it. We will investigate both cases in this book. The commonly used types are the Zadeh fuzzy logic OR operator and the Lukasiewicz fuzzy logic OR operator. We now demonstrate the calculation by continuing the above example. Suppose that rules (2.20) and (2.21) employ the same singleton fuzzy set. This is to say, suppose that we let h(I,O) = h(2,-I). Subsequently, we need to combine the two membership values, and the outcomes are membership values for h(l, 0) (equivalently for h(2,-I)): (1) if the Zadeh fuzzy logic OR and AND operators are used, J.lZORl = max(J.lz2,J.lz3)
= max(0.2,0.5) = 0.5;
(2) if the Zadeh fuzzy logic OR operator and the product fuzzy logic AND operator are used, J.lZOR2
= max(J.ln,J.lP3) =
max(0.06,0.3)
= 0.3;
(3) if the Lukasiewicz fuzzy logic OR operator and the Zadeh fuzzy logic AND operator are used, J.lLORI
= min(J.lz2 + J.lz3,1) =
min(0.2
+ 0.5,1)
= 0.7;
(4) if the Lukasiewicz fuzzy logic OR operator and the product fuzzy logic AND operator are used, J.lLOR2 = min(J.ln
+ J.lp3,1) =
min(0.06
+ 0.3,1)
= 0.36.
2.6.4. Defuzzification The membership values computed in fuzzy inference are finally converted into one number by a defuzzifier. The most prevalent defuzzifier is the centroid defuzzifier. In the following example, calculations with the centroid defuzzifier, we assume, without losing generality, h(I,-I) = 10, h(l,O) = h(2, -1) = 5, h(2,0) = 8, K u = 1, and K~u = 1. If the Zadeh fuzzy logic AND and OR operators are used, the defuzzifier output at time n* is
U(n*)
= K, Ilzl ·h(1, -I) + IlZORl ·h(1,O) + IlZ4 ·h(2,O) = J.lzl
+ J.lZORl + J.lz4
6.9,
(2.23)
where K u is an output scaling factor for u(n). The defuzzification result is the same if L\u(n) is employed in the rule consequent: One only needs to replace U(n*) by L\U(n*) and K u by K~u, a scaling factor, in the above equation. Using K~u is for notational consistence. If the product fuzzy logic AND operator and the Zadeh fuzzy logic OR operator are employed by the fuzzy rules,
U(n*) = K; Ilzl ·h(I,-I) + IlZOR2 ·h(I,O) + IlZ4 ·h(2,O) = 7.375. J.lzl
+ J.lZOR2 + J.lz4
(2.24)
Defuzzification results for the other two combinations of fuzzy logic AND and OR operators in the last section can easily be obtained. As said earlier, not all fuzzy controllers use fuzzy logic OR operations to combine the membership values for the like output fuzzy sets. Some fuzzy controllers use the membership
N
(II
fuzzy rule (2.22)
fuzzy rule (2.21)
fuzzy rule (2.20)
fuzzy rule (2.19)
E(n)
..
~
B.
o
<
1 0 .2
r--"-
I
- -
R(n)
~
-
~- ---- - - ----
I
! _ _--- -----~ -
jjo
5
-'"
I
8
10
II I ~~ ~ II ~~.__.ra]. I
!
I
Figure 2.4 A graphical description of the fuzzy controller example to show concretely how fuzzification, fuzzy inference, and defuzzification operations WOIK.
E(n*)=2.4
I
I
7r\
"
0.2 1
._-_.._----------_..
I
~-----_._._~~-~~---~-j
u(n)
h(I,O) h(2,-I) h(2,O) h(i.-I)
Chapter 2 •
26
Introduction to Fuzzy Control and Modeling
values from individual rules directly in defuzzification. Continuing the above example and assuming the Zadeh fuzzy logic AND operation is involved, we have U(n*) = K
u
J.lZI
·h(1,-l) + P.Z2 ·h(l,O) + J.lZ3 ·h(2,-1) + J.lZ4 ·h(2,O) Jlzl
+ JlZ2 + Jlz3 + JlZ4
= 6.583.
U(n*) is the new output of the fuzzy controller at time n*. It is applied to the system to achieve control. If the defuzzification result is JiU(n*) instead of U(n*), the new fuzzy controller output should be U(n*)
= U(n* -
1) + ~U(n*),
where U(n* - 1) is fuzzy controller output at time n" - 1. Throughout this book, we always use U(n) and ~U(n) to represent, respectively, scaled output and scaled incremental output of a fuzzy controller. The fuzzification, fuzzy inference and defuzzification operations are repeated in every sampling period. That is, through a step-by-step example, we have shown how a typical fuzzy controller works. Figure 2.4 provides a graphical description of these steps. Thus far, we have described each and every step of how a fuzzy controller computes new output from the input variables. These steps merely constitute a procedure and are numerical only. In comparison with conventional controllers, what is lacking is the explicit structure of the fuzzy controller behind this procedure that relates input variables to output variable. As it is, this fuzzy controller is a black box and is analytically unknown. It produces an output signal after an input signal is fed. Revealing the analytical structure of various fuzzy controllers in relation to classical controllers is one of the most important tasks in this book.
2.7. TYPICAL MISO MAMDANI FUZZY CONTROLLERS We now generalize the above SISO fuzzy controller to typical MISO fuzzy controllers whose structure is shown in Fig. 2.5. Structurewise, it is the same as the SISO fuzzy controller (Fig. 2.1), except more input variables are involved. Assume there are M input variables, xj(n), which represent different physical variables and their derivatives (e.g., temperature, pressure, speed, velocity, and acceleration). Every
Figure 2.5 Structure of a typical MISO Mamdani fuzzy controller.
27
Section 2.7. • Typical MISO Mamdani Fuzzy Controllers
variable is scaled by a scaling factor, and the result is denoted as Xj(n). Suppose that Pi input fuzzy sets are used to fuzzify Xj(n). The total number of fuzzy rules is (2.25) The number of fuzzy rules grows very quickly with the increase in the number of input variables. It can be quite large even for a relatively small amount of input variables and input fuzzy sets. For example, if M = 4 and Pi = 3, n = 256. The input fuzzy set for Xj(n) in thejth fuzzy rule can be represented by AI..' where I iJ is an integer index whose range is determined by the number of fuzzy sets for X';(n). The jth rule is: IF Xl (n) is A]I,}. AND ... AND XM(n) is A]M,}.
THEN u(n) (or ~u(n)) is h(Il,j' · .. ,IMJ)
(2.26)
where h(Il,j' ' IM,j) represents a singleton output fuzzy set that is nonzero only at u(n) = h(Il,j' ,IM,j) or at ~u(n) = h(Il,j' ... ,IM,j). Suppose that after fuzzification, fuzzy logic AND operations, and fuzzy inference using anyone of the fuzzy inference methods in Table 1.1, the combined membership value from the antecedent of the jth rule is Jlj(x, A), where x is a vector containing _all the M input variables and A is a vector involving all the input fuzzy sets. We use Jlj(x, A) to signify the fact that the combined membership value is a function of all the input variables and input fuzzy sets. Then, after defuzzification by using the generalized defuzzifier, output of the fuzzy controllers at time n is
n
_
LJ.lj(x,A).h(IlJ,··· ,IMJ) '-I U(n) (or L\U(n)) = K u Jn · LJlj(x,A)
(2.27)
j=l
Although the summation is from 1 to Q, only a small number of Jlj(x, A) is actually nonzero at any sampling time. K u should be replaced by K Au if the left side of the equation is IiU(n).
r---------------------------------------------------Typical SISO TS I~ controller
De~ red output trafclOry S(n)
r__--_
,+ I I
~--
-------------------------------~-----------------
Figure 2.6 Structure of a typical SISO TS fuzzy control system.
Chapter 2 • Introduction to Fuzzy Control and Modeling
28
If fuzzy logic OR operations are used to combine memberships for the same output fuzzy sets in all the fuzzy rules, the result is ti1(n) 1!1embers~ip values, denoted as [J,j(x, A), for 1D'(n) distinctive singleton output fuzzy sets, h(II,j' ... ' IM,j). Here, I iJ is a new index, j = 1, ... ,1D'(n) and 1D'(n) :::; Q. We use the notation 1D'(n) to signal that the number of distinctive output fuzzy sets may be different at different times. The defuzzifier output is m(n)
L
U(n) (or aU(n» = K u
j-l
_"
"
[J,j(x, A)· h(II,j' · · . ,IM,j) m(n)
L
j=l
_
•
(2.28)
iJ.j(x, A)
2.8. TYPICAL MISO AND 81S0 TS FUZZY CONTROLLERS The structure of typical SISO TS fuzzy controllers is depicted in Fig. 2.6. It is similar to, but not the same as, the structure of the typical SISO Mamdani fuzzy controllers, shown in Fig. 2.1. There are four differences between the Mamdani and TS structures. First, TS fuzzy controllers do not use scaling factors for input and output variables. The scaling is implicitly achieved by the TS rule structure: each input variable is multiplied by a coefficient in the consequent of every fuzzy rule. The coefficient is not specifically used for scaling, but part of its effect can be imaged as scaling. The second difference is that TS fuzzy controllers use the (linear) functions of input variables as the rule consequent, whereas Mamdani fuzzy controllers use fuzzy sets. Third, TS fuzzy controllers do not need to use fuzzy logic OR operators in fuzzy rules because there are no identical rule consequent. Finally, TS fuzzy controllers have only one fuzzy inference method to use. In comparison, many choices exist for Mamdani fuzzy controllers. The structure of MISO TS fuzzy controllers is almost the same as that of the SISO controllers, with the major difference being more input variables. We now introduce their operation, which contains SISO controllers as a special case. The operation is the repeated cycle of the same three steps executed by Mamdani fuzzy controllers: fuzzification, fuzzy inference, and defuzzification. TS fuzzy controllers use the same fuzzification as Mamdani fuzzy controllers do. Assuming that TS fuzzy controllers use Q fuzzy rules with linear consequent (0 is defined in (2.25», we find that the jth rule is IF Xl (n) is
AI
I,}
AND ... AND xM(n) is AIM,j.
THEN U(n) (or aU(n»
= Qj + QljXI(n) + ·· · + QMjxM(n)
(2.29)
where Qj and Qij are constant parameters. TS fuzzy controllers combine the membership values in the antecedent in the same way as the Mamdani fuzzy controllers do and use the same common fuzzy logic AND operators. However, TS fuzzy controllers do not use the fuzzy logic OR operation to combine membership values from different rules, for there are no identical rule consequent to begin with. Suppose that after fuzzification and the fuzzy logic AND operation, the combined membership for !!te consequent of the jth rule is Jlj(x' A). TS fuzzy controllers simply use the product of Jlj(x, A) and the linear function in the rule consequent as the fuzzy inference result
Section 2.9. • Relationship between Fuzzy Control and Conventional Control
29
for the jth rule. After defuzzification by, say, the generalized defuzzifier, output of the TS fuzzy controllers is
n
_
:E Jlj(x, A)(aj + a1jx l (n) + .··+ aMjxM(n))
j-l
U(n) (or AU(n)) = - - - - - - - 0 - - - - - - -
:E Jlj(x, A)
n
_
j=1
M
:E Jlj(x, A)(aj + :E aijxi(n)) j=1 i=1 =--n --_ ---
(2.30)
:E Jlj(x, A)
j=1
Again, at any specific sampling time, many rules are not activated because of zero membership values of input fuzzy sets after fuzzification. What rules are executed depends on the values of input variables as well as the definitions of input fuzzy sets. The TS fuzzy rule (2.29) reduces to the Mamdani fuzzy rule (2.26), if(l) aij = 0 for all i and j, and (2) aj = h(I1,j' ... , IM,j) for all j, where h(I1,j' ... ,IM,j) represents singleton fuzzy sets. That is to say, a Mamdani fuzzy rule with singleton output fuzzy set is a special type of TS rule.
2.9. RELATIONSHIP BETWEEN FUZZY CONTROL AND CONVENTIONAL CONTROL To the seemingly simple question "What is fuzzy control?", people with different technical backgrounds offer different answers. Computer AI scientists often think that fuzzy control methodology can emulate human knowledge and experience because fuzzy sets, fuzzy logic, and fuzzy rules capture and represent the essence of human expertise. Control engineers see fuzzy control as a form of "intelligent" control and hence consider it to be superior to conventional control in certain aspects. Practitioners in industry view fuzzy control as a powerful and cost-effective means to solve complicated real-world control problems rather effectively. Our answer is from the viewpoint of conventional control technology, and it reveals the nature of fuzzy control in relation to conventional control. According to the mathematical representations of the Mamdani fuzzy controllers in (2.27) and the TS fuzzy controllers in (2.30), it should be clear that fuzzy control does nothing but generate nonlinear mapping, from input variables to output variable(s). Simply put, fuzzy control is nonlinear control; a fuzzy controller is a nonlinear controller. Moreover, fuzzy control is nonlinear variable structure control. Take the SISO Mamdani fuzzy controller described in Section 2.6 as an example. In fuzzification, the question of which input fuzzy sets will yield nonzero membership values depends on the values of e(n) and r(n), which in turn decide which fuzzy rules will be activated in fuzzy inference. This is to say, the input and output fuzzy sets used in defuzzification will vary as the values of e(n) and r(n) change from one sampling time to another. These time-dependent changes of the controller structure make the fuzzy controllers nonlinear variable structure controllers. This assessment may seem to be loose, superficial, and qualitative. We will prove it using rigorous mathematics later in the book. By the same token, MISO TS fuzzy controllers described in (2.30) are also nonlinear variable structure controllers.
30
Chapter 2 • Introduction to Fuzzy Control and Modeling
2.10. FUZZY CONTROL VS. CLASSICAL CONTROL 2.10.1. Advantages of Fuzzy Control The biggest advantage of fuzzy control is that it provides an effective and efficient methodology for developing nonlinear controllers in practice without using highly advanced mathematics. Making a fuzzy controller requires describing human control knowledge/ experience linguistically and captures them in the form of fuzzy sets, fuzzy logic operation, and fuzzy rules. Fuzzy control can be used to emulate human expert knowledge and experience; it is ideal for solving problems where imprecision and vagueness are present and verbal description is necessary. Unlike the traditional mathematical model-based controller design methodology, fuzzy control does not need an explicit system model. Rather, a system model is implicitly built into fuzzy rules, fuzzy logic operation, and fuzzy sets in a vague manner. Fuzzy rules relate input fuzzy sets describing state variables of the system, for example, e(n) and r(n), to fuzzy controller output. In this sense, fuzzy control combines the system modeling task and the system control task into one task. By avoiding a separate modeling task, which can be much more challenging than the control task in many nonlinear situations, control problems can usually be solved more efficiently and effectively. Countless applications of fuzzy control around the world have proved this point. Conventional nonlinear control is powerful if the nonlinear system model is mathematically available. As is well known, however, accurately establishing a nonlinear system model is generally difficult because correct identification of nonlinear system structure is not easy. This significantly limits the application scope of nonlinear control. Fuzzy control has also created a paradigm for developing nonlinear and multiple-input multiple-output (MIMO) controllers without using complicated and sophisticated linear/nonlinear control theory and mathematics. This is in sharp contrast to conventional control technology, especially the nonlinear one. By manipulating various components of a fuzzy controller, such as the scaling factors, fuzzy sets, and fuzzy rules, coupled with computer simulation and trial-and-error effort, a noncontrol professional can often build a rather wellperforming fuzzy controller. This advantage makes fuzzy control practical and powerful in solving real-world problems, and it explains why fuzzy control has been especially popular in industry. A number of excellent fuzzy system development software packages, including MATLAB Fuzzy Logic Toolbox™, Mathematica Fuzzy Logic™, FuzzyTech™, TILShell™, and SieFuzzyTM, are on the market to facilitate the development tasks.
2.10.2. Disadvantages of Fuzzy Control From the conventional control standpoint, the advantages of fuzzy control come with a price, at least at this stage of the technology. After all, nothing is perfect, and everything has two sides. First, fuzzy controllers have often been used as black-box controllers. In many applications, fuzzy control users were satisfied once trial-and-error effort produced satisfactory control performance. Rigorous or analytical investigation was often not pursued or simply ignored. As stated earlier, fuzzy control is nonlinear variable structure control. As such, deriving their analytical structures (see (2.27) and (2.30» should be the first step for analytical study. Yet, even this step is very difficult and is frequently impossible. Indeed, for many fuzzy controllers, especially those involving complicated fuzzy sets, numerous fuzzy
Section 2.11. •
When to Use Fuzzy Control
31
rules, and multiple input variables, the task can be extremely difficult. Without an accurate mathematical structure of a fuzzy controller, precise analysis and design of a fuzzy control system in the spirit of conventional control are technically difficult, if not impossible. This is true even when a system model is mathematically available. None of the existing fuzzy system development software packages can help in this regard either, for they share a common flaw-the lack of analytical capabilities. They are unable to derive analytical structure of a fuzzy controller, let alone mathematically design a system and determine its stability or any other system properties. Second, a fuzzy controller usually has far more design parameters than a comparable conventional controller. To make matters worse, learning how to construct a good fuzzy controller is, to a large extent, more an art than a science. Subsequently, fuzzy control design may require more tuning and trial-and-error effort. Compared to the industrially dominant PIn control that has only three design parameters, the number of design parameters for a fuzzy controller can become overwhelmingly large. They range from the number and shape of input and output fuzzy sets, scaling factors, fuzzy AND and OR operators to fuzzy rules to defuzzifier. Worse yet, there are no clear relationships between these parameters and the controller's performance. At present, developers must partially rely on empirical rules of thumb and ad hoc procedures in the literature to make successful fuzzy control applications. Although a great deal of such knowledge exists, it is not sufficient, especially for fuzzy control novices. Fuzzy controllers are nonlinear controllers. As such, the generality of the knowledge is rather limited. Any design and/or tuning procedure can hardly be generalized to cover a broad range of fuzzy control problems. As a result, trial-and-error effort and extensive computer simulation are often necessary. Neither stability nor performance of the fuzzy control system under development can rigorously be guaranteed. This empirical approach, though effective for some applications, is impractical and unsafe for applications in some fields, such as aerospace, nuclear engineering, and, particularly, biomedicine. These two drawbacks of fuzzy control are inherent. They are quite serious, especially in comparison with conventional control technology. Nevertheless, they are moderate and reasonable tradeoffs for the biggest advantage of fuzzy control---eontrol without mathematical system model. Furthermore, these two major problems are at least partially solvable and have been resolved to a certain degree. We show the resolutions starting in the next chapter.
2.11. WHEN TO USE FUZZY CONTROL 2.11.1. Two Criteria Literally a countless number of different types of systems exist in practice. Hence, as with any control technologies, the applicability of fuzzy control must be well defined, which apparently relates to the strengths and limitations of fuzzy control examined in the last section. Fuzzy control is most desirable if (1) the mathematical model of the system to be controlled is unavailable but the system is known to be significantly nonlinear, time-varying, or have time delay, and/or (2) PID control cannot generate satisfactory system performance. Given the strengths of fuzzy control, the first criterion is natural and logical. We need to stress the second criterion, however. It is practically important to know whether PIn control can solve the control problem of interest before fuzzy control is attempted. PID controllers have been used to control about 90% of all industrial processes worldwide [51]. PID control techniques are well-developed, and numerous control system design and gain tuning methods have been developed (e.g., [10][11][185]). When the system to be controlled is linear and its
32
Chapter 2 •
Introduction to Fuzzy Control and Modeling
mathematical model is available, design and implementation of linear PID control is effective and efficient. Note that using PID control does not necessarily require a system model. In the absence of such a model, one can still achieve satisfactory PID control performance by manually tuning, in a trial-and-error fashion, the proportional-gain, integral-gain, and derivative-gain. This is true if the system is linear or somewhat nonlinear. Better yet, there exist many different types of PID controllers. The most commonly used one is the linear PID controller, but often nonlinear ones, such as the anti-windup PID controller, are also employed. Properly adding nonlinearity to linear PID control can lead to desirable nonlinear control effect. Time has already proved that PID control, though simple, is effective and can produce satisfactory results quickly for the majority of control problems, especially those in process control. This is the case even when the system of interest is nonlinear, time-varying, or associated with time delay, as long as they are not too severe. Moreover, PID control is still an area of active research at present. Many theoretical and empirical results in the literatures have dealt with various aspects ofPID control systems, including system analysis and design.
2.11.2. Applicability of Fuzzy Control Fuzzy control should be used, if at least one of the two criteria holds. This is the case even if control expert knowledge and experience are unavailable. Practically speaking, one may achieve satisfactory fuzzy control of nonlinear systems through extensive computer simulation and trial-and-error effort without expert knowledge. Utilizing available expert knowledge/experience can reduce development cost and time, particularly when the system is rather complex. But this is not a prerequisite for using fuzzy control. Even when the system of interest is nonlinear, time-varying, or associated with time delay and its model is explicitly given, it is often still advantageous to apply fuzzy control, provided that designing an adequate nonlinear controller is difficult. Unlike linear control theory, there is no general nonlinear control and system theory universally applicable to any nonlinear, time-varying, or time-delay systems. When the nonlinear system of interest is complicated, or a MIMO one, classical control may be ineffective or even unusable. Furthermore, many of the existing nonlinear control techniques require highly sophisticated control and mathematics background, such as differential geometry. They are inaccessible to many engineers in the field.
2.11.3. When to Avoid Fuzzy Control Fuzzy control should not be employed if the system to be controlled is linear, regardless of the availability of its explicit model. For linear systems, use of fuzzy control has no advantage. PID control and various other types of linear controllers can effectively solve the control problem with significantly less effort, time, and cost. Similarly, fuzzy control should be avoided ifthe system of interest is nonlinear, time-varying, or associated with time delay, but PID control can yield satisfactory control results. In summary, PID control should be tried first whenever possible. Fuzzy control becomes a choice only after PID control fails or PID control is not applicable in the first place.
Section 2.12. • Analytical Issues in Fuzzy Control
33
2.12. ANALYTICAL ISSUES IN FUZZY CONTROL 2.12.1. Brief Background The fuzzy controllers before the mid-1980s or so differed fundamentally from the typical ones described in this chapter as well as those in the more recent literature. They used fuzzification, fuzzy rules, and defuzzification. However, only discrete input and output fuzzy sets were used, and fuzzy rules were converted to a discrete fuzzy relation. At every sampling time, discrete output fuzzy sets were inferred from discrete input fuzzy sets using the fuzzy relation. The result was then defuzzified. Thus, it was impossible to analytically analyze and design fuzzy control systems in the spirit of conventional control theory. Back then, fuzzy controllers and fuzzy systems were studied in an approximate manner and often through computer simulation. Because of the flaws and limitations of the methodology, the results were not comprehensive and were inconclusive. Some results were even incorrect. Nevertheless, the importance of fuzzy control system analysis and design had been clearly recognized shortly after the first fuzzy controller was developed in 1974. A few investigations were launched, and several results were obtained. Few of them were rigorous, however. One result related, in a crude fashion, the fuzzy controller to multilevel relay control [99]. Other results determined the behavior and performance of the low-order fuzzy control systems using the phase plane analysis technique [16] and describing function technique [99]. The phase plane technique is useful only to first- or second-order systems, whereas the describing function method is approximate and is also limited to lower order systems. The circle stability criterion was applied to systems associated with fuzzy controllers using the concept of sector bound nonlinearity [178]. In addition, the concept of L 2 -stability was utilized for fuzzy control systems [177]. The invariance principle was used for judging the stability of the continuous-time fuzzy systems [50]. Other fuzzy system analysis results include [46][96][105][212]. The intention here is not to list the early results completely. For more comprehensive information on analysis and design of fuzzy (control) systems before 1985, the reader is referred to the survey papers [195][211]. Another review paper was published in 1990 [120], and it also contained excellent introductory materials for fuzzy control systems. To the best of our knowledge, these three papers are the only ones covering fuzzy (control) system development prior to 1990. An annotated bibliography offuzzy control is provided in [213]. During the middle and late 1980s, fuzzy inference methods commonly used nowadays in fuzzy control and systems started to gradually replace the fuzzy relation operation, paving the way for rigorous, analytical investigation. The first results that analytically linked fuzzy control to conventional control were achieved by the present author in 1987; some Mamdani fuzzy controllers were proved to be linear PI controllers or nonlinear PI controllers with variable gains [246]. (The results were presented at the 1988 NASA Conference on Artificial Neural Systems and Fuzzy Logic [249] and published in the journal [251].) The mathematical derivations were carried out without any approximations, and thus the results were rigorous. The analysis method and results achieved from these early studies are applicable to a wide range of fuzzy controllers, as the reader will see in Chapters 3-5. In the past 10 years or so, many investigators around the globe have helped resolve analytical issues in fuzzy control, as evidenced by the bibliography in this book. So much progress has been made that a separate field of analytical theory of fuzzy control is emerging. This analytical trend is clearly evidenced by the fact that the majority of the more recent
Chapter 2 •
34
Introduction to Fuzzy Control and Modeling
studies of fuzzy control and systems contain mathematical analysis. Computer simulation is still used, but its role is less important. The survey paper [35] provides a more recent review of analytical analysis and design of fuzzy Pill controllers in relation to conventional Pill control.
2.12.2. Significant, Inherent Difficulties for Analytical StUdy of Fuzzy Control In conventional control, once determined by the controller developer according to the system to be controlled, the analytical structure of the controller, linear or nonlinear, is always readily available for analysis and design of the control system. Hence, the technical difficulties lie in determining the controller structure and parameters on the basis of the given system model so that the designed control system performance will meet the user's performance specifications. For fuzzy control, in addition to these difficulties, there are at least two more major difficulties pertinent only to fuzzy control and irrelevant to conventional control. The first primary difficulty is that the analytical structure of a fuzzy controller is usually unavailable after it is constructed. Without the structure, meaningful analytical analysis and design cannot even be initiated. Revealing the structure, however, is not an easy task. The second major difficulty has something to do with whether fuzzy control can provide an approximation solution to any continuous nonlinear control problems with as high an approximation accuracy as one desires. Conventional control does not suffer from either issue because the controller structure is always known or designed and the structure of a designed controller can, in theory, be any function, be it linear, nonlinear, time-varying, continuous, or discontinuous. Because of these two additional difficulties, studying fuzzy control is inherently more technically challenging.
2.12.3. Analytical Issues It is well-documented that fuzzy control is effective in solving complicated control problems in practice. A logical question is: Why is this the case? Is there anything special about fuzzy controllers that makes them behave so well? Do fuzzy controllers work well because their structures are peculiar? What are their structures then? Some publications claim that fuzzy controllers are more robust than conventional controllers, including the linear PID controller. These claims are supported by limited computer simulation only and are without mathematical proof: Are these claims real? How can the claims be validated? Other important questions include how to theoretically determine the stability of fuzzy control systems and how to design fuzzy control systems with as little trial-and-error effort as possible. Many more questions along these lines can be asked. After all, fuzzy control is nonlinear control, and as such all the questions relevant to nonlinear control are generally applicable to fuzzy control. None of these questions is technically easy to answer, and they warrant serious research. Analytical exploration is absolutely necessary in order to provide conclusive and convincing answers. The foremost issue is revealing the analytical structure of fuzzy controllers in such a way that the resulting structure is sensible in the context of conventional control theory. This is to say that merely deriving the structure is not useful enough and the structure must be represented in a form that is clearly understandable from the control theory standpoint. Once
Section 2.13. • Fuzzy Modeling
35
the structure is well understood, analytical issues, including those listed above, can be explored using the well-developed conventional control theory.
2.13. FUZZY MODELING Fuzzy models are dynamic, not static (i.e., algebraic) system models. In this book we use fuzzy model and fuzzy dynamic model interchangeably. We only cover discrete-time fuzzy modeling, for measurement data are always discrete in computers. As mentioned above, fuzzy models are classified as Mamdani type and TS type, depending on the type of fuzzy rules used.
2.13.1. Mamdani Fuzzy Model Loosely speaking, the MISO Mamdani fuzzy controller discussed in Section 2.7 is converted to a SISO Mamdani fuzzy model if (1) the scaling factors are not used, (2) both input variables and output variables are fuzzified by non-singleton fuzzy sets, and (3) different input and output variables are used in fuzzy rules. Many fuzzy models use singleton fuzzy sets in the rule consequent, as illustrated by the following example that is assumed to be the jth rule: IF y(n) is Azo,}. AND y(n - 1) is AIt,}. AND ... AND y(n - m) is Al
. p) is BJ m.]
AND u(n) is
B.J. . AND u(n o,}
1) is BJ t,}. AND ... AND u(n -
.
P,}
(2.31)
THEN y(n + 1) is h(Io,j' ... , Im,j' JO,j' ... , Jp,j)
°
where u(n - l), ~ l ~ p, and y(n - i), -1 ~ i ~ m, are the system's input and output variables at sampling times n - l and n - i, respectively. Here, i, l, m, and p are integers. In the rule consequent, h(Io,j' ... ' Im,j' JO,j' ... ,Jp,j) represents a singleton fuzzy set. The meanings of the remaining symbols are similar to those in Section 2.7 and are selfexplanatory. Fuzzy logic AND operators in the rules can be any types, including the Zadeh type and product type, which are commonly used in fuzzy control. Fuzzy logic OR operation is generally not used in fuzzy modeling. The total number of fuzzy rules needed is
m+p+2 Q=
Il
i=1
Pi'
where PI fuzzy sets are used for fuzzification of y(n), P 2 for y(n - 1), and so on. Using any one of the fuzzy inference methods presented in Table 1.1 and the generalized defuzzifier, we can describe a SISO Mamdani fuzzy model by n _ _ L J-Lj(y, u, A, B)· h(Io,j' ... ,Im,j' Jo,j' ... ,Jp,j) O_} y(n+l)=Jn (2.32)
LJlj(y, u,A,B)
j=1
where y is an output vector containing y(n - i), i = 0, ... ,m, and u is an input vector comprising u(n - l), l = 0, ... .p. Vector A and B embrace fuzzy sets denoted as AJ. . and ',} BJe.:., respectively, in all rule antecedents.
Chapter 2 •
36
Introduction to Fuzzy Control and Modeling
2.13.2. TS Fuzzy Model
The above Mamdani fuzzy model becomes a TS fuzzy model if we change the rule consequent of the jth Mamdani rule (2.31) to that of the jth TS rule, as follows: IF y(n) is AI.O,J. AND y(n - 1) is AII,J. AND ... AND y(n - m) is Al
.
m.]
AND u(n) is OJ,O,J. AND u(n - 1) is OJI,J. AND ... AND u(n - p) is OJP,J. THEN y(n
+ 1) =
Qj
+ QOjy(n) + ... + Qmjy(n -
m) + boju(n)
(2.33)
+ ... + bpju(n
- p).
Based on (2.32), it is obvious that a SISO TS fuzzy model is expressed as n
_ _
(m + ~ Qijy(n -
~ J-lj(y, u, A, B) Qj
) = ( yn+1
J=l
n
1=0
i)
p
+L
l=O
b1ju(n - l)
L J-lj(y, u, A, B)
)
.
(2.34)
j=l
2.13.3. Relationship between Fuzzy Model and Fuzzy Controller
By comparing (2.32) with (2.27) and (2.34) with (2.30), one sees that the structures of fuzzy models and fuzzy controllers are very much alike. This should not be surprising. After all, conceptually a fuzzy controller is also a fuzzy model-a model of the controller in the mind of the human control expert/operator. The SISO fuzzy models can be generalized to MISO fuzzy models. Because SISO fuzzy models are most commonly used due to their practicality, we will only study the issues related to SISO fuzzy models in this book. The results can be extended to cover MISO fuzzy models. 2.14. APPLICABILITY AND LIMITATION OF FUZZY MODELING
A fuzzy model initially constructed on the basis offuzzy sets, fuzzy logic, and fuzzy rules can be tuned by adjusting the fuzzy sets and fuzzy rules, in terms of number and shape, along with adjustment of other components until it mimics satisfactorily the measured input-output relationship of the system. The adjustment can be carried out either manually or automatically by some nonlinear optimization techniques, including genetic algorithms (e.g., [73]). The optimization is needed not only for model parameters but also for model structure inasmuch as changing the system components (e.g., fuzzy sets and fuzzy rules) causes change of model structure. Nevertheless, the extent to which this benefit of fuzzy modeling can be realized in practice depends on applications. In some cases, it is difficult to capture and represent human expertise and knowledge in the form of fuzzy sets, fuzzy logic, and fuzzy rules. This is especially the case when human expertise and knowledge of the physical system is nonexistent or is inaccessible. Furthermore, optimal adjustment of fuzzy model components against given measured input-output data of the system is easier to talk about than to do. There are many adjustable model parameters and structure components (e.g., number and shape offuzzy sets, fuzzy rules, fuzzy logic AND operators, and defuzzifier). Avoiding being trapped in a local minimum during the optimization is difficult and can lead to a poor model.
Section 2.16. • Summary
37
Like the conventional black-box models, fuzzy models are also black-box models. Unlike their conventional counterparts, however, the explicit structure of fuzzy models is usually unknown. (This problem is the same as fuzzy controllers.) In this regard, fuzzy models are worse than the conventional ones, for the structure of the conventional is preselected and hence is always explicitly known. Nevertheless, with significant effort, deriving the analytical structure of some fuzzy models is possible. Moreover, because of the similarity between fuzzy models and fuzzy controllers, much of the mathematical results on fuzzy controllers can be extended directly to the corresponding, comparable fuzzy models. More work is needed in this direction. 2.15. ANALYTICAL ISSUES IN FUZZY MODELING In summary, fuzzy modeling is theoretically attractive and has potential for practical
usefulness. Compared to fuzzy control, fuzzy modeling has been used much less so far. More theoretical studies are needed to reveal fuzzy model structures and to solve difficult analytical issues before this modeling methodology can become powerful, effective, and efficient. Some of the major analytical issues are listed as follows. (The fuzzy models referred to herein are those described in (2.32) and (2.34) and their minor variants.) 1. For any given nonlinear physical system, does a fuzzy model always exist that can approximate the physical system with as high an approximation accuracy as desired? 2. What are sufficient and/or necessary conditions for a fuzzy model to achieve such universal approximation? 3. Which type of fuzzy models is more economical in terms of system configuration, Mamdani type or TS type? 4. What is the relationship between the fuzzy models and the conventional models such as the ARX model? 5. What are the explicit structures of various fuzzy models? 6. How does one analytically evaluate the quality of a fuzzy model? For instance, how does one determine the stability of a fuzzy model? 7. Once a fuzzy model is satisfactorily developed, how can it be used in designing a controller, fuzzy or conventional, to achieve system output tracking of arbitrary trajectory? In this book, we will study these issues rigorously in an analytical manner.
The preceding list is by no means complete. Other major issues require the attention and effort of the fuzzy system community. 2.16. SUMMARY The two major types of fuzzy controllers and models are the Mamdani type and the TS type. Through an example of a SISO Mamdani fuzzy controller, we show, step by step, how a typical fuzzy controller works. The coverage is then extended to more complicated fuzzy controllers and models. Structural and mathematical similarities between fuzzy control and fuzzy model are revealed. Fuzzy control and fuzzy modeling paradigms have set up a unique platform on which nonlinear controllers and nonlinear models can be developed using both qualitative informa-
38
Chapter 2 •
Introduction to Fuzzy Control and Modeling
tion and numerical measurements instead of numeric data alone. From the practice viewpoint, the fuzzy techniques are easier to master, which may explain their popularity among engineers, technicians, and researchers, especially those in industry. Nevertheless, fuzzy controllers or models are harder to analyze and understand mathematically because they are black-box systems, unless much effort is made to decode their analytical structure. In contrast, this kind of effort is not needed for conventional controllers and models. There is little advantage in employing fuzzy control to control a linear system or in using fuzzy modeling to model a linear system. Traditional techniques can do so better and more easily. In addition, fuzzy control should not be attempted before PID control is known to fail to solve the problem in hand. There exist major, challenging analytical issues on fuzzy control and fuzzy modeling. Worldwide efforts have been made to resolve them, resulting in tremendous progress in the past 10 years or so. More advancement will certainly come in the near future.
2.17. NOTES AND REFERENCES Additional books on fuzzy control other than those cited in this chapter include [58][91][92][94][110][168][170][221][222][242]. Applications of fuzzy control are documented in [146][243]. As for papers, reading [116][120][153] should be beneficial. Fuzzy modeling is covered in books [222][240][242]. In contrast to the vast fuzzy control literature, fuzzy modeling is less well studied (e.g., [162][198][199][217]-[219][244]). Since fuzzy control is inherently nonlinear control, we recommend the textbook [191] (or [67], a harder one) to the reader for nonlinear control review or study. More in-depth treatment of nonlinear control can be found in advanced textbooks [90][98]. They are more difficult to understand, however, because they contain highly advanced mathematics. Traditional system modeling techniques can be learned or reviewed by reading the textbook [136]. (See also [60].) A more advanced textbook is [135]. The paper [187] provides a unified overview of nonlinear black-box modeling in system identification.
EXERCISES 1. Build a simple Mamdani fuzzy controller with e(n) and r(n) as input variables. Assign values to the input variables and compute the output of the fuzzy controller. 2. Replace the fuzzy rules in Problem 1 by TS fuzzy rules. Calculate the output of the new fuzzy controller for the same input values.
3. What type of fuzzy controller/model would you prefer-Mamdani type or TS type? Why? 4. Do you think constructing a well-performing fuzzy controller is an easy task? If yes, why? If no, what appear to be the hurdles?
5. In terms ofpracticality, what do you think is the single most important merit offuzzy control? What is the most serious drawback?
6. What kinds of problems are best suitable for fuzzy control and modeling as effective solutions? 7. Do you think it is sensible to employ fuzzy control to control linear systems? If yes, why? If no, what are your reasons?
Exercises
39
8. A fuzzy controller can be realized either by hardware or software. What do you think are the advantages and disadvantages of each approach in terms offlexibility, cost, performance, and so on? 9. Among the analytical issues on fuzzy control addressed in this chapter, what is the most fundamental one? Why? 10. Which analytical issue on fuzzy control would you tackle first? 11. What do you think are the most challenging tasks in an analytical study of fuzzy control? Are these tasks unique to fuzzy control in comparison with classical control? 12. If you are asked to reveal the explicit structure of a fuzzy controller, what will your concrete steps be? 13. Do the same as in Problems 1 and 2, but for a Mamdani fuzzy model and a TS fuzzy model.
14. What will your answers be, if the questions in Problems 9-12 concerning fuzzy modeling instead? 15. Can you think of any additional analytical issues that are important to fuzzy control and modeling? Do you have any concrete ideas on how to tackle them?
Mamdani Fuzzy PID Controllers
3.1. INTRODUCTION Revealing the explicit structure of various fuzzy controllers is important primarily because it provides insightful information about what a fuzzy controller is, how it works, and how it relates to and differs from a classical controller. Furthermore, the structure provides an essential platform on which the well-developed conventional control and system theory, linear or nonlinear, can be utilized to analytically analyze and design fuzzy controllers and fuzzy control systems. A fuzzy controller is not fuzzy anymore (i.e., not a black-box controller anymore) once its explicit structure is disclosed and it just becomes a conventional nonlinear controller. Given the dominance of conventional PID control in industrial control, it is significant both in theory and in practice if a controller can be found that is capable of outperforming the Pill controller with comparable ease of use. Some fuzzy Pill controllers in this chapter are quite close to this dream controller. We begin our study with an analytical structure of some simplest Pill fuzzy controllers and reveal their connections with PID control and variable gain control. Compared with other more complex fuzzy controllers, these simplest fuzzy controllers have fewer design parameters and hence are more practically useful. Although simpler in structural configuration, these fuzzy controllers are no less powerful in achieving high control performance than the more complicated ones. Theoretical analysis coupled with computer simulation involving various system models demonstrates the effectiveness and superior performance of these simplest fuzzy controllers in comparison with the comparable linear Pill controller. Understanding the structure and peculiar characteristics of these fuzzy controllers is essential because more complex fuzzy controllers, investigated in the following two chapters, possess similar structure and thus can be analyzed along the same lines.
41
Chapter 3 •
42
Mamdani Fuzzy PID Controllers
3.2. PIO CONTROL 3.2.1. Position Form and Incremental Form The continuous-time linear PID controller in position form is described by the following expression (e.g., [10]):
U(t)
= K(e(t) + ~i
J:
e(r)dr + Td
d~;))
where e(t) is the error signal defined in (2.1), with time, t, being continuous instead of discrete. K is a gain, 1'; is integration time, and Td is derivative time. The corresponding discrete-time position form is
T) T n U(n) = K ( e(n) + Ti~e(i) + ; r(n) = Ke(n)
KTn KT +r; ~e(i) + / r(n)
n
= Kpe(n) + K; L e(i) + Kdr(n)
(3.1)
;=0
where r(n) is the rate signal defined in (2.2) and Tis the sampling period. Kp, K;, and K d are the proportional-gain, integral-gain, and derivative-gain of the PID controller, respectively. The three gains are constants for the linear PIO controller. If the value of at least one of the gains varies with time, the PID controller becomes nonlinear. There are various forms of nonlinear PIO controllers. For instance, a Pill controller with an anti-windup mechanism is a nonlinear Pill controller. The above PIO control algorithms are in position form because they directly compute the controller output itself The PID controller is often used in the incremental form, which calculates change of the controller output. Note that at time n - 1, n-l
U(n - 1) = Kpe(n - 1) + K; L e(i) + Kdr(n - 1). ;=0
Hence, the incremental form of the Pill controller corresponding to (3.1) is: ~U(n)
= U(n) -
U(n - 1) = Kpr(n) + K;e(n) + Kdd(n),
(3.2)
where
den) = r(n) - r(n - 1).
(3.3)
3.2.2. PI and PO Controllers and Their Relationship In practice, full Pill control sometimes is not desired. Instead, partial PID control in the form of PI or PO control is more effective and appropriate. This is because the derivative term tends to amplify noise and hence should be avoided if the system output is rather noisy. On the other hand, the integral term can cause slower system response and larger system overshoot. It should not be included in certain applications of Pill control. For these reasons, PI control and PD control should not be merely considered as incomplete Pill control. Rather, they are controllers on their own with distinctive merits in comparison with full Pill control, and they may be viewed as separate classes of controllers. Indeed, many studies in the literature treat PI, PD, and Pill controllers separately and differently.
Section 3.3. • Different Types of Fuzzy Controllers
43
When K d is set to zero in (3.2), the Pill controller becomes a PI controller in incremental form:
AU(n) = Kpr(n) + Kie(n),
(3.4)
whereas when K, = 0 in (3.2), the Pill controller reduces to a PO controller in incremental form: (3.5) A PI controller in incremental form is related to a PO controller in position form. Letting K, = 0 in (3.1), we obtain a PD controller in position form:
U(n) = Kpe(n) + Kdr(n).
(3.6)
Now, comparing (3.6) with (3.4), one sees that the PO controller in position form becomes the PI controller in incremental form if (1) e(n) and r(n) exchange positions, (2) K d is replaced by Ki, and (3) U(n) is replaced by AU(n). Furthermore, comparing (3.4) with (3.5), we see that the PI controller in incremental form becomes a PD controller in incremental form if(l) e(n) is replaced by d(n), and (2) K, is replaced by K d • These two structural relationships between the PI and PO controllers are important for the structural and characteristic analyses of the fuzzy PI and PO controllers in this book. Analysis results developed for fuzzy PI control can directly be extended to the corresponding fuzzy PO control, and vice versa. Consequently, it suffices to study either fuzzy PI control or fuzzy PD control, but not both.
3.3. DIFFERENT TYPES OF FUZZY CONTROLLERS The following definitions apply to both Mamdani fuzzy controllers and TS fuzzy controllers.
3.3.1. Linear Fuzzy Controller and Nonlinear Fuzzy Controller A fuzzy controller is called a linear (or nonlinear) fuzzy controller if its output is a linear (or nonlinear) function of its inputs. By definition, a linear fuzzy controller is a linear controller, whereas a nonlinear fuzzy controller is a nonlinear controller. Linear fuzzy controllers are uncommon, but they do exist. The vast majority of fuzzy controllers are nonlinear. In most cases, whether or not a fuzzy controller is linear cannot be judged directly from its configuration. The explicit structure of the fuzzy controller must be derived to accurately determine its type.
3.3.2. Fuzzy PID Controller, Fuzzy Controller of PID Type, and Fuzzy Controller of Non-PID Type A fuzzy controller whose input-output relationship is linear or nonlinear PID control is defined as fuzzy PIO controller. Here, PID control can be viewed in a broader sense and covers PI and PO control. Strictly speaking, it is incorrect to call, as some literatures have done, any fuzzy controller that uses the same input variables as the conventional PID controller does a fuzzy PID controller. Many of these so-called fuzzy PIO controllers can be found to be wrongly classified, after their analytical structures are derived and examined. In
44
Chapter 3 •
Mamdani Fuzzy PID Controllers
general, caution should be exercised if one wants to call a fuzzy controller fuzzy PID controller when its analytical structure is unknown. Like linear PID control, fuzzy PID control also has a position form and an incremental form. Their definitions are the same as the respective forms of the PID control. The relationships between PI control and PO control mentioned above also hold for fuzzy PI and fuzzy PO control. More generally, a fuzzy controller is defined as a fuzzy controller of the PID type, if it can be expressed as (3.7) where Ci' 0 ~ i ~ M, can be either constant gain or variable gain changing with time. By definition, fuzzy PID control is a special case of fuzzy control of PID type when Co = 0 and M = 3. In this book, only a fuzzy controller ofPID type with at most three input variables is called a fuzzy PID controller. When more than three input variables are involved, the name "fuzzy controller of the Pill type" is used. We make this classification to reflect the special value of fuzzy PID control in fuzzy control, just like the important role that its classical counterpart plays in conventional control. If a fuzzy controller is not of the PIO type, it is simply defined as a fuzzy controller of non-PID type.
3.4. FUZZY PI/PO CONTROLLERS AS LINEAR PI/PO CONTROLLERS Although linear fuzzy controllers have little practical value, they are simpler than nonlinear ones, and their structures are easier to derive and understand. Hence, they provide an excellent stepping stone towards understanding and analysis of more complicated fuzzy controllers.
3.4.1. Fuzzy PI Controller Configuration The fuzzy controller uses two identical input fuzzy sets, namely Positive and Negative, for scaled input variables, E(n) and R(n). The fuzzy sets are shown in Fig. 3.1a. Using P and N to represent Positive and Negative, respectively, we find that the membership functions of the fuzzy sets for E(n) are 0,
Jlp(e) =
Kee(n) +L 2L 1,
E(n) < -L -L
.s E(n)
~
L
E(n) > L
and 1,
JlFl(e) =
-Kee(n) +L 2L 0,
E(n) < -L -L
.s E(n) .s L,
E(n) > L
Section 3.4. • Fuzzy PI/PO Controllers as Linear PI/PO Controllers
45
and the membership functions for R(n) are
R(n) <-L Jlp(r)
=
-L
1,
s R(n) s L
R(n) > L
and
1,
R(n) <-L
-Krr(n) +L 2L 0,
-L
~R(n) ~L
R(n) > L.
Membership Negative
Positive
1
E(n) or R(n)
o
-L
L
(a)
Membership Negative
Zero
1
Positive
~u(n)
-H
o
H
(b)
Figure 3.1 Graphical definitions of input and output fuzzy sets used by the linear fuzzy PI controller: (a) two input fuzzy sets Positive and Negative for E(n) and R(n), and (b) three singleton output fuzzy sets, Positive, Zero, and Negative.
In the definitions, L is a constant design parameter. Note that
+ JlFi(e) = 1,
for E(n) E (-00,00)
(3.8)
Jlp(r) + JlFi(r) ~ 1,
for R(n) E (-00,00).
(3.9)
Jlp(e)
Chapter 3 •
46
Mamdani Fuzzy PID Controllers
The fuzzy PI controller uses the following four fuzzy rules: IF E(n) is Positive AND R(n) is Positive THEN L1u(n) is Positive
(rl)
IF E(n) is Positive AND R(n) is Negative THEN L1u(n) is Zero
(r2)
IF E(n) is Negative AND R(n) is Positive THEN L1u(n) is Zero
(r3)
IF E(n) is Negative AND R(n) is Negative THEN L1u(n) is Negative
(r4)
where the output fuzzy sets are of the singleton type and their nonzero values are at H, 0, and -H, respectively for Positive, Zero, and Negative, as shown in Fig. 3.1b. These four rules are sufficient to cover all possible situations, as illustrated in Fig. 3.2. Rule rl covers the situation in which system output is below the setpoint and is still decreasing. Obviously, controller output should be increased. Rule r4 deals with the opposite circumstance: system output is larger than the setpoint and still rising. Naturally, controller output should be reduced. There are only two remaining scenarios: (1) system output is below the setpoint but is increasing, and (2) system output is above the setpoint but is decreasing. In either case, it is desirable to let controller output stay at the same level, hoping system output will land on the setpoint smoothly on its own. This is what rules r2 and r3 do. In evaluating the ANDs in the fuzzy rules, the product fuzzy logic AND operator is used. The results of product AND operations in the four fuzzy rules are Jlp(e)·Jlp(r)
for H,
Jlp(e)·Jlil(r)
for 0,
Jl;:,(e)· Jlp(r)
for 0,
Jl;:,(e)·Jlil(r)
for -H.
The Lukasiewicz fuzzy logic OR operation is applied to combine the membership values from rules r2 and r3, as there exists an implied OR between the two rules for the same output fuzzy set, Zero. Since Jlp(e)·Jl;:,(r)
+ Jl;:,(e)· Jlp(r) =
1 - Jlp(e).Jlp(r) - Jl;:,(e)· Jl;:,(r) ~ 1,
the result of the Lukasiewicz fuzzy OR operation is Jlp(e)· Jl;:,(r) + Jl;:,(e)· Jlp(r). System output
rule 3 Setpoint _.- -
_h_ _ ·
_ _._-..
rule 1
o
Time
Figure 3.2 Illustration of how merely four fuzzy rules can cover all possible situations.
47
Section 3.5. • Fuzzy PI/PD Controllers as Piecewise Linear PI/PD Controllers
Due to the use of the singleton output fuzzy sets, the fuzzy inference result is the same no matter which one of the four inference methods in Table 1.1 is employed. Defuzzified by the centroid defuzzifier, the fuzzy controller output is AU(n)
=K
J!j>(e)J!j>(r)·H + J!iie)J!ii(r)·(-H)
~~W~W+~W~W+~W~W+~~~W
.
3.4.2. Derivation and Resulting Structures Utilizing (3.8) and (3.9), we find that the denominator of the above expression becomes 1. This is because Jlp(e)Jlp(r) + Jlp(e)Jli/(r) + Jli/(e)Jlp(r) + Jli/(e)Jli/(r) = Jlp(e) + Jli/(e) = 1.
Replacing the membership notations in the numerator by their mathematical definitions, we obtain AU(n) = KAuK.Jl e(n) + KAuK,H r(n) 2£ 2£'
This fuzzy PI controller is a linear PI controller in incremental form for the entire input space. For the fuzzy controller, if we replace Au(n) by u(n) in the fuzzy rules rl to r4, then, based on the relationship between the PI controller in incremental form and the PO controller in position form (see Section 3.2.2), the modified fuzzy controller will be a fuzzy PO controller, which is a linear PO controller. This study confirms that whether or not a fuzzy controller is linear depends on its configuration (i.e., input fuzzy sets, fuzzy rules, fuzzy logic AND JOR operators, defuzzifier, etc.). No method is available that can directly judge, without explicit knowledge of the controller's input-output relationship, whether a fuzzy controller is a linear controller. The only way is to derive its structure. There are other more complicated fuzzy Pill controllers that actually are linear Pill controllers (e.g., [20][186]). Fuzzy control should always be used as nonlinear control, as it does not make any sense to implement fuzzy control as linear control. The linear fuzzy controller shown here serves as a reminder: There are fuzzy controllers that are actually just linear controllers. Thus, certain configurations of fuzzy controllers should not be used to avoid linear fuzzy controllers. Moreover, to be sure that a specific configuration does not lead to a linear controller, one must derive its analytical structure.
3.5. FUZZY PI/PO CONTROLLERS AS PIECEWISE LINEAR PljPD CONTROLLERS We now investigate a fuzzy controller that differs from the linear fuzzy PI controller above in the following aspects: (1) the Zadeh fuzzy logic AND operator is used, (2) either the Zadeh or the Lukasiewicz fuzzy logic OR operator is used, and (3) the linear defuzzifier (1.8) is utilized. As will be seen, the new configuration results in a piecewise linear fuzzy controller in that the controller output is a piecewise linear function of its inputs. Due to the use of the Zadeh fuzzy AND operator, in order to obtain analytical expressions of the AND evaluation results, it is necessary to divide the E(n) - R(n) plane into 12 regions, each of which is called an Input Combination (IC, for short). They are labeled from ICI to ICI2, as shown in Fig. 3.3. The purpose of dividing the input space into these 12
Chapter 3 • Mamdani Fuzzy PID Controllers
48
iR(n) IC7
IC8 ~
IC6
L
IC2 0
(0,0)
ICI
.
E(n)
IC5
L
IC4 -L
I
~
ICII
ICIO
ICI2
E(n)
o
-L
L
Figure 3.3 Division of the E(n) - R(n) input space into 12 regions for applying the Zadeh fuzzy AND operation in the four fuzzy rules.
regions is to achieve, in each region and each rule, a unique inequality relationship between the two membership values being ANDed. The results of fuzzy AND operation are shown in Table 3.1. They are the membership values, and are in an analytical form for the output fuzzy sets in the four rules. The fuzzy OR operation is used to combine the output fuzzy set Zero for rules r2 and r3. Either the Lukasiewicz or the Zadeh fuzzy OR operator may be used, but for this fuzzy TABLE 3.1 The Evaluation Results for the Four Fuzzy Rules in All 12 Regions after Application of the Zadeh Fuzzy AND Operator. a rl
r2
r3
r4
I 2 3 4 5 6
Jlp(r) Jlp(e) Jlp(e) Jlp(r) Jlp(r) Jlp(e)
Jli/(r) JlFl(r) Jlp(e) Jlp(e) Jli/(r)
Jli/(e) JlFl(e) Jlp(r) Jlp(r)
Jli/(e) JlFl(r) Jli/(r) Jli/(e)
0
0 0
7
0 0 I 0 0 0
ICNo.
8 9 10 II 12
0 0
Jli/(e) Jlp(r)
Jlp(e)
0 0 I 0 0
0 0 0 1
Jli/(r) Jli/(e)
0 0 I 0
a These membership values are for the output fuzzy sets in the four rules rl to r4.
Section 3.5. • Fuzzy PI/PD Controllers as Piecewise Linear PI/PD Controllers
49
controller, exactly the same controller structure will result, since the two membership values for the singleton fuzzy set Zero are multiplied by 0 in the linear defuzzifier. The Mamdani minimum inference method is used. Since the output fuzzy sets are of the singleton type, the four different inference methods in Table 1.1 will produce the same inference result. Using the linear defuzzifier, we obtain the fuzzy controller structure for the 12 ICs in Table 3.2. To show how the structure is derived in more detail, let us take ICI as an example. For ICI, the AND results are: IIp(r) for rI, IlFl(r) for r2, and IlFl(e) for r3 and r4. Using the defuzzifier, ~U(n) = K Au(llp(r)·H
+ IlFl(r) x 0 + IlFl(e) x 0 + IlFl(e)· (-H»
_ KAuKeH ()
-
2L
en+
KauKrH ( ) 2L
(3.10)
rn.
Figure 3.4 shows three-dimensionally how the incremental output of the piecewise fuzzy controller changes with e(n) and r(n). Clearly, controller output changes with controller inputs in a piecewise linear fashion. For comparison, the incremental output of the corresponding linear PI controller, defined as the linear PI controller in ICI to IC4, is also plotted. From the figure and Table 3.2, the following can be observed: TABLE 3.2 Incremental Output of the Linear Fuzzy PI Controller in All 12 Regions after the Linear Defuzzifier is Employed to Combine the Results in Table 3.1. a ICNo.
Incremental Output of the Linear Fuzzy PI Controller, AU(n) =
1, 2,3, and 4
KAuKeH () KAuKrH ( ) en + rn
---:u:----u:KAuKrH () KAuH ---:u:r n + -2KAuKeH () KAuH ---:u:- e n + -2-
5
6
KAuKrH r(n) _ KAuH 2L 2
7
KAuKeH e(n) _ KAuH 2L 2 KAuH
8 9 10 and 12 11
o
-KAuH
a Either the Lukasiewicz fuzzy OR operator or Zadeh fuzzy OR operator is used, which yields the same controller output due to the linear defuzzifier.
(1) Compared with (3.4), the fuzzy controller in ICI to IC4 is a linear PI controller in incremental form with the proportional-gain and integral-gain being, respectively,
K
p
= KauK,H 2L
an
d K. I
= KauKeH
2L'
(2) In IC5 and IC7, the fuzzy controller is a proportional controller with a constant offset, and in IC6 and IC8 the fuzzy controller is an integral controller with a constant offset.
50
Chapter 3 • Mamdani Fuzzy PID Controllers
(3) In ICIO and ICI2, the incremental output is zero . In IC9 and ICII, the increment/decrement is capped . That is to say that during anyone sampling period, the maximum increment to the controller output is K l1uH (in IC9), and the maximum decrement to the controller output is -Kl1uH (in ICll). (4) Switching of the incremental output on the boundary of any two adjacent ICs is continuous and smooth. For example, on the boundary between ICI and IC5 where E(n) = L and R(n) is any value, L\u(n) for ICI is
KI1~,.H r(n) + K!J.~H, which is
the same as that for IC5.
1 0.5
~u(n)
-0. ~ - l """'t./"..,(;J;i
-2
r( n)
(a)
~u(n)
(b) Figure 3.4 (a) Three-dimensional plot of 6u(n) of the piecewise linear fuzzy PI controller with respect to e(n) and r(n) whose ranges are [-2L.2L], and (b) 6u(n) of the corresponding linear PI controller, 6u(n) 0.5e(n) + 0.25r(n), for the same ranges of e(n) and r(n). The values of the parameters are: L = H = I, K, = I, K, = 0.5, and Kfj,u = I.
=
In summary, this fuzzy controller is a linear PI, P, or I controller in incremental form in ICI to IC8 . Unlike the classical PI controller, however, the maximum change to the fuzzy
Section 3.6. • Simplest Fuzzy PI Controller as Nonlinear Variable Gain PI Controller
51
controller output at any sampling time is constrained. Overall, the fuzzy controller is a piecewise linear PI controller in IC1 to IC12. Again, if we replace ~u(n) by u(n) in the four fuzzy rules, this fuzzy controller will become a piecewise linear PD controller owing to the relationship between the PI controller in incremental form and the PD controller in position form.
3.6. SIMPLEST FUZZY PI CONTROLLER AS NONLINEAR VARIABLE GAIN PI CONTROLLER 3.6.1. Derivation and Resulting Structure Now, let us study a fuzzy controller that is just a little bit different from the one described in the last section. It uses the same input variables, input and output fuzzy sets, fuzzy inference method and fuzzy rules, and it also employs the Zadeh fuzzy AND operator and the Lukasiewicz fuzzy OR operator. However, it uses the centroid defuzzifier instead of the linear defuzzifier. Such a fuzzy controller is simplest because its configuration is minimal in terms of the number of input variables, fuzzy sets, and fuzzy rules for any properly functional fuzzy controllers. The term simplest is used loosely, not strictly. Some fuzzy controllers are even simpler; they cannot properly function, however, and hence are useless. It is in this loose sense that we call some of the fuzzy controllers in this book simplest. Along with the same line of derivation as in the last section, one can easily find the analytical structure of this fuzzy controller. The result is given in Table 3.3. We use IC1 as an example to show how to obtain the result in the table. In IC1, we know, from Table 3.1, the outcome of applying the Zadeh fuzzy AND operator. Using the centroid defuzzifier, Jl:p(r)·H + J.liie)·(-H)
AU(n) = K
!:1u J-lp(r)
+ J-lil(r) + J-l&(e) + Jl&(e)
= 2(2L~~e(n»
(Kee(n) + Krr(n».
According to Table 3.3, the fuzzy controller is a nonlinear PI controller in incremental form when both E(n) and R(n) are in IC1 to IC4. The proportional-gain is
K!:1u KrH 2(2L - K e le(n)1) , 2(2L - K r lr(n)1) ,
for IC 1 and IC3 (3.11) for IC2 and IC4
TABLE 3.3 Incremental Output of the Simplest Fuzzy PI Controller in All 12 ICs.
ICNo.
Incremental Output of the Simplest Fuzzy PI Controller, AU(n) =
1 and 3
2(2£
~.1i-~e(n)1) (Kee(n) + Krr(n»
2 and 4
2(2£
~~~r(n)1) (Kee(n) + Krr(n»
5 to 12
The same as those shown in Table 3.2
52
Chapter 3 •
Mamdani Fuzzy PID Controllers
and the integral-gain is
Ki(e, r)
=
for IC 1 and IC3
2(2L - K ele(n)1) ,
(3.12)
KauKfl
for IC2 and IC4.
2(2L - K rlr(n)1) ,
Here, we use Kp(e,r) and Ki(e,r), instead of K p and K i, to stress the fact that both gains are variable: They change as a function of e(n) and r(n) with time. We call them dynamic proportional-gain and integral-gain. At the system equilibrium point (e(n), r(n» = (0,0), the dynamic gains become constant gains:
and the fuzzy controller becomes a linear PI controller. In this book, we define this linear PI controller as the corresponding linear PI controller of the fuzzy controller. Also, we call the gains static proportional-gain and integral-gain, as they are the gains at steady state.
3.6.2. Characteristics of Gain Variation Compared with the linear PI controller, the fuzzy controller is characterized by the gain variation. We introduce the following parameter to better represent the variation: ~(e,r)
Ki(e,r)
p(e,r) = Kp(O,O) = Kj(O,O)
=
2L 2L - Kele(n)1 ' 2L 2L - Krlr(n)1 '
By definition, P(O,O) = 1. Because 0
~ Kele(n)1
1s
pee, r)
.s L ~
and 0
for IC 1 and IC3 (3.13) for IC2 and IC4.
.s Krlr(n)1 .s L, we have
2.
This means that the gains of the nonlinear PI controller are always larger than the static gains and can be twice as large as the static gains. The characteristics of the variable gains are determined by the characteristics of p(e,r), which is most nonlinear in leI to IC4. These regions are of the most interest and importance, not only because p(e,r) is most nonlinear but also because a stable fuzzy control system should operate in these regions most of the time, as (0,0) is the system equilibrium point. The regions are bounded by the square [-L,L] x [-L,L]; thus, the value of L affects the overall control performance. A too small value of L will make the square too small, possibly forcing the system to stay outside the square too often during system transition. This could adversely affect the control performance. A too large value of L will do the opposite. An appropriate value of L needs to be chosen. The constants K; and K; are design parameters, too. Use of a larger value of K; or K; leads to stronger nonlinearity of p(e,r) and hence a more nonlinear fuzzy controller, and vice versa. Because Kp(e,r)
= p(e,r)Kp(O,O)
and
Ki(e,r)
= p(e,r)Ki(O,O),
we need to study p(e,r) in order to understand how Kp(e,r) and Ki(e,r) vary with the input variables and, subsequently, how the fuzzy controller operates in the sense of PI control. To
Section 3.6. • Simplest Fuzzy PI Controller as Nonlinear Variable Gain PI Controller
53
2 1. 75 ~(e,r) 1 . 5 1. 25
-1
-0 . 5
r(n )
o 0.5
e(n) (a)
2 1. 75 ~(e,r) 1 .5 1. 2 5 -1
-0 .5
r(n)
o 0.5
e(n) (b)
2 1. 75 ~(e,r) 1.5 1. 25
-1
r(n)
-0 .5
(c)
Figure 3.5 Three-dimensional plots of p(e, r) with respect to e(n) and r(n) whose ranges are [-L,Ll . The values of the parameters are: L H 1, KtJ.u 1, K, 1, and (a) K, 1, (b) K, 0.6, and (c) K, 0.2.
=
=
=
= =
=
=
Chapter 3 • Mamdani Fuzzy PID Controllers
54
visualize how p(e,r) changes with e(n) and r(n), we plot it for three different sets of parameter values (Figs. 3.5a-e). Here, without loss of generality, we assume L = H = 1, K6.u = 1, K; = 1, and let (a) K; = 1, (b) K; = 0.6, and (c) K; = 0.2. The ranges of e(n) and r(n) are [-L,L]. The effect of fixing K; and varying K; to different levels is similar, with the difference being exchange of the e(n) and r(n) axes.
3.6.3. Performance Enhancement due to Gain Variation The figures show that, regardless of the value of r(n), the farther the system output is away from the setpoint (i.e., the larger the e(n», the larger the p(e,r) is and hence the larger the gains of the fuzzy controller are than the gains of the corresponding linear PI controller. Larger gains result in larger control action (in an absolute sense), which is desirable in order to quickly eliminate big system output error, resulting in less rise-time and overshoot for the system output. On the other hand, when the system output is near the setpoint, the dynamic gains are close to the static gains. Thus, the control action of the fuzzy controller is smaller and is about the same as that of the corresponding linear PI controller. This ensures zero steady-state error of the system output and potentially makes the fuzzy control system more stable. The manner in which the variable gains change with e(n) and r(n) makes it possible for the fuzzy controller to outperform the linear PI controller with the constant gains. In IC5 to ICI2, the structure of the fuzzy controller is the same as the piecewise linear fuzzy PI controller in the last section. It becomes a linear P controller, I controller, or constant controller, depending on the regions. To visualize the entire nonlinear fuzzy PI controller structure, in Figs. 3.6a-e, we plot ~u(n), with the ranges of e(n) and r(n) being [-2L,2L]. The values of the parameters are the same as those used for Figs. 3.5a-e.
3.7. ANOTHER SIMPLEST FUZZY PI CONTROLLER AS NONLINEAR VARIABLE GAIN PI CONTROLLER We now investigate the analytical structure of another simplest fuzzy PI controller whose configuration is the same as the one that we just studied except that the Lukasiewicz fuzzy OR operator is replaced by the Zadeh fuzzy OR operator. The result of applying the Zadeh OR operator to combine the two membership values for the output fuzzy set Zero generated by rules r2 and r3 (Table 3.1) is given in Table 3.4. For convenience, we also list the membership values for rl and r4, which are the same as those in Table 3.1. Using the centroid defuzzifier, we see that the incremental output of this new fuzzy PI controller in IC 1 is
AU(n)
=K 6.u
Jlp(r)· H + Jli;/e)· (-H) /lp(r) + /lil(r) + /lil(e)
= 3L ~lJ.t(n) (Kee(n) + Krr(n)). The controller structure in the remaining 11 ICs can be derived in a similar fashion. The complete results are given in Table 3.5, which are similar to those in Table 3.3. The fuzzy PI
Section 3.7. •
Another Simplest Fuzzy PI Controller as Nonlinear Variable Gain PI Controller
Au(n)
1 0.5
a
-0.5 -1 -2
r(n) 1 (a)
1 0.5 Au(n)
a
-0.5 -1 -2
r(n) e(n) (b)
0.5
a
Au(n) - 0 . 5 'w!:J''-,( ~~''
-2
r(n)
a 1
e(n) (c)
Figure 3.6 'Three-dimensional plots of Au(n) of the simplest nonlinear fuzzy PI controller with respect to e(n) and r(n) whose ranges are [-2L,2L] . The values of the parameters used to generate plots (a}-(c) are the same as those used in Figs . 3.5a-c, respectively.
55
Chapter 3 •
56
Mamdani Fuzzy PID Controllers
TABLE 3.4 The Evaluation Results after the Zadeh Fuzzy AND Operator is Applied to the Four Fuzzy Rules and the Zadeh Fuzzy OR Operator is Applied to Combine the Membership Value for r2 with That for r3. ICNo. 1 2 3 4 5 6 7 8 9 10 11 12
rl
r2 OR r3
r4
J-lp(r) J-lp(e) J-lp(e) J-lp(r) J-lp(r) J-lp(e) 0 0 1 0 0 0
J-lF/(r) J-lF/(e) J-lp(r) J-lp(e) J-lF/(r) J-lF/(e) J-lp(r) J-lp(e) 0 1 0 1
J-lF/(e) J-lF/(r) J-lF/(r) J-lF/(e) 0 0 J-lF/(r) J-lF/(e) 0 0 1 0
controller is a nonlinear PI controller with variable gains as well. The gain variation is different, however, and is characterized by 3L
_ Kp(e,r) _ K;(e,r) _ fJ(e,r) - Kp(O,O) - Kj(O,O) -
{
3L - Kele(n)1 ' 3L 3L - Krlr(n)1 '
for IC1 and IC3 for IC2 and IC4
whose range is 1 .s p(e,r)
.s 1.5,
which is smaller than the range of the other fuzzy PI controller. The characteristics of the gain variation between the two fuzzy controllers, however, are similar. One can easily obtain the analytical structure of corresponding nonlinear fuzzy PD controllers based on the relationship between the PI controller in incremental form and the PD controller in position form. In Section 8.3, this fuzzy PI controller will be utilized for real-time control of mean arterial pressure in postsurgical cardiac patients at the Cardiac Surgical Intensive Care Unit. The project was carried out in the late 1980s and is the world's first real-time fuzzy control application in medicine. Fuzzy control is appropriate and ideal because the physiological TABLE 3.5 Incremental Output of the Simplest Fuzzy PI Controller That Uses the Zadeh Fuzzy OR Operator.
ICNo.
Incremental Output of the Simplest Fuzzy PI Controller, AU(n) =
~~:e(n)1 (Kee(n) + Krr(n»
1 and 3
3£
2 and 4
K!1u H ) 3£ _ Krlr(n)1 (Kee(n + Krr(n))
5 to 12
The same as those shown in Table 3.2
Section 3.8. • Simulation Comparison between Fuzzy and Linear PI Controllers
57
system under control is nonlinear, time-varying, and with time delay; the precise mathematical model is impossible to obtain. Furthermore, disturbances and interfaces to the fuzzy controller constantly appear owing to the routine care of the patients. Despite all these factors, the fuzzy control system performs exceptionally well, owing to the gain variation. The performance is far better than a linear Pill controller can achieve.
3.8. SIMULATION COMPARISON BETWEEN FUZZY AND LINEAR PI CONTROLLERS
3.8.1. System Models and Comparison Conditions We now use computer simulation to demonstrate that the simplest fuzzy PI control can outperform the linear PI control when systems other than linear ones are involved. For brevity, we only employ the fuzzy PI controller using the Zadeh fuzzy OR operator. The comparison results, however, hold for the fuzzy PI controller using the Lukasiewicz fuzzy OR operator. The following four different systems are used as control models: Linear first-order model:
Y(s) 1 --=--, U(s) s+1
Linear second-order model:
--= U(s) s(s
First-order with a time-delay model:
Y(s) 1 -5s --=--e ,
(3.16)
Nonlinear first-order model:
I(t) = -y(t) + 71(t) + u(t).
(3.17)
Y(s)
U(s)
1
+ 1) ,
s+1
(3.14) (3.15)
In all comparisons, the setpoint for systems output is always 3, a number chosen for no particular reason, and the sampling period is 0.01, which is far less than the time constants of the models. The fourth-order Runge-Kutta method with a step size of 0.01 is used for integration. For the fuzzy controller, without loss of generality, we let H = L = 1. The initial value of system output is set to 0, as is the initial output ofthe fuzzy and PI controllers. The simulation is conducted using the MATLAB Simulink™ and MATLAB Fuzzy Logic Toolbox™. The fuzzy PI controller is a nonlinear controller. In general, it is difficult to make a fair control performance comparison between a nonlinear controller and a linear controller. To make our comparison as fair as possible, we always begin the comparison by letting the proportional-gain and integral-gain of the linear PI controller be the static proportional-gain and integral-gain of the nonlinear PI controller (i.e., the fuzzy PI controller), respectively. We then tune the gains of the linear PI controller to examine whether it can outperform the corresponding fuzzy PI controller.
3.8.2. Comparison Results for Linear Models Figure 3.7a shows the comparison result when the linear first-order model (3.14) is used. The fuzzy PI controller and its corresponding linear PI controller produce virtually the same control performance. In Fig. 3.7b, we provide the trajectory of E(n) vs. R(n), which is useful for examining (1) how often the fuzzy controller has stayed in [-1,1] x [-1,1] to take advantage of the variable gains, and (2) whether the maximal increment and/or decrement of
58
Chapter 3 • 5,-'- - , . . . - -
-____,__-
-~,......-
Mamdani Fuzzy PID Controllers __- - _ - _
4.5 4
3.5
'5
3
~e 2.5
i
I
,
," I
2 1.5
, ,,, I
I
solid line-fuzzy PI controller dotted line-linear PI controller
I
I
0.5
I
"
O
....-._---A.
..a-_---'
- - L ._ _
o
3
2
4 Time (a)
5
6
7
8
0.8
0.6 0.4 0.2
S ce:
0 -0.2 -0.4 -0.6 -0.8 -1
-1
-0.5
0
E(n)
0.5
(b)
Figure 3.7 Performance comparison between the simplest nonlinear fuzzy PI controller and the corresponding linear PI controller when the linear first-order system model (3.14) is used: (a) output of the two control systems, and (b) trajectory of E(n) vs. R(n). For the fuzzy controller, the values of the parameters are: L = H = 1, K, = 0.3, K, = 16, and K f1u = 1. The gains of the corresponding PI controller are: Kp(O, 0) = 4 and K;(O, 0) = 0.075.
the controller output is reached. In this case, the fuzzy controller has always stayed inside [-1, 1] x [-1, 1], and the advantage of the variable gains is fully taken. Given the performance, we conclude that the variable gains are little help when a linear first-order system is involved. Figures 3.8a-b demonstrate, respectively, the simulated outputs and the corresponding E(n) vs. R(n) trajectory of the fuzzy controller when the linear second-order model (3.15) is
Section 3.8. • Simulation Comparison between Fuzzy and Linear PI Controllers
59
5r--~--....,...--~----.---....--...,.---.,..-----,
4.5
..
3.5 'S
!
3
~ 2.5 11
if;
2
1.5
solid line-fuzzy PI controller dotted line-linear PI controller
0.5
5
10
15
20
Time
25
30
35
40
(a)
0.8 0.6 0.4 0.2 ~
ct
0 -0.2 -0.4 -0.6 -0.8 -1 -1
-0.5
0 E(n)
0.5
(b)
Figure 3.8 Performance comparison between the simplest nonlinear fuzzy PI controller and the corresponding linear PI controller when the linear second-order system (3.15) is used: (a) output of the two control systems, and (b) the trajectory of E(n) vs. R(n). For the fuzzy controller, the values of the parameters are: L = H = 1, K, = 0.3, K; = 60, and K!1u = 0.075. The gains of the corresponding PI controller are: Kp(O, O) = 1.125 and K;(O, 0) = 0.005625.
controlled. The fuzzy PI controller seems to perform better than the corresponding linear PI controller with a significantly smaller overshoot. According to Fig. 3.8b, the better performance is solely owing to the gain variation. This performance comparison is not conclusive, however, as the PI controller using other values of the gains may be able to perform better. Indeed, we have found this to be the case. Figure 3.9 depicts a comparison after the gains of the linear PI controller are fine tuned, resulting in performance that is closely
Chapter 3 • Mamdani Fuzzy PID Controllers
60 5 4.5 4 3.5
'S
.e-
3
::J
~ 2.5 S 2
~
solid line-fuzzy PI controller dotted line-Hnear PI controller
1.5 '1
0.5 5
10
15
20 Time
25
30
35
40
Figure 3.9 Performance comparison between the simplest nonlinear fuzzy PI controller and the corresponding linear PI controller when the linear second-order system model (3.15) is used. The values of the parameters of the fuzzy PI controller are the same as those given in Fig. 3.8, but the gains of the linear PI controller are fine tuned to achieve a comparable performance to the fuzzy control performance. For the linear PI controller, Kp(O, 0) = 1.33125 and K;(O,O) = 0.005625.
similar to the fuzzy control performance. The parameter values of the fuzzy controller are the same as those used in Fig. 3.8. Through various simulation experiments, we find that the comparison results shown here for the linear first-order and second-order models are representative and consistently hold when different parameter values are used for the fuzzy PI controller and the corresponding linear PI controller. Based on the analysis and computer simulation, we generalize our conclusions to cover all linear systems as follows: (1) an insignificant difference exists in control performance between the simplest fuzzy PI controller and the linear PI controller, and (2) there is little advantage to using fuzzy control to control linear systems, as we have pointed out in the previous chapter. Linear controllers, especially the linear PID controller, are not only simpler and easier to design and implement based on the well-developed linear system theory, but also more cost effective and time efficient.
3.8.3. Comparison Results for the Time-Delay Model and the Nonlinear Model When time-delay or nonlinear systems are involved, using fuzzy control is usually beneficial, for it has the potential to outperform linear control. Figure 3.10a shows the control performances when the first-order with time-delay system (3.16) is employed; Fig. 3.1Ob gives the corresponding E(n) vs. R(n) plot. Because the delay time 5 is much larger than the time constant 1, it is known in PID control theory that such a system is challenging to control well. Clearly, because of the gain variation, the fuzzy PI controller does a better job than its corresponding linear PI controller. We then fixed the parameters of the fuzzy controller and
61
Section 3.8. • Simulation Comparison between Fuzzy and Linear PI Controllers
5,----.....---.,...-.--..------r--__- -
- -___
4.5 4
i
3.5 3
!
-,- ..... -- ...
.,.~~"'''
,--
~ 2.5 CD
2 1.5
, ,,
I
,,
I
0.5
,
I
I
,, "
,
"",,,,,,
solid line-fuzzy PI controller dotted line-linear PI controller
......._ _......._ _'____ 20 30 10
O'---~_
o
__a._ ___a._ ____a_ __ _ J
Time
40
50
80
70
(a)
1 0.8 0.6 0.4
0.2
~
Q;::
0 -0.2
-0.4 -0.8 -0.8 -1 -1
-0.5
0
0.5
E(n)
(b)
Figure 3.10 Performance comparison between the simplest nonlinear fuzzy PI controller and the corresponding linear PI controller when the first-order system with a time delay (3.16) is used: (a) output of the two control systems, and (b) trajectory of E(n) vs. R(n). For the fuzzy controller, the values of the parameters are: L = H = 1, K, = 0.3, K, = 50, and K!:J.u = 0.0078. The gains of the corresponding PI controller are: Kp(O,O) = 0.0975 and Ki(O,O) = 0.000585.
manually tuned the gains of the linear PI controller to achieve as little a rise-time as possible under the condition of no output overshoot. The result is given in Fig. 3.11a. The linear PI controller improves its performance markedly but is still significantly inferior to that of the fuzzy PI controller. To make the comparison even more convincing, we left the fuzzy controller unchanged and manually adjusted the gains of the linear PI controller until risetime for the fuzzy and linear PI controllers was the same (see Fig. 3.11b). The linear PI controller is still far worse owing to its large overshoot and long settling-time, which is in sharp contrast to no overshoot of the fuzzy system. This is not surprising because
Chapter 3 •
62
5,...---..,.....---T-"'--
Mamdani Fuzzy PID Controllers
--...,...--~---r__-___,
4.5 4
i
3.5 3
~ 2.5
i
2
,I'
1.5
,,
,,
I
,"" solid line-fuzzy PI controller dotted line-linear PI controller
," ,,
, , OL.---'_...a.-_ _ I
0.5
I
o
....&-_ _..........
20
10
..........~ -
30
40
50
~-~
80
70
Time (a)
5 __- -...........- - _ - - _ - -__--__.....---_----.
4.5 4
i
3.5
,., .... _,.. ....
i
I
.........
I
3
I
~ 2.5
~
,
2 1.5
solid line-fuzzy PI controller dotted line-linear PI controller
0.5
.....- -.........--__...r.---~----..J
OL.--~-...I..---~-_
o
10
20
30
40
50
60
70
Time (b)
Figure 3.11 Performance comparison between the simplest nonlinear fuzzy PI controller and the corresponding linear PI controller when the first-order system with a time delay (3.16) is used. The values of the parameters of the fuzzy PI controller are the same as those given in Fig. 3.10. For the linear PI controller, (a) Kp(O, 0) = 0.002175 andK;(O,O) = 0.0006525, and (b) Kp(O, 0) = 0.0035 and K;(O, 0) = 0.00105.
improvement in rise-time is always at the expense of overshoot deterioration for linear control, and vice versa. This, however, is not necessarily the case for nonlinear control. Finally, let us work on the nonlinear system (3.17). The model is quite nonlinear owing to the 7j2(t) term. Figure 3.12a illustrates the performance comparison between the fuzzy and linear PI controllers. The fuzzy control system exhibits strong nonlinear behavior: The system output rises quickly, in an almost straight-line fashion, toward the setpoint and then suddenly changes its direction once the setpoint is reached and settles on the setpoint thereafter. On the
Section 3.8. • Simulation Comparison between Fuzzy and Linear PI Controllers
63
5r--------T-------_--------. 4.5 4
3.5
1
i
~
I-
3
2.5
2 1.5
,, I
0.5
,
I
I
,
I
I
I
,
, ,,
,,
,
solid line-fuzzy PI controHer dotted line-linear PI controller
O~----------------...a..---------' 1.5 o 0.5 Time (a)
5,--------...,....---------. 4 3
2
'e- 0
~
-1
-2
·3 -4
-5...-.------.......-.------. . . .5 o -5 E(n) (b)
Figure 3.12 Performance comparison between the simplest nonlinear fuzzy PI controller and the corresponding linear PI controller when the nonlinear system (3.17) is used: (a) output of the two control systems, and (b) trajectory of E(n) vs. R(n). For the fuzzy controller, the values of the parameters are: L = H = 1, K, = 0.595, K, = 12, and K Au = 45. The gains of the corresponding PI controller are: Kp(O,O) = 135 and K;(O,O) = 6.69375.
fuzzy controller output side, the limit on maximal increment/decrement has been reached during some sampling periods, as evidenced by the trajectory of E(n) vs. R(n) shown in Fig. 3.12b. Unlike the other systems above, the trajectory stays outside of [-I, I] x [-1, 1] most of the time. The combined effect of the gain variation and the increment/decrement limit leads to the superior control performance. Like the time-delay system comparison given earlier, we also tuned the linear PI controller to obtain its best performance in terms of overshoot (Fig. 13a). Similarly we tried to
64
Chapter 3 •
Mamdani Fuzzy PID Controllers
5 4.5 4
3.5 "$
~
3
~ 2.5
i
2
CIJ
1.5
solid line-fuzzy PI controller dotted line-linear PI controller
0.5 0
0
1.5
0.5
Time (a)
5r-----------,-----~-_....-------...,
4.5 4
3.5 ~ S-
3
::::I
~ 2.5 Q) 1;) 2
if)
1.5 ·1
solid line-fuzzy PI controller dotted line-linear PI controller
0.5
OL..----------&---------'----------' 1.5 0.5 a Time (b)
Figure 3.13 Performance comparison between the simplest nonlinear fuzzy PI controller and the corresponding linear PI controller when the nonlinear system (3.17) is used. The values of the parameters of the fuzzy PI controller are the same as those given in Fig. 3.12. The gains of the linear PI controller are carefully tuned: (a) Kp(O,O) = 81 and K;(O, O) = 6.69375, and (b) Kp(O,O) = 56.25 and K;(O,O) = 6.69375.
make the rise-time comparable to that of the fuzzy control system (Fig. 3.13b). Obviously, the fuzzy PI controller is still much better. We need to clarify one important point: For the time-delay system (3.16) and the nonlinear system (3.17), whether or not the fuzzy PI controller can outperform the linear PI controller depends on the parameter values. In other words, some parameter values make the fuzzy controller perform worse than its corresponding linear PI controller. This is natural and expected and has its reasons. As we will show later, a fuzzy PI control system has the same
Section 3.9. • Simplest Fuzzy PI Controllers Using Different Fuzzy Inference Methods
65
local stability at the equilibrium point as its corresponding linear PI control system. Nevertheless, the behavior of these two systems can be quite different, as exemplified by the simulation results involving systems (3.16) and (3.17). Take system (3.17), for example. If one chooses such parameter values that make the PI control system barely stable, the corresponding fuzzy PI control system will probably oscillate fairly wildly before settling at the equilibrium point, resulting in a performance inferior to the PI system. After all, the overall equivalent gains of the fuzzy PI controller are larger than those of the linear PI controller. These parameter values are extreme for the fuzzy PI controller and thus should be excluded to make comparison fairer. Conceptually, no controller of any type, conventional or fuzzy, can always outperform a controller of another type for all possible parameter settings. Thus, fairly and convincingly comparing two different types of controllers is tricky. In our case, it is fortunate that the structure of the fuzzy PI controller can be derived and that its relationship with the linear PI controller is established. These pave a way for making the fair comparisons between the fuzzy and linear PI controllers and for understanding the reasons behind the comparison outcome. We can confidently conclude that the fuzzy PI controllers, as nonlinear controllers, can outperform their linear counterparts when controlling nonlinear systems or systems with time delay.
3.8.4. Superior Fuzzy Control Performance at a Price Better performance of the fuzzy PI controller comes with a price: Their structure is more complicated, and the number of adjustable parameters is larger. These characteristics cause the fuzzy controller to have more degrees of freedom in controller structure and parameters. The linear PI controller is very simple in structure and has only two tunable gains. The structure of the fuzzy PI controller is more complicated and has five adjustable parameters, namely, H, L, Ke , K r , and K Au . As H and K Au always appear as the product of KAu·H in the expressions (see Table 3.5, for instance), only one of them is an independent parameter. Without loss of generality, one can always assume that H = L. This still leaves four tunable parameters, and the parameter tuning is significantly more difficult than that for the linear PI controller.
3.9. SIMPLEST FUZZY PI CONTROLLERS USING DIFFERENT FUZZY INFERENCE METHODS
3.9.1. Configurations of Fuzzy PI Controllers In this section, we study the analytical structure of the simplest fuzzy PI controllers that use the four different inference methods: The Mamdani minimum inference method, the Larsen product inference method, the drastic product inference method, and the bounded product inference method (Table 1.1). Recall that the different inference methods are meaningful only when the output fuzzy sets are not of the singleton type. Thus, the fuzzy controllers in this section use the three trapezoidal output fuzzy sets shown in Fig. 3.14. The other components of the fuzzy controllers are exactly the same as the fuzzy PI controllers above (i.e., two input fuzzy sets, four control rules, Zadeh fuzzy AND operator, Lukasiewicz fuzzy OR operator, and centroid defuzzifier). We now prove them to be different nonlinear PI controllers with variable proportional-gain and integral-gain.
Chapter 3 • Mamdani Fuzzy PID Controllers
66
Membership Negative
Zero 1
Positive
liu(n)
-2H
-H
o
H
2H
Figure 3.14 Three trapezoidal output fuzzy sets for the simplest nonlinear fuzzy PI controllers using the four different inference methods.
In Fig. 3.14, 2A and 2H are the upper and lower sides of the three trapezoidal fuzzy sets, respectively. Also, -H, 0, and H are the centers of Negative, Zero, and Positive fuzzy sets, respectively. To define the trapezoids, we introduce a parameter
O=A
H
and constrain it by
0:::; 0.5 to avoid overlay between the upper sides of two adjacent fuzzy sets.
3.9.2. Derivation and Resulting Structures In our case, J1 in Table 1.1 is the membership value for the output fuzzy set in each of the four fuzzy rules r 1 to r4. The shadow areas in Fig. 3.15 represent the results of applying the four different inference methods to the trapezoidal output fuzzy sets. The formulas for computing the areas are given in Table 3.6. As in Table 1.1, the subscripts M, L, Dp, and BP denote the four different inference methods. For rules rl and r4, J1 is J1rl and J1r4' respectively, whereas for rules r2 and r3, J1 is J1r2Ur3' We use the Zadeh fuzzy AND operator to compute J1rl to J1r4' and we use the Lukasiewicz fuzzy OR operator to calculate J1r2Ur3 from J1r2 and Jlr3' After the centroid defuzzifier is applied, the incremental output of the fuzzy PI controllers is:
AU(n)
= K Au S(Jlrl)H + SVtr2Ur3) X 0 + SVtr4)(-H) S(J1rl)
- K H -
liu
+ S(J1r2ur3) + S(J1r4)
S(Jlrl) - S(J1r4) S(J1rl) + S(Jlr2ur3) + S(Jlr4) ,
(3.18)
where S(J1rl) and S(Jlr4), calculated according to Table 3.6, are the areas of the trapezoidal output sets Positive and Negative with the respective membership values, J1rl and Jlr4' S(J1r2Ur3) is the area of the trapezoidal output fuzzy set Zero, generated by the rules r2 and r3, with the combined membership value J1r2Ur3' The results of the Zadeh fuzzy AND operation in each of the four fuzzy rules are available (Table 3.1). The outcome of applying the Lukasiewicz fuzzy OR operator to the
Section 3.9. •
Simplest Fuzzy PI Controllers Using Different Fuzzy Inference Methods
67
Membership
RDP
1
RBP
~
o
"-'--+ tlu(n)
Figure 3.15 Fuzzy inference results: Shadow areas representing the results of applying the four different inference methods to the trapezoidal output fuzzy sets.
fuzzy rules r2 and r3 is simply the summation of the respective membership values (i.e., Ilr2Ur3 = Ilr2 + Ilr3) ' Replacing Il in Table 3.6 by Ilrl' Il r2Ur3' and Il r4 and substituting the results into (3.18), analytical structures of the fuzzy PI controllers are obtained: They are nonlinear PI controllers with variable gains and can be described in general by AU(n) = K;(e,r)e(n) + Kp(e,r)r(n),
where Kie,r) = p(e,r)KiO,O)
and
Kj(e,r) = p(e,r)K;(O,O).
For different inference methods, p(e,r) , KiO,O)), and Kj(O,O) are different. We use the same notations as above for the inference methods, and we list four different p(e,r) in Table 3.7 and KiO,O) and Kj(O,O) in Table 3.8 for ICI to IC4. The structure of the fuzzy controllers when either E(n) or R(n) is outside of [-L ,L] can be derived similarly and more easily. Like the fuzzy PI controllers in the previous sections, the four fuzzy PI controllers in the present section become a linear P, I, or constant controller in the regions other than ICI to IC4.
3.9.3. Characteristics of Gain Variation We now study the properties of these four nonlinear fuzzy PI controllers in relation to the linear PI controller. As before, one only needs to study the characteristics of p(e,r) as it is equivalent to studying the dynamic proportional-gain and integral-gain. As shown in Section 3.8, E(n) and R(n) can usually be managed to stay inside [-L,L] to take full advantage of the TABLE 3.6 The Formulas for Computing the Shadow Areas of the Trapezoidal Output Fuzzy Sets for the Four Different Inference Methods. Inference Method
Formula for Computing the Shadow Area of the Trapezoidal Output Fuzzy Sets SM{Jl) = JI(2 - JI + JlO)H SL{Jl) = JI(1 + O)H SDP{Jl) = 2J10H Ssp{Jl) = JI(20 + JI - JlO)H
Chapter 3 •
68
Mamdani Fuzzy PID Controllers
TABLE 3.7 The Expressions of p(e, r) for the Four Different Inference Methods When Both E(n) and R(n) Are Within the Interval [-L,L] (i.e., in ICI to IC4-see Fig. 3.3).
pM (e, r) =
(3 + O)L 1+0 x
(1 + 8)L + 0.5(1 - O)IKee(nT) - Krr(nT)1 + 0.5(1 - O)«Kee(nT)i + (Krr(nT)i)]
(3 + 8)L2 _ [(1 + O)L . X(n)
2L pL(e, r) = 2L _ X(n) oDP p (e, r) oBP
2L
= 2L -X(n)
per ( , )-
(1 + 30)L (1 + O)L - 0.5(1 - O)IKee(nT) - Krr(nT) I x 1+ 0 (1 + 30)L2 - [(1 + O)L . X(n) - 0.5(1 - 8)«Kee(nT)i + (Krr(nT»2]
Note. X(n) _ {Ke1e(nT)I, ICI and IC3 • - K; Ir(nT)I, IC2 and IC4
TABLE 3.8 The Expressions of Kp(O, 0) and K;(O, 0) for the Four Different Inference Methods When Both E(n) and R(n) Are Within the Interval [-L,L] (i.e., ICI to IC4). Inference Method (1 + O)K!1uH 2(3 + O)L K!1u H 4L K!1u H 4L (1 + O)K!1uH 2(1 + 30)L
gain variation, which means leI to IC4 are of the most importance and interest from a control standpoint. Therefore, in what follows, we will only analyze the characteristics of the fuzzy PI controllers when both E(n) and R(n) are inside [-L,L]. pM(e,r), pL(e,r), pDP(e,r), and pBP(e,r) have the following properties: p(e,r) = p(r,e) p(e,r)
= P( -r, -e).
(3.19) (3.20)
Expression (3.19) indicates that all four p(e,r) are symmetrical about the line Kee(n) = Krr(n),
whereas (3.20) signifies the symmetry with respect to the line Kee(n) = -Krr(n).
Because of the symmetries, it is sufficient to study p(e,r) in one of the four ICs. Without losing generality, we choose leI. We begin with pM(e,r). It reaches its maximum when Kee(n) = L
and
Krr(n) = -L
Section 3.9. • Simplest Fuzzy PI Controllers Using Different Fuzzy Inference Methods
69
because the numerator of pM(e,r) becomes maximal while the denominator becomes minimal. The maximum of pM(e,z) is
II:. max -
2(3 + 0) (1 + 0)2 .
pM(e,r) attains its mmunum when e(n) = r(n) = 0 because the numerator of pM(e,r) becomes minimal while the denominator becomes maximal. The minimum of pM(e,r) is 1. is The ratio of p~ to
tf:un
M
p
tf:.n
2(3 + 0) = ~ = (1 +of
which strictly monotonically decreases as 0 increases from 0 to 0.5. The range of pM is 28 _
with maximal pM at 0 = o. In ICl, Kee(n) ~ Krr(n). For a given Krr(n), increase of Kee(n) makes the numerator of pM(e,r) larger and the denominator smaller, causing pM (e,r) to increase. For a given Kee(n), increase of Krr(n) also causes pM(e,r) to increase. When Kee(n) = L and Krr(n) = L, pM(e,r) becomes M
PLi. =
3+0 1 +0 '
On the basis of the properties of pM(e,r) in ICI and the symmetries described in (3.19) and (3.20), we conclude that starting from the minimum at Kee(n) = 0 and Krr(n) = 0, pM(e,r) strictly monotonically increases with an increase of Kele(n)1 and Krlr(n)1 in all directions. To visually confirm all these characteristics, a three-dimensional plot of pM(e,r) for 0 = 0 is
demonstrated in Fig . 3.16.
1 -1 Figure 3.16 A three-dimensional plot of pM(e,r) for visualizing its properties analyzed in 1. It can be seen the text. For the plot, (J 0, K; K, K"" L H that starting from the minimum at Kee(n) = 0 and Krr(n) = 0, pM(e,r) strictly monotonically increases with an increase of Kele(n)1 and Krlr(n)1 in all directions. pM(e,r) achieves its maximwn at (L,-L) and (-L,L).
=
= =
= = =
Chapter 3 • Mamdani Fuzzy Pill Controllers
70
We now study the properties of pL(e,r) and pDP(e,r). Because pL(e,r) = pDP(e,r), the structure of the fuzzy controllers is identical and is independent of e. When Kele(n)1 = L
or
Krlr(n)1 = L ,
pL(e,r) and pDP(e,r) reach their maximum
PLmax =
pDP = 2 max
and when Kee(n) = Krr(n) = 0, pL(e,r) and pDP(e,r) attain their minimum
p~=p~=l. Therefore,
PL -_
PL
pDP
=2 - pLmin - pDrrIn - .
pDP -
~ -
~
When Kee(n) = Land Krr(n) = L, pL(e,r) and pDP(e,r) become
pit- = pEf =
2.
In addition to being symmetrical about the lines (3.19) and (3.20), p\e,r) and pDP(e,r) are also symmetrical about the lines Kee(n) = 0
and
Krr(n) = O.
On the basis of the analyses, it can be concluded that starting from the minimum at = 0 and Krr(n) = 0, pL(e,r) and pDP(e,r) strictly monotonically increase with an increase of Kele(n)/ and Krlr(n)1 in all directions. A three-dimensional plot of pL(e,r) (i.e., pDP(e,r)) is demonstrated in Fig. 3.17.
Kee(n)
2
1. 75 1.5 1. 25 -1
-0 .5
r(n)
Figure 3.17 A three-dimensional plot of f(e,r) and pDp(e,r) for visualizing their properties analyzed in the text. For the plot, 8 = 0, K, = K; = KlJ.u = L = H = I. It can be seen that starting from the minimum at Kee(n) = 0 and Krr(n) = 0, pM (e,r) strictly monotonically increases with an increase of K ele(n) I and K r Ir( n) I in all directions. f(e ,r) and pDP(e,r) achieves their maximum when Kele(n)1 = L and Krlr(n)1 = L.
71
Section 3.9. • Simplest Fuzzy PI Controllers Using Different Fuzzy Inference Methods
3.9.4. Performance Enhancement by Gain Variation We now look at the gain variation of the fuzzy PI controllers using RM , RL , and RDP in the context of control. When IE(n)I and IR(n)I are larger, the fuzzy controllers issue relatively stronger control actions, owing mainly to larger pM(e,r), (f(e,r), and pDP(e,r). The maximal control actions occur when Kele(n)1 = Land/or Krlr(n)1 = L. The stronger control actions quickly reduce e(n). On the other hand, when IE(n) I and IR(n)I are smaller, the fuzzy controllers call for relatively weaker control actions because of smaller pM(e,r), pL(e,r) and pDP(e,r). Minimal control actions take place when Kee(n) = 0 and Krr(n) = o. The weaker control actions help gradually force system output to the setpoint in a manner that stabilizes the fuzzy control systems. From the control point of view, these behaviors of the fuzzy controllers are appropriate and desirable.
3.9.5. Unreasonable Gain Variation Characteristics Produced by Bounded Product Inference Method We have purposely left pBP(e,r) unexamined so far because it does not possess desirable gain variation characteristics in the context of control. Note that when Kee(n) = L and Krr(n) = L,
DP _ 1 + 38 1+ 8 ·
PL~ -
Furthermore, for different 8 values, pBP(e,r) reaches different minima. It reaches
pBJn =
1
(3.21)
when Kee(n) = Krr(n) = 0, or it reaches
P:f = 20(1 + 30) (1 + 8)2
nun
(3.22)
when Kee(n) = L and Krr(n) = -L. Let the right side of (3.21) equal the right side of (3.22) and solve the resulting equation for 8. The solution is
o
8 = 5 ~ 0.4472, which means that when 0 :::: 8 :::: 0/5, pDP(e,r) reaches the minimum in (3.22) and when 0/5 :::: 8 :::: 0.5, pBp(e,r) reaches the minimum in (3.21). It is easy to prove that when
o s 8 s 0.1827, a variable pB~ takes place at (Kee()K n, rr()) n
= ( 3 + 38 - J - 1382 + 68 + 3 L J-13lf+60+3-1-0L) 2(1 - 8) , 2(1 - 8) ,
Chapter 3 • Mamdani Fuzzy Pill Controllers
72
which strictly monotonically increases from (0.6340L , 0.3660L) at f} = 0.1827 . For the remaining values, 0.1827 S another variable
f}
f}
= 0 to (L, O.4472L) at
S 0.5 ,
p:x. occurs at (Kre(n), Krr(n»
+ = ( L, ( 3 + J 6(f +1 ee _ f}
2-4) L)
which strictly monotonically increases from (L, 0.4472L) at f} = 0.1827 to (L, 0.4772L) at f} = 0.5 . Because RBP is inappropriate for control purposes, the exact expressions of and pBP are unimportant and are omitted here. To visualize these theoretical discussions, two three-dimensional plots of pBp(e,r) for () = 0 and f} = 0.5 are shown in Figs. 3.18a and b, respectively.
p:x.
1 0.5
o
-1
- 0. 5
r(n)
e(n) (a)
A BP( ) I-' e.r
1. 6 1. 4 1.2
-1- 0 . 5
r(n)
(b) Figure 3.18 A three-dimensional plot of pHp(e,r) for visualizing its properties analyzed in the text For the plot, K. = K, = K l'.u = L = H = 1. (a) (J = O. pHn:: happens at (L,-L) and (- L ,L), and pH.::,. takes place at (O.634L , 0.366L), (O.366L, 0.634L), (-0 .634L, -0.366L), and (- 0.366L , -0 .634L). (b) (J = 0.5. POnS. happens at (0, 0), and pH.::,. takes place at (L , 0.4772L), (0.4771£, L), (-L, -0.4772L), and (-0.4771£, -L).
Section 3.10. • Simplest TITO Fuzzy PI Controller as TITO Nonlinear Variable Gain PI Controller
73
P:X
Unlike P:.ax, pfnax, and pDr!:.x, does not occur when Kele(n)1 = Land/or Krlr(n)1 = L. This implies that the fuzzy controller using RBP sometimes takes relatively strong action when the absolute values of the scaled inputs are small and relatively weak action when the absolute values of the scaled inputs are large. In other words, the magnitude of the control action is not always consistent with respect to the magnitude of the inputs. The inconsistency is generally insensible and inappropriate from the control point of view. In addition, the occurrence of at (L,-L) and (-L,L) is undesirable. Thus, RBP is not a reasonable inference method for fuzzy control.
p:n
3.9.6. Conclusion on Fuzzy Inference Methods for Control A few years before the above results were obtained, comparison results of 12 different fuzzy inference methods, including the four described here, were reported in the literature [157]. The other eight inference methods include the standard sequence method, the Godelian logic method, and the Gougen method. The comparison was not conducted theoretically; rather, it was carried out using computer simulation and a first order with a time-delay model. Configurations of the fuzzy controllers differed from those of the fuzzy PI controllers here. According to the simulation results, the fuzzy controllers using RM , RL , RDP , and RBP produced much better results than the fuzzy controllers using the other inference methods. Through rigorous mathematical analysis, we can now conclude that RBP is inappropriate. Therefore, only 3 of the 12 inference methods are suitable for fuzzy control.
3.10. SIMPLEST TITO FUZZY PI CONTROLLER AS TITO NONLINEAR VARIABLE GAIN PI CONTROLLER 3.10.1. Fuzzy Controller Configuration We now extend SISO fuzzy PI control to a TITO (two-input two-output) case. The TITO fuzzy PI controller, shown in Fig. 3.19, uses four input variables:
Et(n) = K~ ·et(n) = K~(St(n) - Yl(n))
(3.23)
Rt(n) = K; ·rt(n) = K;(el(n) - et(n - 1))
(3.24)
E 2(n) = K; ·e2(n) = K;(S2(n) - Y2(n))
(3.25)
R2(n) = K; ·r2(n) = K;(e2(n) - e2(n - 1))
(3.26)
where K~, K;, K;, andK; are scaling factors, andYl(n) andY2(n) are coupling outputs ofa TITO system with respective setpoints, SI(n) and S2(n). Each scaled variable is fuzzified by two fuzzy sets, Positive and Negative. For notations, we use Ai 1 and Ai -1 to represent Positive and Negative fuzzy sets for E i( n), respectively. The same fuzzy sets are' represented by Bit and Bi - 1 for Ri(n). The shapes of the membership functions are identical to those shown i~ Fig.
74
SI(n)
Chapter 3 •
+
Mamdani Fuzzy PID Controllers
EI(n)
et(n)
Input variable calculation Rt(n and scaling
yt(n)
TITO
S2(n)
+
System
Input e2(n variable E2(n) calculation and scaling
y,.{n)
R2(n)
Figure 3.19 Structure of a simplest nonlinear TITO fuzzy PI controller.
3.1. For derivation ofthe fuzzy controller structure, we limit ourselves to [- L,L] for the scaled variables. The mathematical definitions of the membership functions are
_ (e)_L+K!.e 1(n) 1 2L
and
_ (e) _L+K;.e2(n) 2 2L
and
_ (r)_L+K;.rt(n) t 2L
and
_ (r) _L+K;.r2(n) 2 2L
and
JlAl,1
JlA2,1
JlBl,1
JlB2,1
_ (e)_L-K!.et(n) t 2L
JlA1,_1
_ (e)_L-K;.e 2(n) 2 2L
JlA2,_1
_ (r)_L-K;.rt(n) I 2L
JlB1,_1
_ ()_L-K;.r2(n) r2 2L ·
JlB2,_ 1
Note that for each input variable, the sum of two membership functions is 1. Five singleton output fuzzy sets, shown in Fig. 3.20, are used for two incremental outputs of the controller, AUI(n) and AU2(n). These fuzzy sets are expressed, respectively, as AUm~' AUm,I' AUmp, AUm,- I ' and AUm,-2 (m = 1, 2), which may be called Positive Large, Positive Small, Zero, Negative Small, and Negative Large, respectively. Fuzzy set AUmJ(m' m = 1, 2, is nonzero only at
Km·H Ym$.m = - 2 - '
Km = -2,-1,0,1,2.
Since there are a total of 24 different combinations of the four scaled input variables, 16 fuzzy rules are employed and they are in the form of (Table 3.9). IF E I(n) is Alii AND R 1(n) is BIll AND E 2(n) is A2/2
AND R 2(n) is B2/2 THEN
AUI (n)
is AUtJ(l' AU2(n) is AU2J(2
where the subscript I, and .I; are either 1 or -1. The indexes of the input fuzzy sets relate to the indexes of the output fuzzy sets via the following equations: K - II
+- J 1 + s112 -+- J 2 2 2
1--
(3.27)
Section 3.10. • Simplest TITO Fuzzy PI Controller as TITO Nonlinear Variable Gain PI Controller Negative Large
Negative Small
AUm ,- 2
AfJm,_l
Positive Large
Positive Small
AUm,o
7S
AfJm ,2
AfJm,l
Zero
o
-H/2
-H
H/2
H
Figure 3.20 Graphical definition of five singleton output fuzzy sets: Positive Large, Positive Small, Zero, Negative Small, and Negative Large.
and (3.28) where ()2 «()1) should be -1 if an increase ofYl(n) (y2(n)) causes an increase ofY2(n) (yl(n)). Otherwise, ()2 «()1) should be +1. IfYt(n) (y2(n)) does not couple withY2(n) (yt(n)), ()t «()2) should be zero. The product fuzzy AND operator is used, and the resulting memberships are assigned to the output fuzzy sets, ~ Ut ,[(1 and ~ U2 J(2' in the rule consequent via the Mamdani minimum inference method: JlKm = Jl/1 (et)· JlJ1 (rt)· Jl/2 (e2)· JlJ2 (r2)· TABLE 3.9 Controller.
Sixteen Fuzzy Control Rules Used in the Simplest TITO Fuzzy PI
Rule No.
I}
J}
12
J2
K}
K2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
1 1 1 -1 -1 1 1 -1 -1 1 1 -1 1 1 -1 -1
1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1 1 -1
1 1 1 1 -1 -1 -1 -1 1 1 1 1 -1 -1 -1 -1
1 1 1 1 -1 -1 -1 -1 -1 -1 -1 -1 1 1 1 1
1 +£5} £5} £5} -1 +£5} 1- £5} -£5} -£5} -1-£5} 1 0 0 -1 1 0 0 -1
1 +£52 1 1 1 - £5 2 -1 +£52 -1 -1 -1-£52 £5 2 0 0 -£52 £5 2 0 0 -£52
76
Chapter 3 •
Mamdani Fuzzy PID Controllers
Each output variable is separately defuzzified by the centroid defuzzifier:
AUm{n) = Kl1u • Aum{n) = Kl1u m
m
I:Jl;: ·Ym,Km, J.lKm
m = 1,2,
where K Aum are scaling factors.
3.10.2. Derivation and Resulting Structure Using the same approach to the SISO fuzzy PI controllers, we can derive the analytical structure of the TITO fuzzy PI controller: it is the sum of two nonlinear PI controllers, both of which have variable gains: AUI (n) = Kl(e,r)el (n) + K~(e,r)rl (n)
+ <5 1(Kl(e,r)e2(n) + K;(e,r)r2(n)),
and
AU2(n) = <52(K t (e,r )el (n)
+ K;(e,r)rl (n)) + Ki(e,r)e2(n) + K;(e,r)r2(n),
where e = (el(n), e2(n)) and r = (rl(n), r2(n)). There are four variable proportional-gains: I
PI(e,r)KAu K;H 2 p2(e,r)KAu K;H 2L 1 ,Kp(e,r) = 2L 1 ,
3
PI (e,r)KAu K;H
Kp(e,r) = Kp(e,r) =
2L
2
4
,Kp(e,r) =
p2(e,r)KAu K;H 2L 2 ,
and there are four variable integral-gains:
I
K; (e,r) = 3
K; (e,r)
=
PI (e,r)KAu K~H 2L
1
,
PI (e,r)KAu K~H 2L
2
,
In these gains,
PI (e,r) _ 16L8 - L2(E~(n)L2 + E~(n)R~(n) + R~(n)L2 + L 4)(EI (n)R I (n) + L 2) - 32L8 - (Er(n)L2 + Er(n)Rt(n) + Rt(n)L2 + L4)(E~(n)L2 + E~(n)R~(n) + R~(n)L2
+ L4) ,
p2(e,r) _ 16L8 - L 2(Er(n)L2 + Er(n)Rt(n) + Rr(n)L2 + L 4)(E2(n)R2(n) + L 2) - 32L8 - (EI(n)L2 + Er(n)Rt(n) + Rr(n)L2 +L4)(E~(n)L2 +E~(n)R~(n) +R~(n)L2 +L4)·
The proportional-gains and integral-gains vary with PI (e,r) and p2(e,r), which depend on E I (n), E2 (n), R I (n), and R 2 (n). Exchanging EI(n) with RI(n) and/or E2(n) with R2(n) will not affect PI(e,r) and p2(e,r), nor will it alter the expressions of AUm(n). This structural duality is due to the symmetrical configuration of the fuzzy controller with respect to the input variables.
Section 3.12. • Fuzzy PID Controllers as Nonlinear PID Controllers with Variable Gains
77
3.11. FUZZY PO CONTROLLERS Based on the form relationship between the PI controller in incremental form and the PD controller in position form, it is easy to obtain the analytical structure of the simplest fuzzy PD controllers corresponding to the simplest fuzzy PI controllers. For example, the simplest fuzzy PD controller corresponding to the first simplest fuzzy PI controller in Section 3.6 only differs in using u(n) instead of L\u(n) in the four fuzzy rules. Its structure can be obtained directly according to the fuzzy PI controller's structure in Table 3.3. The result is provided in Table 3.10. Replacing L\U(n) by U(n) is the only mathematical difference. Nevertheless, the meaning of the gains has changed: the (variable) coefficient of e(n) is proportional-gain, whereas that of r(n) is derivative-gain.
3.12. FUZZY PID CONTROLLERS AS NONLINEAR PIO CONTROLLERS WITH VARIABLE GAINS It is desirable to extend these SISO and TITO PI/PD results to fuzzy PID controllers. The extension, though achievable, is technically difficult to do. The main difficulty is due to the use of the Zadeh fuzzy AND operator in the fuzzy rules. For fuzzy PID controllers, the division of the input space will be three-dimensional instead of two-dimensional in the cases of the fuzzy PI/PD controllers. The division and the subsequent membership computation will be rather involved mathematically. Recently, the explicit structure of a SISO Mamdani fuzzy Pill controller has been derived [29]. In conventional control, PID control is sometimes realized via a combination of (1) PI control and PD control, (2) PI control and D control, or (3) PD control and I control. This approach can be adopted for fuzzy PID control, and there are several ways to do it (e.g., [140][144][155]). Figure 3.21 shows how to combine a fuzzy PI controller with a fuzzy D controller to form a fuzzy Pill controller. Note that for the fuzzy D controller, the TABLE 3.10 Structure of the Simplest Fuzzy PD Controller in All 12 ICs. Output of the Simplest Fuzzy PD Controller, U(n) =
ICNo.
1 and 3
2(2£
~~le(n)D (Kee(n) + Krr(n»)
2 and 4
2(2£
~-:Ir(n)D (Kee(n) + Krr(n»
5 6 7
KuKrH () KuH ---u:r n + -2KuKeH () KuH ---u:e n + -2KuKrH r(n) _ KuH 2L 2
9
KuKeH e(n) _ KuH 2L 2 KuH
10 and 12 11
-KuH
8
o
78
Chapter 3 • Mamdani Fuzzy PID Controllers
S(n)
Input variable calculation
e(n
+
and scaling
FuzzyD control
Figure 3.21 One combination of fuzzy PI control and fuzzy D control to form fuzzy PID control.
fuzzy logic AND operator is not needed because only one input variable is involved. In the figure, (3.29)
D(n) = Knd(n),
where d(n) is defined in (3.3) and K n is the scaling factor for d(n). (Kn differs from derivative-gain K d in (3.1).) Figure 3.22 illustrates the concept of using fuzzy PI and PD control to realize fuzzy PID control. The mathematical derivation of the controllers' structures is quite straightforward as the structural results in this chapter can be utilized to facilitate the derivation. Summarizing the main structural results on nonlinear fuzzy Pill controllers in this chapter, we make the following general statement.
Theorem 3.1. Fuzzy PID controllers, SISO or MIMO, using various inference methods are nonlinear Pill controllers with variable gains.
Fuzzy PI control
- . ·. . ····--·---·--·------·-----..· · . . -··..·. . ·-i U(n-l) Sen) +
e(n}
Input variable calculation and scaling
Figure 3.22 A combination of fuzzy PI control and fuzzy PD control to realize fuzzy PID control.
Exercises
79
3.13. SUMMARY Under certain conditions, a fuzzy controller can become a linear or piecewise linear controller. This is undesirable, however, and should be avoided. Mamdani fuzzy PIO controllers are inherently nonlinear Pill controllers with variable gains. The characteristics of the gain variation are peculiar and tend to improve control performance. As a result, the fuzzy PID controllers can achieve significantly better performance than their linear counterparts, as demonstrated by the simulation comparisons involving a nonlinear model as well as a time-delay model. However, performance is about the same for the two linear models, suggesting that fuzzy control should not be used to control linear systems. Fuzzy PI/PO controllers using different inference methods are nonlinear PI/PD controllers with different variable-gain characteristics. However, the bounded product inference method has proved inappropriate for fuzzy control because of its undesired gain variation properties. A TITO fuzzy PI controller is also examined. Each output is the sum of two nonlinear PI controllers with variable gains.
3.14. NOTES AND REFERENCES The author achieved the results in Sections 3.5 to 3.8 in 1987 [246]. (See also [20][186] [249][251 ]). They are the first analytical structures of fuzzy controllers in the field of fuzzy control. For the first time, the structure of a fuzzy controller was rigorously and explicitly linked to that of a classical controller, in this case the PIO controller. The analytical derivation method developed here is applicable to any fuzzy controller, as evidenced by analytical results in the literature obtained later by myself and other researchers. Furthermore, the fuzzy PIO controller was shown to be capable of outperforming the linear PIO controller, and the author convincingly unveiled the underlying reasons (i.e., nonlinearity and variable gains). This represents the first time that a precise, analytical, and objective mechanism of fuzzy control was found to convincingly support the claim that a fuzzy controller was superior to a classical controller. The material in Section 3.9 is from [254], and Section 3.10 contains the results in [257]. The paper [35] provides a brief review of fuzzy PID control research in relation to the conventional Pill control.
EXERCISES 1. Derive the explicit structure of the fuzzy PI controller in Section 3.7. 2. Derivation of the analytical structure of fuzzy controllers is generally quite laborious without the aid of computer tools. The derivation task can become substantially easier if a symbolic software package such as Mathematica'Y or Maple™ is utilized. Use such a package, if you have one, to derive the analytical structure of the fuzzy PI controller in Section 3.7. 3. Repeat the simulated comparisons in Section 3.8. 4. What analytical structures of the fuzzy PD controllers correspond to the fuzzy PI controllers in Sections 3.7 and 3.9?
80
Chapter 3 •
Mamdani Fuzzy PID Controllers
5. Experiment with the variable gains of the fuzzy PI controllers in Sections 3.7. and 3.9 that have different value of K e , K r , L, and H. Plot the gain variation characteristics threedimensionally. 6. Implement the fuzzy PD controllers obtained for Problem 1 using MATLAB Simulink" and Fuzzy Logic Toolbox™. Compare the performance between the fuzzy PD controllers and their corresponding linear PD controllers in computer simulation. Use different types of system models. (See Section 3.8. for examples.)
7. What explicit structure of the TITO fuzzy PD controller corresponds to the TITO fuzzy PI controller in Section 3.1O?
8. Conduct a simulated comparison between the TITO fuzzy PI controller in Section 3.10 and the corresponding TITO fuzzy PD controller. Employ a variety of system models in the comparison. 9. Use one of the schemes discussed in Section 3.12 to realize a fuzzy PID controller. Derive its explicit structure. Carry out a simulated performance comparison between the fuzzy PID controller and its corresponding linear PID controller using different system models. 10. Can you make a fuzzy PI, PD, or PID controller that is even simpler than the "simplest" fuzzy PI and PD controllers in this chapter? Your fuzzy controller must be sensible in the context of control, with a clear connection to classical PID control.
Mamdani Fuzzy Controllers of Non-PID Type 4.1. INTRODUCTION Many fuzzy controllers are more complicated than the simplest fuzzy PID controllers discussed in the previous chapter. They employ more input and output fuzzy sets and more fuzzy rules. In many cases, these fuzzy controllers use fuzzy rules that are, or are close to, linear fuzzy rules. In this chapter, we first reveal the analytical structures of a linear fuzzy controller and some nonlinear fuzzy controllers using linear rules in relation to conventional controllers (e.g., PID control and multilevel relay). We then study the analytical structure of a typical fuzzy controller using nonlinear fuzzy rules. Next, we generalize the analytical structures of these specific fuzzy controllers to that of the general fuzzy controllers and establish the structure decomposition property. As a controller design issue, it is desirable to know how many fuzzy rules should be used. The answer is problem dependent, however. To provide the reader a general perspective on how the structure of a general fuzzy controller changes with the number of input fuzzy sets and fuzzy rules, we study the limit structure (the structure when the number of input fuzzy sets and fuzzy rules grows without bound). Finally, we extend these results to MIMO fuzzy controllers as well as fuzzy dynamics models.
4.2. MULTILEVEL RELAY The structure of some fuzzy controllers in this chapter relates to multilevel relay control. As a preparation, we now review the concept of multilevel relay, which is an extension of the onoff switches used in our daily lives. They can be considered as two-level relays, although twOlevel relay has its specific and stricter definition in industrial electronics. If one uses 0 and 1 to represent the on and off states, respectively, then the two levels are 0 and 1, respectively. The switches are one-dimensional relays because they only need one independent variable and one dependent variable to represent their states. A one-dimensional relay can have many levels. Figure 4.1 illustrates, as an example, a one-dimensional three-level relay. Relay output y is 1
81
82
Chapter 4 •
Mamdani Fuzzy Controllers of Non-Pill Type
Output Y
3.5 ,--.--~-------------,
3 2.5
2 1.5
1 f----0.5 ___' Input x
'---_~_~_~_~
0.5
1
1.5
2
2.5
3
3.5
Figure 4.1 An example of one-dimensional multilevel relay : a one-dimensional three-level relay.
2 \~;~~L~ 1.5 Output
2 1.5
z 1 0.5
1
2
Input y
0.5 0
Figure 4.2 An example of two-dimensional multilevel relay : a two-dimensional three-level relay.
when relay input x is in [0,1),2 when in [1,2), and 3 when in [2,3). The relay output changes suddenly at x = 1,2, and 3. Mathematically, this relay can be expressed as y = int(x), where the function intt) rounds x to the nearest integers toward minus infinity. Extending this notion to two independent variables and one dependent variable, we have two-dimensional multilevel relays, an example of which is shown in Fig. 4.2. Relay output z is when inputs x and yare in [0,1) x [0,1). The output z is 1 when x and yare either
°
83
Section 4.3. • Linear Fuzzy Rules and Nonlinear Fuzzy Rules
in [0,1) x [1,2) or [1,2) x [0,1), and 2 when x definition is
z = int(x)
E
[1,2) and Y
E
[1,2). The mathematical
+ int(y).
Ifwe let k = z, i = int(x), andj = int(y), then a generalized two-dimensional multilevel relay is described by the following equation:
k = a(i
+ j),
where a is a nonzero constant. This relay equation will be used later to explain the structure of fuzzy controllers. It is trivial to extend the relay definition to a higher dimension.
4.3. LINEAR FUZZY RULES AND NONLINEAR FUZZY RULES A general fuzzy rule involving two input variables and one output variable can be described as (see (2.15)) IF E(n) is Ai AND R(n) is
Bj THEN u(n) (or L\u(n)) is Vk'
(4.1)
where k = f(iJ) and Vk is a fuzzy set. IfJ(iJ) is a linear function, the fuzzy rule is called the linear fuzzy rule. Otherwise, it is referred to as the nonlinear fuzzy rule. This definition can easily be extended to cover fuzzy rules with more than two input variables. Whether or not a fuzzy rule is linear depends on the function relating the indexes of the input fuzzy sets to that of the output fuzzy set. If Vk is a singleton fuzzy set, a general linear fuzzy rule can be expressed as IF E(n) is Ai AND R(n) is Bj THEN u(n) (or L\u(n)) is Vk , where Vk = ai + bj + c. To avoid possible confusion, we should point out that this is not a TS rule consequent, because i and j, not e(n) and r(n), are involved. If we limit ourselves to a = b = V and c = 0, then the linear rule becomes IF E(n) is
Ai AND R(n) is Bj THEN u(n) (or L\u(n)) is (i + j)V.
(4.2)
We will deal with the general linear function later. Note that the distance between two adjacent singleton output fuzzy sets is
Vk+ I - Vk = (i
+ j + 1)V -
(i
+ j)V =
V
for all the values of k, where V is a constant design parameter chosen by the control designer. In other words, the output fuzzy sets are equally spaced and the space is K To illustrate the scheme of linear fuzzy rules, let us see an example. Suppose that there are five identical input fuzzy sets for E(n) and R(n): Negative Medium (NM), Negative Small (NS), Zero (ZO), Positive Small (PS), and Positive Medium (PM). They are represented as {A- 2, A_I, Ao, AI, A2} and {B-2~B_I~Bo, ~I' B)}. 1}1en,_ according ~o (4.1), there should be nine output fuzzy sets {V- 4 , V- 3 , V- 2 , V-I' Yo, VI' V2 , V3 , V4 } . They may be interpreted as {Negative Very large (NVL), Negative Large (NL), NM, NS, ZO, PS, PM, Positive Large (PL), and Positive Very Large (PVL)}. The resulting 25 linear fuzzy rules are shown in Table 4.1. Though simple, linear fuzzy rules represent a human operator's common-sense control strategy with respect to general systems to be controlled. Take the 25 linear fuzzy rules as an
Chapter 4 • Mamdani Fuzzy Controllers of Non-Pill Type
84 TABLE 4.1
B_2 (NM) B_ 1 (NS) Bo (ZO)
BI B2
(NS) (NM)
An Example Showing How to Construct 25 Linear Fuzzy Rules According to (4.1) when k
A-2 (NM)
A_I
V- 4 (NVL) V- 3 (NL) V- 2 (NM) V-I (NS) VO (ZO)
V- 3 (NL) V- 2 (NM) V-I (NS) VO (ZO) VI (PS)
(NS)
Ao (ZO)
Al
V- 2 (NM) V-I (NS) VO (ZO) VI (PS) V2 (PM)
V-I (NS) VO (ZO) VI (PS) V2 (PM) V3 (PL)
(PS)
= i +j.
A2 (PM) VO (ZO)
VI
(PS)
V2 (PM) V3 (PL) V4 (PVL)
example. The rules are symmetric about the off-diagonal of the table. Within a row, u(n) (or Au(n» gradually increases from left to right, while within a column, u(n) gradually increases from top to bottom. Also note that u(n) corresponding to Ao and Eo is Vo and that u(n) corresponding to the central area of the table is small (e.g., V_lor VI). These characteristics reflect both characteristics of general systems and the consistency of the operator's control action. The fuzzy rules used for the majority of fuzzy controllers in the literature, though different from case to case, share these common features to a large extent. It is due to these common characteristics that nonlinear fuzzy rules usually can only mildly deviate from the linear ones. The additional and practical factor preventing fuzzy rules from being severely nonlinear is that the number of fuzzy rules for most (two-input) fuzzy controllers often has to be quite small, say between 25 and 169. Table 4.2 gives 25 example nonlinear fuzzy rules in comparison with the linear rules shown in Table 4.1. The four entries that are different from the corresponding linear ones are marked with an asterisk (*). Using linear fuzzy rules mayor may not result in a linear fuzzy controller. In the next section, we show an example of when it does.
4.4. FUZZY CONTROLLER WITH LINEAR FUZZY RULES AS LINEAR CONTROLLER
4.4.1. Fuzzy Controller Configuration Assume that a fuzzy controller uses N input fuzzy sets for E(n) and R(n). This assumption does not lose generality because if the number of fuzzy sets for E(n) differs from that for R(n), fuzzy sets can always be added to the smaller set to attain equality. Also, we suppose that among the N fuzzy sets, J fuzzy sets are for the positive value of E(n) and R(n), TABLE 4.2
B_2 (NM) B_ 1 (NS) Bo (ZO) BI (NS) B2 (NM) 8
Twenty-five Example Nonlinear Fuzzy Rules with Respect to the Linear Ones in Table 4.1. 8
A_2 (NM) V_ 4 (NVL) V_ 2
(NM)* V- 2 (NM) V-I (NS) VO (ZO)
A_I
(NS)
V- 2 (NM)* V-I V-I
(NS)* (NS) VO (ZO) VI (PS)
Ao (ZO)
Al
V- 2 (NM) V-I (NS) VO (ZO) VI (PS) V2 (PM)
V-I
(PS) (NS)
VO (ZO)
VI V2 V3
The four rules marked with * are those that are different from the corresponding roles.
(PS) (PM) (PL)
A2 (PM) VO (ZO) VI (PS)
V2
(PM)
V3 (PL) V3 (PL)*
Section 4.4. •
Fuzzy Controller with Linear Fuzzy Rules as Linear Controller
85
another J sets for the negative value of E(n) and R(n), and one set for approximately zero value of E(n) and R(n). The minimum of J is 1. So, N = 2J + 1 ~ 3.
The input fuzzy sets for E(n) are represented by
{A_ J , A_J+1 , · •• ,A-I' Ao, AI'··· ,AJ- 1, AJ }, whereas those for R(n) are represented by
{B_J , B_J+l , ••• ,B_ 1 , Bo, B1, · · . ,BJ- 1, BJ }.
°
The positive (negative) indexes specify the fuzzy sets for the positive (negative) value of E(n) and R(n), and the index corresponds to the near zero value. The membership functions of the fuzzy sets are identical triangles uniformly distributed over E(n) and R(n) axes. They are expressed as
{,u-J(x) , ,u-J+1 (x), ... , ,u-1(x), ,uo(x), ,u1 (x), ... , ,uJ-l (x), ,uJ(x)}, where x is either e(n) or r(n), and ,ui(X) satisfies the following conditions: (1)
(2)
for i = -J + 1, ... , J - 1, x - (i - 1)8 8 ,ui(x) = X - (i + 1)8 8 0, for i
=J
or i
E [(i -
X
E [i8, (i
x
~
= -J, X -
,uJ(x) =
1, {
(J - 1)8
8
0,
_ { - x-
,u-J(x) -
'
1)8, is]
X
[(i -
+ 1)S] 1)8, (i + 1)S]
(4.3)
x E [(J - 1)8,JS] x E [J8, 00)
any other x value,
(-~ + 1)8,
x E [-J8, (-J + 1)51
1,
x E (-00, -JS]
0,
any other x value
where S is the space between the centers of two adjacent fuzzy sets. Figure 4.3 shows an example of such membership functions with N = 7 (i.e., J = 3) and S = 5. According to the figure as well as (4.3), it is obvious that
,ui(X) + ,ui+l(X) = 1,
x E (-00,00).
Denoting the center of ,ui(X) as Ai and letting A-J = -L, Ao = 0, and AJ = L, then L
S=]. Consequently, Ai = i· S. It is obvious that the base of each triangular fuzzy set is 2S. The equality of the bases does not imply loss of generality. Although the bases of the fuzzy sets for E(n) and R(n) are the same, the bases are different with respect to the actual input variables, e(n) and r(n).
86
Chapter 4 • Mamdani Fuzzy Controllers of Non-Pill Type Membership
- - - - + - - - - t - - - - t - - - - t - - - - - t - - - - - + - - - - + - - -. ..!.
-IS
-10
o
-5
10
5
15
Figure 4.3 An example of triangular membership functions that meet the conditions set in (4.3). Here, N = 7 (i.e., J = 3) and S = 5.
There are 2N - 1 (i.e., 4J + 1) singleton output fuzzy sets, among which 2J sets are for positive L\u(n) (or u(n», another 2J sets for negative L\u(n), and one set for near zero L\u(n). These equally spaced fuzzy sets are nonzero only at Vk, and we let V- 2 J = -H, Vo = 0, and V2 J = H. Thus, the space between two adjacent fuzzy sets is
H
H
V= 2J= N -1 and
k·H
Vk = k- V = N _ 1 ·
N 2 linear fuzzy rules (4.2) are used to cover all possible combinations of Ai and Bj . The product fuzzy AND operator, the Lukasiewicz fuzzy OR operator, the Mamdani fuzzy inference method, and the centroid defuzzifier are used.
4.4.2. Structure Derivation and Explicit Results We now show that this fuzzy controller is actually a linear controller. Without losing generality, we assume that
i.s .s e(n)
~
(4.4)
(i+ I)S
i- S .s R(n) .s (j + I)S.
(4.5)
After being fuzzified, the membership values for E(n) and R(n) are: Il
.(e) = _ E(n) -SCi + I)S
-
for Ai'
r: ,
J-li+l(e)
=
E(n) - i·S
S
-
for A i+ 1 ,
I{j(r) = - R(n) - s(j + I)S
rJ
J1.j+l(r) =
R(n) - j-S S
for B- j , and
for Bj + 1.
87
Section 4.5. • Typically Fuzzy Controller with Linear Fuzzy Rules
The membership value for all other input fuzzy sets is zero. Therefore, only the following four fuzzy rules are executed:
+ j + 2)V IF E(n) is Ai + 1 AND R(n) is Bj THEN L\u(n) is (i + j + I)V IF E(n) is Ai AND R(n) is Bj +1 THEN L\u(n) is (i + j + I)V IF E(n) is Ai AND R(n) is Bj THEN L\u(n) is (i + j)V.
IF E(n) is Ai +1 AND R(n) is Bj +1 THEN L\u(n) is (i
(rl) (r2) (r3) (r4)
Since rules r2 and r3 generate two memberships for the same output fuzzy set, the Lukasiewicz fuzzy OR operation is used. Note that Jli(e)
+ Jlj(r ) =
1-
E(n) - (i
+ 0.5)8 + R(n) 8
- (j
+ 0.5)8
1
::s ,
owing to
o::s E(n) -
(i
+ 0.5)8 + R(n) -
(j
+ 0.5)8 ::s 8.
Hence, the combined membership value is always the sum of the membership values being ORed. Therefore, Jli+l (e)Jlj+l (r)(i
IiU( ) - K n -
+ j + 2) + Jli+l (e)Jlj(r)(i + j + 1)
V +JLi(e)JLj+\(r)(i + j + 1) + JLj(e)JLir)(i + j) Au Jli+l (e)Jlj+l (r) + Jli+l (e)Jlj(r) + Jli(e)Jlj+l (r) + Jli(e)Jlj(r) ·
Substituting the membership functions into the above expression, we get the following: L\U( ) =Ke·KAu·H ()
n
2L
en+
Kr·KAu·H ( ) 2L rn,
which is a linear PI controller in incremental form. The proportional-gain and integral-gain are constants. This result should not be surprising because the fuzzy controller's configuration in [i· 8, (i + 1)8] x [j. 8, (j + 1)8] is similar to the configuration of the simplest linear fuzzy PI controller in [-L,Ll x [-L,Ll (see Section 3.4). It can be proved that the fuzzy controllers with the same configuration but more than two input variables are also linear fuzzy controllers. Moreover, there exist other linear fuzzy controllers (e.g., [20][82][149][230]). We formally state this fact as follows. Theorem 4.1. Some fuzzy controllers with linear fuzzy rules are just linear controllers, of which the linear PID controller is a special case. The importance of this theorem is to make people aware that a fuzzy controller using many fuzzy rules can still be a linear fuzzy controller.
4.5. TYPICALLY FUZZY CONTROLLER WITH LINEAR FUZZY RULES Linear fuzzy rules alone do not necessarily produce a linear fuzzy controller. It is the combination of linear fuzzy rules with other components that sometimes makes a linear fuzzy controller. We show this point by altering one of the components of the above linear fuzzy controller: We change product fuzzy AND operation to Zadeh fuzzy AND operation. The new fuzzy controller is quite typical. Let us see how its analytical structure changes accordingly.
Chapter 4 •
88
Mamdani Fuzzy Controllers of Non-Pill Type
4.5.1. Structure Derivation The structural derivation is similar to that in the previous section. Indeed, part of the derivation will be utilized below. Because of the Zadeh fuzzy AND operation, it is necessary to divide the input space into les. We will first study the situations in which both E(n) and R(n) are within the interval [-L,L]. Other situations will be dealt with later. To determine the results of the Zadeh fuzzy AND operation in linear fuzzy rules rl to r4, we make a square configured by the intervals [i· S, (i + 1)S] and [j. S, (j + 1)S] and divide it into four les, as shown in Fig. 4.4a. The reason for such divisions is the same as that given for Fig. 3.3. The outcome of evaluating the fuzzy AND operations in rl to r4 is listed in
R(n) (j+l)S
IC2 E(n) (i+l)S
IC4
is (a)
R(n)
t
IC8
IC7
IC6
L
IC9
-L
0
L
ICS
-L
ICIO
ICII
I
ICl2
(b)
Figure 4.4 ICs of E(n) and R(n) must be considered for the Zadeh fuzzy AND operation in the four fuzzy rules rl to r4: (a) four les when both E(n) and R(n) are within [-L, L], and (b) 8 les when either E(n) or R(n) is outside [-L,L].
89
Section 4.5 . • Typically Fuzzy Controller with Linear Fuzzy Rules
TABLE 4.3 Results of Evaluating Zadeh Fuzzy AND Operations in the Four Linear Fuzzy Rules rl to r4 for the 12 ICs Shown in Fig. 4.4. IC No. 1 2
3 4 5 6 7 8 9 10 11 12
rl
r2
r3
r4
Pj+l (r) Pi+l(e) Pi+l(e) Pj+l (r) Pj+l(r)
Pj(r) Pj(r) Pi+l(e) Pi+l(e) Pj(r)
Pi (e) p;(e) Pj+l (r) Pj+l (r)
Pi(e) Pj(r) Pj(r) Pi(e)
Pi (e)
o o
o
1
o o o
pi+l(e)
o
o o o o
o
Pi+l(e)
1
o o
o
1
o
Pj+l (r)
Pj(r)
o o o
1 Pi(e)
o
Table 4.3. Since the combined membership value by the Lukasiewicz fuzzy OR operation is always the sum of the membership values being ORed,
AU( ) - K n -
V Au
min(Jli+l (e), Jlj+l(r»(i +j + 2) + min(Jli+l (e), Jlj(r»(i + j + 1) +min(Jlj(e), J1.j+l (r»(i + j + 1) + min(p.j(e), J1.i r » (i + j) min(,ui+l (e), Jlj+l(r) + min(Jli+l(e), ,uj(r» . +min(,ui(e), ,uj+l(r) + min(,ui(e), Jlj(r»
4.5.2. Resulting Structure Substituting the results in Table 4.3 into the above expression, we get the following (see Table 4.4):
where
AUReJay(ij) = (i +j
+ 1)~~~,
and AU (IiE,M) PI
= liE(n) + M(n) x K Au • H 2(8 - input)
N - 1
where
liE(n) = E(n) - (i
+ 0.5)8,
M(n) = R(n) - (j + 0.5)8,
.
mput=
{ IIiE(n)l,
for IC 1 and IC3
IM(n)l,
for IC2 and IC4.
90
Chapter 4 • TABLE 4.4 4.4.
Mamdani Fuzzy Controllers of Non-Pill Type
Expressions of AU(n) for the 12 ICs, Shown in Fig.
IC No.
1&3 2&4
AU(n) (
..
I)K8.u· H N _ I
M(n)+M(n)
K8.u·H
+ 2(8 -IM(n)1) x N - I H . . I)K8.u· M(n) + M(n) K8.u·H ( 1+J + N _ I + 2(8 _ IM(n)1) x N - I 1+J +
.)K8.u· H
5
(J
7
(i +J)K8.u ·H
9
(-J
II
(i _J)K8.u ·H
6 8 10 12
K8.u· H
+J N-I N-I
H
. S)K8.u· + (R() n -J' ---u;-
+ (E(n) _ i .S)K8.u ·H 2L
+ j)K8.u ·H + (R(n) _ j N-I
N-I
.S)K8.u ·H 2L
+ (E(n) _ i .S)K8.u ·H 2L
o
-K8.u· H
o
According to the definition in Section 4.2, I1URelay(i,j) is a two-dimensional multilevel relay with respect to i and j, which can be rewritten as
l1URelay (i J ) = (i +j + 1)~~~ = [(i + 0.5)S + (j + 0.5)8] S~:;~~) = [(i + 0.5)8
+ (j + 0.5)8] KtJ.~L·H .
Note that ((i + 0.5)8, (j + 0.5)8» is the center coordinate of the square shown in Fig. 4.4a. Evidently, the multilevel relay computes its control action according to the center location, with respect to the origin of E(n) and R(n), of the square in which (E(n), R(n» lies. For this reason, we name this relay a global multilevel relay. Such a controller is called global controller in general. The second part of i1U(n), denoted as i1Up/(M,M), is a nonlinear controller. The computation of I1Up / (M ,M ) is based on M(n) and M(n), which is the relative position of (E(n) , R(n» with respect to the center of the square, ((i + 0.5)8, (j + 0.5)8), in which (E(n) , R(n» lies. Thus, the role of this nonlinear controller is to locally adjust the control action generated by the global multilevel relay. To contrast with the meaning of global, we call such a controller a local controller. i1Up/(M,M) can be expressed as i1Up/(M,M) = Ki(M,M) (e(n) _ (i
+;~5)S) + KiM,M)(r(n) _
(j +~.5)S)
91
Section 4.5. • Typically Fuzzy Controller with Linear Fuzzy Rules
where
K (M M) = Kr ·K!!,.u .Hp(M M) = K r ·K!!,.u .Hp(M M) p' 2S(N - 1 ) ' 4L "
(4.6)
K.(M M) = Ke · K!!,.u . H P(M M) = K e . K!!,.u · H P(M M) I ' 2S(N - 1 ) ' 4L '
(4.7)
and
S P(M,M)=S· . -mput
(4.8)
AUp/(M,M) is a nonlinear PI controller, in incremental form, with a local and dynamically changing steady state + 0.5)S / Ke , (j + 0.5)S / K r ) . Note that the steady state of a typical PID control system is the origin and does not vary. The proportional-gain and integral-gain of AUp/(M,M) change with the input variables. The gain variation characteristics are determined by P(M,M). Qualitatively, the gains of AUp/(M,M) vary in a similar fashion to those of the simplest nonlinear PI controller because of the close similarity between (4.8) and (3.13). It follows that the geometry of these gain variations is also similar. The main difference is the region where the variations take place. For the simplest fuzzy PI controller, it is the entire E(n) - R(n) plane, whereas for the fuzzy controller with linear rules, it is a much smaller and local region-the square confined by [i· S, (i + 1)8] x [j. S, (j + 1)8]. Roughly speaking, the further (E(n),R(n» is away from the center of the square + 0.5)S,(j + 0.5)S), the larger the proportional-gain and integral-gain. The range of P(M,M) is
«i
«i
1 .s P(M,M)
.s 2.
Hence, the ranges of the proportional-gain and integral-gain are
Kr ·K!!,.u ·H < K (M M) < Kr ·K/iu ·H 4L
-
p
,
-
2L
Ke ·K!!,.u ·H < K.(M M) < K e ·K!!,.u .H. 4L
-
I
,
-
2L
The ranges of the proportional-gain and integral-gain are independent from N. This means that the ability of the local nonlinear PI controller to adapt locally to the input state is the same regardless of N. However, the role of the local nonlinear PI controller in total control action depends on N, which will be discussed later in this chapter. Having studied the situation where both E(n) and R(n) are in [-L,L], let us now investigate the remaining cases: Either E(n) or R(n) is outside [-L,L]. We first need to divide the E(n)-R(n) plane outside the square configured by [-L,L] x [-L,L] into eight ICs, as shown in Fig. 4.4b. Then, using the same method described above, one can derive the analytical structure of the fuzzy controller (Table 4.4). According to the table, the fuzzy controller becomes the sum of a global one-dimensional multilevel relay and a local linear proportional controller for IC5 and IC9, or the sum of a global one-dimensional multilevel relay and a local linear integral controller for IC? and IC 11. The fuzzy controller generates its maximum increment (K!!"u·R) in IC6 and maximum decrement (-K!!"u·R) in IC10. For the IC8 and IC12 regions, the increment is zero. Like the simplest fuzzy PI controllers discussed in Chapter 3, on the boundary of adjacent ICs, AU(n) calculated by using anyone of the expressions involved is the same.
Chapter 4 • Mamdani Fuzzy Controllers of Non-Pill Type
92
There is no discrepancy in control action, and the action always changes smoothly. This property also holds for the rest of the fuzzy controllers and systems in this book. For brevity, we will not state this property for each individual fuzzy controller/system. Because of the relationship between a PI controller in incremental form and a PD controller in position form, the local PI controller becomes a local PD controller if u(n), instead of Au(n), is used in the fuzzy rules. We summarize the results in this section as follows. Theorem 4.2. The structure of the typical fuzzy controller using linear fuzzy rules is the sum of a global two-dimensional multilevel relay and a local nonlinear PI or PD controller with variable gains.
4.5.3. Relationship with the Simplest
Fuzzy PI Controller
We now explore the relationship between the present fuzzy controller and the simplest nonlinear fuzzy PI controller with two input fuzzy sets (i.e., N = 2) in Section 3.6. Structurally speaking, the local nonlinear PI controller and the simplest fuzzy PI controller are similar. The local nonlinear PI controller is
KA ·R
AUp/(AE',AR) =
{
2(N - 1)(; -1AE'(n)l) (AE'(n)
+ AR(n»,
ICI and IC3
K A ·R 2(N - 1)(; _ IAR(n)1) (AE'(n)
+ AR(n»,
IC2 and IC4
whereas the simplest fuzzy PI controller is
AU(n) =
KA·R 2(2L ~ IE(n)1)(E(n) {
+ R(n»,
ICI and IC3
~ IR(n)1) (E(n) + R(n»,
IC2 and IC4.
KA ·R
2(2L
Note that the meaning of ICI to IC4 for the two fuzzy controllers is different but somewhat related. The structure of the simplest fuzzy PI controller does not contain a multilevel relay, and hence the fuzzy PI controller itself is a global controller. Its control action is with respect to the global and fixed steady state (0,0). On the other hand, AUp/(AE',AR) is in terms of a local and dynamically changing steady state ((i + 0.5)S/Ke , (j + 0.5)S/Kr ) . The role that the local nonlinear PI controller can play in total control action is less significant because the global multilevel relay is always more important. (AURelay(i,j) is never 0.) The role of AUp/(AE',AR) in total control action is smaller when N is larger.
4.6. FUZZY CONTROLLER USING LINEAR FUZZY RULES AND TRAPEZOIDAL OUTPUT FUZZY SETS We now investigate the analytical structure of a fuzzy controller that is the same as that in the previous section except it employs trapezoidal output fuzzy sets instead of the singleton ones. There are 4J + I trapezoidal fuzzy sets uniformly distributed over [-R,H] for Au(n), as illustrated in Fig. 4.5. The upper and lower sides of each trapezoid are 2A and 2 V,
Section 4.6. • Fuzzy Controller Using Linear Fuzzy Rules and Trapezoidal Output Fuzzy Sets
93
Membership
Au(n)
o
-H=2JV
Figure 4.5 4J
kV
(k+l)V
H=2JV
+ 1 uniformly distributed trapezoidal output fuzzy sets for Au(n).
respectively, where V is the distance between the centers of two adjacent fuzzy sets. We use the parameter
O=~ V
to define the shape of the trapezoids where 0 ~ 0.5 to avoid overlay between the upper sides of two adjacent sets. The fuzzy controller uses the Mamdani minimum inference method. The inference result is already given in Table 3.6, and the only change required is to replace H by V (Le., SM{Jt) = Jl(2 - Jl + JlO)V). The resulting structure is provided in Table 4.5, and Theorem 4.2
TABLE 4.5
Structure of the Fuzzy Controller that Uses Trapezoidal Output Fuzzy Sets.
ICNo. 1,2,3, & 4 5
7 9
11 6 8 10 12 Note:
.
KiAE,AR)
= K r • ~r
K/(AE,AR)
= Ke ·~r ·H P(AE,AR)
a Expression
H P(AE,AR)
of AU(n) for the 12 ICs shown in Fig. 4.4.
Chapter 4 • Mamdani Fuzzy Controllers of Non-Pill Type
94
also holds for this fuzzy controller. More specifically, in ICI to IC4, its structure is identical to that in the last section with only one difference, as follows: (1 + (J)S2
M AR _
P(
,
+ (1 -
(J)SIM(n) - AR(n)j
) - (1.5 + O.5(J)S2 - (1 + (J)S x input - (1 - (J)[(M(n»2
+ (AR(n)il·
(4.9)
The structure for IC5 to IC12 is also quite similar to that in Table 4.4 except variable gains Kp(M,AR) and Kr(IiE,AR) are involved now. It is easy to prove that in ICI to IC4,
and hence (1
+ 8)Kr ·K~u ·H < 2(3 + O)L -
K (liE AR) < Kr ·K~u ·H p , (1 + O)L '
(1
+ fJ)Ke ·K~u ·H < 2(3 + O)L -
K.(1iE AR) < K e ·K~u .H. I , (1 + O)L
The ratio of the upper andIower bounds is the same for P(M,AR), Kp(IiE,AR), and Ki(M,AR), which ranges from 3.11 when 8 = 0 to 6 when 0 = 0.5.
4.7. FUZZY CONTROLLER USING LINEAR FUZZY RULES AND THREE INPUT VARIABLES To this point, Theorem 4.2 holds for the structure of two different types of fuzzy controllers using linear rules and two input variables. A logical question follows: Can Theorem 4.2 be extended to cover the corresponding fuzzy controllers that use linear fuzzy rules and more than two input variables? The answer is: It depends. For some fuzzy controllers, the answer is yes, while for others the answer is no. We now exemplify the latter case below. Let us study the structure of a fuzzy controller whose configuration is the same as the one in the last section except for the following two differences. First, three, instead of two, input variables are used, and the additional variable is D(n) defined in (3.29). Accordingly, linear fuzzy rules are represented by IF E(n) is Ai AND R(n) is Bj AND D(n) is
c,
THEN u(n) (or ~u(n» is V;+j+k,
c,
where is a fuzzy set for D(n). There are 6J + 1 uniformly distributed trapezoidal output fuzzy sets over [-H,H] and the distance between two adjacent sets is H
V=3J· The second difference is more significant: The product AND fuzzy operator is used instead of the Zadeh AND operator. When three input variables are involved, analytical derivation of the fuzzy controller's structure becomes much more difficult if the Zadeh AND operator is used, because of the required divisions of the input space into ICs. Such divisions, however, are not needed when the product AND operation is employed.
Section 4.7. • Fuzzy Controller Using Linear Fuzzy Rules and Three Input Variables
95
The structure derivation is not too difficult and follows the same line as those described above. We leave the derivation as an exercise to the reader and just provide the final result as follows. (Detailed derivation and analysis are provided in [275].) ~U(n)
= ~URelay(iJ,k) + ~UL(M,M,MJ).
(4.10)
In the expression, AURelay(ij,k) = (i
+ j + k + 1.5)~~~,
AUL(M,M,MJ) = Kj(M,M,MJ) ( e(n) -
(i
+ Kp(M,M,MJ) (r(n) -
+K0.5)S) e
(j +~.5») + K d ( den) _ (k
-::S)S)
+ K(M,M,MJ)· M(n)· M(n)· MJ(n). (k + 0.5)S. Here, Kp(AE,M,MJ), Ki(M,M,MJ), and Kd(M, M,
where MJ(n) = D(n) MJ) are variable proportional-gain, integral-gain, and derivative-gain, respectively: Kp(M,M,MJ) =
K ·KA·H u r 6L P(M,M,MJ),
Ki(M,M,MJ) =
K ·KA·H u e 6L P(M,M,MJ),
Kd(M,M,MJ) =
KD·KAu·H 6L P(M,M,MJ),
where P(
M M MJ) = Nt (M,M,MJ) " 'P(M,M,MJ) ,
Nt(M,M,MJ)
= 4(7 + O)~ -
16(1 - O)[M(n)· M(n)
+ M(n)· MJ(n)
+ M(n)· MJ(n)]~, W(M,M,MJ) = (15 + O)S6 - 4(1 - O){16(M(n)· M(n)· MJ(n))2 + 4S2[(M(n). M(n))2 + (M(n). MJ(n))2 + (M(n). MJ(n))2] + ~[(M(n))2 + (M(n))2 + (MJ(n))2]}. K(M,M,MJ) is a variable gain:
K(
M M MJ K Au' H N 2(M,M,MJ) , , ) = 3LS2 · 'P(M,M,MJ) ,
where N 2(M,M,MJ)
= 8(1 -
O){3S 2 - 4[M(n)· M(n)
+ M(n)· MJ(n) + M(n)· MJ(n)]}S4.
The structure expressed by (4.10) is for the whole input space. According to this structure, the three-input fuzzy controller is the sum of a global three-dimensional multilevel relay, denoted as ~URelay(iJ,k), and a local nonlinear controller, designated as ~UL(M,M,MJ). The local controller is not a nonlinear PID controller. This would be unexpected if one postulated that
96
Chapter 4 •
Mamdani Fuzzy Controllers of Non-Pill Type
the structural extension from the two-input fuzzy controller to the present three-input controller would hold. Rather, the local controller is a nonlinear PID controller plus another local nonlinear controller, namely, K(M,AR,W)· M(n)· AR(n)· W(n). From the fuzzy controller in this section, it is clear that Theorem 4.2 cannot be extended in general to cover fuzzy controllers with more than two input variables. Determining whether the theorem is applicable requires the explicit structure of the fuzzy controller of interest.
4.8. TYPICAL TITO FUZZY CONTROLLER WITH LINEAR FUZZY RULES 4.8.1. Fuzzy Controller Configuration We now extend the SISO results to a TITO fuzzy controller with the following configuration. The four input variables are the same as those in (3.23) to (3.26). For each input variable, the number, shape, and distribution of input fuzzy sets are identical to those used in Section 4.4. The notations for input fuzzy sets and fuzzy rules follow those used in Section 3.10. The product fuzzy AND operator, the Lukasiewicz fuzzy OR operator, the Mamdani minimum inference method, and the centroid defuzzifier are employed. N 4 linear fuzzy rules are needed, which are represented by IF E 1(n) is A1'/1 AND R 1(n) is B1,J 1 AND E 2 (n) is A2 '/2 AND R2(n) is B2,J2 THEN L\ul(n) is L\U1,K 1 ' L\u2(n) is L\U2,K 2 where
and K 2 = ~2(/l +J1) +/2 +J2·
Note that the links between K 1 and K 2 and 11' 12, J h and J 2 are different from those in (3.27) and (3.28). The meanings of ~1 and ~2 are somewhat different, too. ~l and ~2 are integers whose sign and magnitude depend on how the system outputs are coupled. If an increase of Yl (n) (y2(n» causes an increase of Y2(n) (Yl(n» , ~2 (~1) should be negative. Otherwise, ~2 (~1) should be positive. Furthermore, the stronger the coupling between the outputs, the larger the absolute value of ~1 and ~2 should be. When there is no coupling, ~1 and ~2 should be zero. There are two identical sets of evenly distributed trapezoidal output fuzzy sets defined over [-H, H]. Each set contains 4J(1 +~) + 1 fuzzy sets where ~
= max(I~t1,
1~21)·
Among them, 2J(1 +~) sets are for positive L\um(n), 2J(1 +~) sets for negative L\um(n), and one set for near zero L\um(n). The space between the centers of any two adjacent fuzzy sets is H
V
= 2J(1 + b)"
A plot of the fuzzy sets would be very much like Fig. 4.5 except V is smaller. For brevity, we do not plot them.
Section 4.8. •
97
Typical TITO Fuzzy Controller with Linear Fuzzy Rules
4.8.2. Derived Structure Structure derivation is quite similar to the SISO cases but more mathematically involved because of the additional two input variables. (See [262] for details.) Each output variable can be expressed as the sum of a global four-dimensional multilevel relay, ~URelay(I, J) and a local nonlinear PI controller with variable gains, ~Un(M,M): ~Um(n) = ~URelay(I, J)
+ ~UPI(M,M)
where Auielay(I, J) = [(II + J I
AU~lay(I,J) = AUftl(M,M)
+ 1) + e>1 (12 + J2 + 1)](1 :~)(~~ 1)'
[e>2(II +JI + 1) + (I2 +J2 + 1)](1
= K/(M,M) (el(n) _
(II
:~)(~~ 1)'
:~.5)j +K~(M,M)(rl(n) _
+ ()I [Kl(M,M) (e2(n) _
(12 ~.5)S)
+K;(M,M) (r2(n) - (J2 ~.5)j AU},I(M,M) = ()2[ Kl(M,M) (el(n) _ (II +K;(M,M) (rl(n) - (JI
+~(M,AR)(r2Cn) _ In these expressions, I
where
= (11,12) ,
J.
:~.5)S)
:rS)j]+
Ki(M,M)(e2(n) _ (12 ~.S)S)
(J2 ~.5)S).
J = (J1 , J 2 ) , M
= (M1,M2 ) ,
and AR = (AR 1 , AR 2 )
+ 0.5)8, (JI + 0.5)8, (12 + 0.5)8, (J2 + 0.5)8.
M 1(n) = E 1(n) - (II M 1(n) = R 1(n) M 2 (n) = E2 (n) M 2 (n) = R2 (n) -
The variable proportional-gains of the local nonlinear PI controllers are I
=
2
=
3
=
Kp(M,AR) Kp(M,AR) Kp(M,AR) 4
Kp(M,AR) =
(JI :~.S)S)
K!·KAu ·H 2L(1 ~ e»
PI (AE,M),
K; ·KAu1 ·H ·1()t1 U(1 + e» P2(M,AR),
K!.KAu2 · H
2L(1 + e»
K;·KAu ·H U(1'; e»
· I()2 1
PI (AE,AR),
P2(AE,M),
98
Chapter 4 • Mamdani Fuzzy Controllers of Non-Pill Type
whereas the variable integral-gains are
PI (M,M) and P2(M,M) are as follows:
PI (M,M) =
N1(M,M) '¥(M,M) ,
where
N1(M,M) = 2S8 - S2(1 - 0)(0.5st + 2AE~S2 + 8AE~R~ + 2M~)(AEIMI + 0.45S2), N2(M ,M ) = 2S8 - S2(1 - 0)(0.5~ + 2AErS2 + 8AErMi + 2Mi)(AE2M2 + 0.25S2), \P(M,M) = (1.9375 + 0.06250)S8 - (1 - 0)[0.25S2(AEr + Mi)(st + 2AE~S2
+ 16AE~M~ + 2M~S2) + 0.25S2(AE~ + AR~)(st + 2AErS2 + 16AErARi + 2ARiS2) + (AErMi + AE~AR~)st + 16AErARiAE~AR~].
The detailed derivation of this structure and analysis of the gain variation characteristics can be found in [262].
4.9. TYPICAL FUZZY CONTROLLER WITH NONLINEAR FUZZY RULES 4.9.1. Fuzzy Controller Configuration In this section, we study a fuzzy controller whose configuration is the same as the one in Section 4.4 except for the following two differences. First, nonlinear fuzzy rules are employed. Second, trapezoidal input fuzzy sets are used. Both extensions make the present fuzzy controller much more general and also make the fuzzy controllers in the earlier sections, which use triangular input fuzzy sets and linear rules, its special cases.
99
Section 4.9 . • Typical Fuzzy Controller with Nonlinear Fuzzy Rules
Membership
~OO
~
i
NOO
~~ r::
\
,
\ \
\
\
\
E(n)
\
o -JS
-(J-l)S
(i-l)S
is
(i+l)S
(i+2)S
(J-l)S
JS
R(n)
Figure 4.6 2J + 1 uniformly distributed trapezoidal input fuzzy sets.
The locations of the N = 2 J + 1 uniformly distributed trapezoidal input fuzzy sets are identical to the triangular ones, and their shapes are described by (see Fig. 4.6): for -J+l ~i~J-l, 0,
(1)
x-(i-l)S S-A
(i-l)S~x~i·S-A
1,
Jli(X) =
x < (i - I)S
i·S-A~x~i·S+A
x-(i+l)S S-A
i · S + A ~ x ~ (i x > (i
0,
+ I)S
+ I)S
for i = J or i = -J,
(2)
JlAx) =
{
0, x - (J - I)S S-A'
x < (J - I)S
1,
J .S - A
(J-l)S~x~J·S-A ~
x<
+00
-00 < x ~ -J · S + A x- (-J + I)S S-A ,-J·S+A~x~(-J+l)S
I,
Jl-J(x)=
{
0,
x> (-J+l)S
where 2A and 2S are the upper and lower bases of the trapezoid, respectively. We also use the ratio of the upper and lower bases of the trapezoid
o=~s to quantitatively characterize the membership functions. When 0 = 0 (or equivalently, A = 0), a triangular membership function results. To avoid intersection of two adjacent upper bases, we restrict 0 .s A ~ 0.5S, making 0 s 0 .s 0.5. The fuzzy controller uses N 2 nonlinear fuzzy rules obeying the following format: IF E(n) is Ai AND R(n) is Bj THEN L1u(n) isf(iJ)V,
(4.11)
100
Chapter 4 • Mamdani Fuzzy Controllers of Non-PID Type
where f can be any function as long as its value is integer with respect to all combinations of i and j. The role of f is to generate the fuzzy rules, linear or not, desired by the designer; different rules can be generated by using different f. Fuzzy rules are nonlinear if they are generated by f that is the nonlinear function of i and j. Using f is more general, systematic, and concise than the common way of describing fuzzy rules in the form of a rule table. In addition, it makes mathematical manipulation easier. The number of output fuzzy sets obviously depends on f. We use W=2K+l
uniformly distributed singleton output fuzzy sets, where K = maxt] f(iJ) I),
-J
.s i, j .s J.
K fuzzy sets are for positive ~u(n), another K sets are for negative Jiu(n), and the remaining one is for near zero ~u(n). The distance between two adjacent fuzzy sets is
H
H
V=2K=W-l·
The configuration of this fuzzy controller is typical.
4.9.2. Derivation and Resulting Structure We first reveal its structure by the following theorem and then explain how to derive it. Theorem 4.3. The structure of the typical fuzzy controller using nonlinear fuzzy rules is the sum of a global nonlinear controller, ~UG(i,j), and a local nonlinear PI controller, ~UL(M,M):
~U(n)
The expressions for ~UG(i,j) and shown in Fig. 4.7. In the tables,
PI(M,M)=
P2(M,M) =
P3(M,M) =
= ~UG(i,j) + ~UL(M,M).
~UL(M,M)
are given in Tables 4.6a--e, and the ICs are
S 28 _ 2 IAE(n)I,
for ICI, IC2, IC5, and IC6
S 28 _ 2IM(n)1 '
for IC3, IC4, IC7, and IC8,
S (2.SS -A) - 2IM(n)1 - IM(n)1 '
for ICl', IC2', ICS', and IC6'
S (2.SS -A) - IM(n)1 - 2IM(n)I'
for IC3', IC4', IC7', and ICg',
S (1.58 -A) -IM(n)I'
for IC9, ICIO, IC13, and ICl4
S (1.58 -A) -IM(n)I'
for ICll, ICI2, ICI5, and ICI6,
C 1(iJ) = O.S[f(i + l,j + 1) - 3f(i + l,j) + f(iJ C 2(iJ) = O.S[f(i + l,j + 1) + f(i
+ l,j) -
+ 1) + f(iJ)], 3f(i,j + 1) + f(iJ)].
101
Section 4.9. • Typical Fuzzy Controller with Nonlinear Fuzzy Rules TABLE 4.6a-d Sets.
Analytical Structure of the Fuzzy Controller Using Nonlinear Fuzzy Rules and Trapezoidal Input Fuzzy
TABLE 4.6a
ICNo. 1,2,5, & 6 3,4,7, & 8 l' 4' 2' 3' 5' & 6' 7' & 8'
f(i + I,j)· V ·KAu f(i,j + 1)· V ·KAu f(i + I,j)· V . K Au f(i,j + 1)· V . K Au f(i + 1,j) . V . K Au f(i,j + 1)· V ·KAu f(i + I,j)· V . K Au f(i,j + 1)· V . K Au
PI(AE, M)[Ce(i,j)· AE(n) + Cr(i,j)· M(n) + C1(i,j)· S]V ·KAu/S PI(AE, M)[Ce(i,j)· AE(n) + Cr{i,j)· M{n) + C2{i,j) ·S]V ·KAu/S P2{AE, M)[Ce(i,j)· AE{n) + Cr{i,j)· M{n) + C 1 (i,j)· S]V . KAu/S P2{AE, M)]Ce(i,j)· AE{n) + Cr(i,j)· M{n) + C2(i,j)· S]V . KAu/S P2(AE, M)[Ce(i,j)· AE{n) + Cr(i,j)(O.5S - A) + C 1 (i,j)· S]V . KAu/S P2{AE, M)[Ce(i,j){O.5S -A) + Cr(i,j)· M(n) + C2(i,j) ·S]V ·KAu/S P2{AE, M)[Ce(i,j)· AE{n) + Cr{i,j) . M{n) + C{i,j){O.5S - A) + C 1 (i,j) . S]V . KAu/S P2(AE, M)[Ce(i,j)· AE(n) + Cr(i,j)· M(n) + C(i,j)(O.5S - A) + C2(i,j) . S]V . KAu/S
TABLE 4.6b
ICNo. 1,2, 1', & 2' 3,4,3', & 4' 5&6 7&8 5' 6' 7' 8'
C(i,j) 2f(i + I,j) - f(i,j + 1) - f(i,j) f(i + I,j + 1) -f(i,j + 1) f(i + I,j + 1) - f(i + I,j) f(i + I,j) - f(i,j) f(i + I,j + 1) - f(i + I,j) f(i + I,j + 1) -f{i + I,j) f{i + I,j) - f{i,j + 1) f{i,j + 1) - f{i,j)
f{i + I,j + 1) - f(i + I,j) 2f{i,j + 1) - f(i + I,j) - f{i,j) f{i,j + 1) - f{i,j) f(i + I,j + 1) - f{i,j + 1) f{i + I,j) - f(i,j) f(i,j + 1) - f(i + I,j) f(i + I,j + 1) - f(i,j + 1) f(i + I,j + 1) - f(i,j + 1)
o o o o
f(i,j + 1) - f(i + I,j) f(i,j) - f{i + I,j) f(i,j) - f(i,j + 1) f(i + I,j) - f(i,j + 1)
TABLE 4.6c
jS ~ R(n) s ts +A jS + A ~ R{n) ~ (j + I)S - A (j + I)S - A ~ R(n) s (j + I)S
is ~ E(n) ~ is +A is +A ~ E(n) ~ (i + I)S-A (i+ I)S-A ~E(n) ~ (i+ I)S
IC9 or ICIO
ICI3 or ICI4
f(i + I,j + 1)· V ·KAu f{i + I,j + 1)· V . K Au f(i + I,j + 1)· V ·KAu
f(i,j f{i,j f{i,j
ICII or ICI2
ICI5 or ICI6
f(i + I,j + 1)· V ·KAu f(i + I,j + 1)· V ·KAu f(i + I,j + I)· V ·KAu
f(i f(i f(i
IC9, ICIO, ICI3 or ICI4
+ 1)· V ·KAu P3(AE, M)· C(i,j)· (A - S)V ·KAu/S
+ 1)· V . K Au + 1)· V ·KAu
+ I,j)· V ·KAu + I,j)· V ·KAu + i.n V ·KAu
Cr(i,j)[R(n) - (j + I)S]V . KAu/S P3(AE, M)· Cr(i,j)[R(n)(j + I)S]V ·KAu/S
ICII, ICI2, ICI5 or ICI6 P3(AE, M)· C(i,j)· (A - S)V ·KAu/S Ce(i,j)[E(n) - (i + I)S]V ·KAu/S P3(AE, M)· Ce(i,j)[E(n)(i + I)S]V· KAu/S
ICI7
ICI8
ICI7
ICI8
f(J,J)· V ·KAu
f(-J,J)· V ·KAu
o
o
ICI9
IC20
ICI9
IC20
f( -J, -J). V . K Au
f{J, -J) . V . K Au
o
o
102
Chapter 4 •
Mamdani Fuzzy Controllers of Non-Pill Type
TABLE 4.6d IC9 or ICIO R(n) satisfies
jS
~
R(n)
jS+A
~jS
+A
~R(n) ~
(j + I)S - A
~
(j+ I)S-A
R(n)
:s (j + I)S
ICII or ICI2
Ce(i,j)
Cr(i,j)
C(i,j)
Ce(i,j)
Cr(i,j)
C(i,j)
0
0
0
0
0
f(i+ I,j+ 1) -f(i + l,j) f(i+ I,j+ 1) -f(i + I,j)
f(i + I,j + 1) -f(i + I,j) 0
f(i + I,j + 1) -f(i,j + 1) f(i+I,j+I) -f(i,j + 1)
0
f(i + I,j + 1) -f(i,j + 1) 0
0
0
0
0
ICI3 or ICI4 E(n) satisfies is
.s E(n) .s is +A
is +A
:s E(n):s (i +
I)S-A
(i+ I)S -A:s E(n):s (i+ I)S
ICIS or IC16
Ce(i,j)
Cr(i,j)
C(i,j)
Ce(i,j)
Cr(i,j)
C(i,j)
0
0
0
0
0
f(i,j + 1) -f(i,j) f(i,j + 1) -f(i,j)
f(i,j + 1) -f(i,j) 0
f(i + l,j) -f(i,j) f(i + I,j) -f(i,j)
0
f(i + l,j) -f(i,j) 0
0
0
0
0
In IC1 to IC8 and IC1' to le8', the local PI controller has three terms instead of two, and we still call it a PI controller in a broader sense. The extra term changes with the input variables and is regarded as a variable offset to the control action of the two-term PI controller. The proof of the theorem is similar to the fuzzy controllers using linear fuzzy rules. At sampling time n, only the following four nonlinear fuzzy rules are executed: IF E(n) is Ai+ 1 AND R(n) is Bj + 1 THEN L\u(n) isf(i + 1,j + l)V
(r1*)
IF E(n) is Ai+ 1 ANDR(n) isBj THEN L\u(n) isf(i+ 1,j)V
(r2*)
IF E(n) is Ai AND R(n) is Bj + 1 THEN L\u(n) isf(i,j + l)V
(r3*)
IF E(n) is Ai AND R(n) is Bj THEN L\u(n) isf(i,j)V.
(r4*)
The results of the Zadeh fuzzy logic AND operation in these four rules are given in Table 4.7. Substituting the results into the defuzzifier will generate the results shown in Table 4.6. For regions IC9, IC10, IC13, and IC14, where (j + l)S - A::s R(n)::s (j + l)S, L\UL(M,M) is a local nonlinear P controller whose input variable, r(n), is with respect to a changing point (j + l)SjKr and whose proportional-gain is
When jS + A ::s R(n) ::s (j + l)S - A, L\UL(M,M) is a local linear P controller whose input variable, r(n), is with respect to a changing point (j + l)SjKr and whose proportionalgain is
103
Section 4.9. • Typical Fuzzy Controller with Nonlinear Fuzzy Rules
R(n) (j+I)S
(j+I)S-A
IC3 IC2 E(n)
is
is+A
(i+I)S
(i+I)S-.4
ICI jS+A
Ie7
res
tcr IC8
jS
I
is
is+A
U+O.5)S
I
(i+l)S-A (i+ l)S
E(n)
•
(a) R(n) ~
ICI8
ICl2
L
ICII
ICI3
ICI?
ICIO
E(n) -L
L
0
ICl4
IC19
IC9
ICIS
-L
IC16
IC20
(b)
Figure 4.7 Division of [is, (i + I)S] x [jS, (j + I)S] in E(n) - R(n) input space for applying the Zadeh fuzzy AND operation in the four fuzzy rules rl * to r4*: (a) 16 ICs when bothE(n) andR(n) are within [-L,L], and (b) 12 ICs when either E(n) or R(n) is outside [-L,L].
Finally, whenjS ~ R(n) changing control offset:
~jS
+A, AUL(AE,M) is unrelated to R(n) and becomes merely a
P3(AE,AR) . C(ij) . (A - S) . K Au • V S
(4.12)
104
Chapter 4 • Mamdani Fuzzy Controllers of Non-PID Type TABLE 4.7. Results of Evaluating Zadeh Fuzzy AND Operations in the Four Nonlinear Fuzzy Rules rl * to r4* for the 16 ICs Shown in Fig. 4.7a. IC No.
rl *
r2*
r3*
r4*
1&2 3&4 5&6 7&8 I' 2' 3' 4' 5' 6' 7' 8'
Jlj+l (r) Jli+l (e) Jli+l (e) Jlj+l (r) Jlj+l (r)
Jlj(r) Jlj(r)
Jli(e) Jli(e) Jlj+l (r) Jlj+l (r) Jli(e) Jli(e) Jli(e)
Jli(e) Jlj(r) Jlj(r) Jli(e) Jli(e) Jlj(r) Jlj(r) Jlj(r) Jlj(r)
Jli+l (e) Jli+l (e)
I
I I
Jlj(r) Jlj(r) Jlj(r)
Jli+l (e) Jli+l (e) Jli+l (e) Jlj+l (r) Jlj+l (r)
Jli+l (e) Jli+l (e) Jli+l (e)
I
1 I
I I
Jlj+l (r) Jlj+l (r) Jlj+l (r)
Jli(e)
TABLE4.7b Results of Evaluating Zadeh Fuzzy AND Operations in the Four Nonlinear Fuzzy Rules rl * to r4* for the 12 ICs Shown in Fig. 4.7b. IC9 or ICIO R(n) satisfies
rl*
jS s R(n) ~jS +A jS+A ~R(n) ~ 0+ I)S-A (j + I)S - A s R(n) ~ 0 + I)S
Jlj+l (r) Jlj+l (r)
I
ICI3 or ICI4
r2*
r3*
r4*
rl *
r2*
r3*
I
0 0 0
0 0 0
0 0 0
0 0 0
Jlj+l (r) Jlj+l (r)
Jlj(r) Jlj(r)
is s E(n) .s is +A is+A ~ E(n)::: (i+ I)S-A (i + I)S - A ::: E(n) ::: (i + I)S ICNo. 17 18 19 20
I Jlj(r) Jlj(r)
in ICIS or ICI6
ICII or ICI2 E(n) satisfies
I
r4*
rl*
r2*
r3*
r4*
rl*
r2*
r3*
r4*
Jli+l (e) Jli+l (e)
I
I
0 0 0
Jli(e) Jli(e)
0 0 0
0 0 0
Jli+l (e) Jli+l (e)
0 0 0
Jli(e) Jli(e)
rl*
r2*
r3*
r4*
I 0 0 0
0 0 0 I
0 I 0 0
0 0 I 0
I
1
By the same token, for regions ICII, ICI2, ICIS, and ICI6, liUL(M,M) is a local nonlinear I controller whose input variable, e(n), is with respect to a changing point (i + I)S jK; and whose integral-gain is K;(M,M)
= P3(IiE,M). CeCiJ) · Ke • K Au • V
8 when (i + I)S - A ~ E(n) ~ (i + 1)8. liUL(M,M) is a local linear I controller whose input variable, e(n), is with respect to a changing point (i + I)SjKe and whose integral-gain is
K.(M M) = Ce(iJ) . K e . K tiu · V I , 8
Section 4.9. • Typical Fuzzy Controller with Nonlinear Fuzzy Rules
105
when is +A .s E(n) ~ (i + I)S -A. When is:::: E(n) ~ is +A, ~UL(M,AR) is unrelated to E(n) and becomes the same changing control offset as described in (4.12). For regions ICl7 to IC20, AUL(M,AR) = 0 because Ce(iJ), Cr(i,j) and C(iJ) are always zero. The analytical structure of the local controller is determined not only by the membership functions of the input fuzzy sets, but also by all the other components of the fuzzy controller. Using the trapezoidal membership functions is a necessary but not sufficient condition for the local controller to be a nonlinear PI controller. The analytical structure of the global controller is fundamentally determined only by fuzzy rules. Later in this chapter, we will generalize these two points to an even more general fuzzy controller: It uses almost any type of input fuzzy sets, any fuzzy rules, any fuzzy AND and OR operators [79], any fuzzy inference method, and the centroid defuzzifier.
4.9.3. Structure Decomposition and Duality Structural decomposition of the fuzzy controller into a global controller and a local controller is not unique. That is, there is more than one way to express the structure as the sum of a global controller and a local controller. For instance, ~UG(iJ) could be written as f(iJ)· V . K au consistently for all the ICs. In these cases, ~UL(M,AR) will still be a local nonlinear PI controller. One drawback of doing so, however, is that the duality of the controller structure, described below, would not be preserved, making analysis of the properties of the fuzzy controller more difficult. Several structure dualities exist. For ICI to IC8 and ICI' to IC8', one observes from Tables 4.6a-e that there exists duality between Ce(iJ) and Cr(iJ) and between C 1(iJ) and C2(iJ). Ce(iJ) , Cr(i,j), and C 1(iJ) for IC3, IC4, IC3', and IC4' equal, respectively, Cr(iJ), Ce(iJ) and C2(iJ) for ICI, IC2, ICI', and IC2', after f(i + l,j) and f(iJ + 1) exchange their positions. This property also holds between IC5 and IC6 and IC7 and IC8, between IC5' and IC8', and between IC6' and IC7'. Furthermore, the property applies to C(iJ) between ICS' and IC8', and between IC6' and IC7'. The property also holds for C(i,j) alone between the other above-mentioned ICs. Moreover, according to Tables 4.6a-e, the duality also holds for the global nonlinear controller, AUG(iJ), between ICI, IC2, IC5, IC6, ICI', IC2', IC5', and IC6' and IC3, IC4, IC7, IC8, IC3', IC4', IC7', and IC8', respectively. In these "paired" ICs, the first part of the pair is always the ICs in which IM(n)1 ~ IAR(n)l, and the second part is always the ICs where IM(n)I .s IAR(n)l. Also, according to Tables 4.6a-e, Cr(iJ) and C(iJ) for IC9, ICIO, ICI3, and ICl4 equal, respectively, Ce(iJ) and C(iJ) for ICII, ICI2, ICI5, and ICI6, afterf(i+ IJ) and f(i,j + 1) exchange their positions. Similarly, the duality holds for the global nonlinear controller between ICl3 and ICl4 and ICl5 and ICI6. In these "paired" ICs, the first part of the pair is always the ICs where IE(n)I ~ IR(n)l, and the second part is always the ICs where IE(n)I ~ IR(n)l.
4.9.4. Gain Variation Characteristics The gains of the local nonlinear PI controller vary dynamically with the input variables. They change both globally with i andj and locally with M(n) and AR(n), and their ranges
106
Chapter 4 • Mamdani Fuzzy Controllers of Non-Pill Type
depend on the ranges of Pl(M,M), P2(M,M), and P3(M,M). WhenE(n) andR(n) are in ICI to IC8,
Cr(iJ) ·K, ·KAu· V < K (M M) < Cr(i,j) ·Kr ·KAu· V 28 -p' 8 ' Ce(iJ) -Ke . KAu . V < K.(M M) < Ce(iJ)· K e . KAu . V . 28 -I' 8 ' when E(n) and R(n) are in ICI' to IC8',
Cr(iJ) -Kr ·KAu· V < K (M M) < C,(i,j) -Kr ·KAu· V (1 + 20)8 - p , (1 - 8)8 ' Ce(iJ) -Ke · KAu . V < K.(M M) < Ce(i,j)· Ke -KAu - V . (1 + 20)8 - 1 , (1 - 8)8 ' and when E(n) and R(n) are in IC9 to ICI6,
Cr(i,j)-Kr·KAu·.V
4.9.5. Direct Generation of Other Fuzzy Controllers' Structures We now show how to utilize the analytical structure of this general fuzzy controller to directly generate the analytical structures of specific fuzzy controllers. EXAMPLE 4.1 Derive AUG(iJ) for the fuzzy controller that uses the same configuration described in the present section except the fuzzy rules. Instead, linear fuzzy rules are used, which are constructed by f(iJ) = p . i + q .j + w, where p, q, and w are integers and p =1= 0 or q =1= O.
Solution According to Tables 4.6a-c, AUG(iJ) is f(i + l,j)· V· K~u when 1L\E(n) I ~ IAR(n)I and f(iJ + 1). V· K~u when IAR(n)I ~ 1L\E(n) I. Specifically, for the fuzzy controller of interest:
AUG{iJ) = f{i
=
+ i,». V .Kt.u =
1+ wlH ·K~u
[P{i + 1) + q
p . H . K~u. q . H . K~u. (p + w)H . K~u K Z+ K J+ K '
for IAE(n)I >_ IAR(n)I
107
Section 4.9 . • Typical Fuzzy Controller with Nonlinear Fuzzy Rules and AUG(iJ) =f(iJ + 1). V .K
Au
= where
= [p. i + q(j + 1) + w]H ·KAu K
p . H . K Au . q . H . K Au . (q K Z+ K J+
+ w)H . K Au K
K = max(lP· i + q.j + wI) = (lPl
'
for IM(n)1 >_ IAE(n) I
+ Iql)J + [w],
Obviously, AUG(iJ) is a global two-dimensional multilevel relay with respect to i andj. The constants, (p + w)H . K A u / K and (q + w)H . K Au / K, can be regarded as an offset to the respective relay.
As pointed out earlier in this section, the shape of the input fuzzy sets is one of the factors determining the structure of the local nonlinear PI controller as well as the ranges of the proportional-gain and integral-gain. The following example uncovers the specific structure of the local nonlinear PI controller when the triangular input fuzzy sets and linear fuzzy rules are used. EXAMPLE 4.2 In Example 4.1, if (1) the triangular input fuzzy sets are used instead, and (2) p = q, derive AUL(iJ).
Solution Use of the triangular membership functions means A = 0, and hence () = o. When A = 0, ICl' to IC8' do not exist any more and only ICI to IC20 stay. For ICI to IC8, C(iJ) is always zero. In addition, C1(iJ) = 0 and C2(iJ) = 0 whenp = q because
C1(iJ) = 0.5[f(i + l,j + 1) - 3f(i + l,j) + f(iJ and
C1(iJ) = 0.5[f(i + l,j + 1) + f(i
+ l,j) -
+ 1) + f(iJ)] =
q- p = 0
3f(iJ + 1) + f(iJ)] = P - q = O.
Consequently, the local nonlinear PI controller loses the extra term and becomes a normal nonlinear PI controller with only two terms. For IC9 to ICI6, only the conditions is-: E(n) s (i + I)S and jS s R(n) ::; (j + I)S exist. Therefore, only the local linear I controller and the local linear P controller exist. For IC 17 to IC20, the local controller is constantly zero.
In Example 4.3, we directly obtain the structure of the fuzzy controllers with the same linear rules used in Section 4.5. EXAMPLE 4.3 In Example 4.1, ifp = q = 1 and w = 0, derive AUG(iJ) and AUL(AE,AR).
Solution The coefficients Ce(iJ), Cr(iJ) and C(iJ) can easily be calculated. For ICI to IC8 and ICl' to IC8', the results are -1, 0, or 1. For IC9 to IC 16, the results are always 1. For IC 17 to IC20, the coefficients are always O. As shown in Example 4.2, both C 1(ij) and C2 (iJ ) are o. Substituting the resultant Ce(iJ), Cr(iJ), C(iJ), C 1 (iJ) and C2(iJ) into Tables 4.6a and b, one gets the structure as shown in Table 4.8.
108
Chapter 4 • Mamdani Fuzzy Controllers of Non-Pill Type TABLE 4.8a Analytical Structure of the Fuzzy Controller Using the Linear Fuzzy Rules I(i,j) Trapezoidal Input Fuzzy Sets; (a) ICI to IC8, and ICI' to IC/. ICNo.
~UG(i,j)
and
~UL(AE,M)
K!1 ·H
1 to 8
(i + j
1/, 4/, 5/, & 8'
K!1 ·H (i+j+ I)_U_ N-I
2/
(i + j
+ 1) N ~ 1
3/
(i + j
+ 1) N ~ 1
6/
K!1 ·H (i+j+I)-UN-I
7/
(i + i
TABLE 4.88b
= i +j
PI (AE,M)(AE(n) + M(n»
+ 1) N ~ 1
K!1 ·H
K!1 ·H
K!1 ·H ~
K!1 ·H
P2(AE,M)(AE(n)
+ M(n»~
P2(AE,M)(AE(n)
+ (0.5S -
P2(AE,M)«0.5S - A)
K!1 ·H
A»~
K!1 ·H
+ M(n»~
K!1 ·H P2(AE,M)(AE(n) - (0.5S - A»~
K!1 ·H
+ 1) N ~ 1
P2(AE,M)( -(0.5S - A)
K!1 ·H
+ M(n»~
(b) IC9 to IC20 ~UL(AE,
~UG(i,i)
M)
IC9 or ICIO
ICI3 or ICI4
IC9, ICIO, ICI3, or ICI4
::SiS +A
K!!,. ·H (J+j+I)-UN-I
K!1 ·H (-J +i+ I)_U_ N-I
PiAE, M)(A - S) K",~~ H
jS+A ::SR(n)::s U+ I)S-A
K!1 ·H (J +j+ I)_U_ N-I
K!!,. ·H (-J+j+I)-UN-I
[R(n) - (j
(i+ I)S -A::s R(n)::s (i+ I)S
K!!,. ·H (J+i+I)-UN-I
K!!,. ·H (-J+i+I)-UN-I
K!!,. ·H P3(AE, JiR)[R(n) - U + I)S]~
ICII or ICI2
ICl5 or ICl6
ICII, ICI2, ICI5, or ICl6
K!1 ·H (i+J+ 1)_U_ N-I
(i -J + I)K!1u ·H N-I
P3(AE, M)(A -
K!1 ·H (i+J+ I)_U_ N-I
(i -J + I)K!1u ·H N-I
[E(n) - (i
K!!,. ·H (i+J+I)-UN-I
(i -J + I)K!!,.u ·H N-I
K!!,. ·H P3(AE, JiR)[E(n) - (i + 1)S]~
jS
::s R(n)
is ::s E(n) -s is + A is + A ::s E(n) ::s (i + I)S (i
+ I)S -
A
A
::s E( n) ::s (i + I)S
+ l)S]K~H
+
S)K~H K!!,. ·H
I)S]~
ICI7
ICI8
ICI7
IC18
-K!1u· H
IC19
0 IC20
0 IC19
0 IC20
KAu·H
0
0
0
Section 4.10. •
109
Structure Decomposition of General Fuzzy Controllers
Before proceeding to the next section, we point out that if the fuzzy controller in Example 4.3 uses the triangular fuzzy sets (i.e., A = 0), the local nonlinear PI controller will become a normal two-term nonlinear PI controller. The structure of such a fuzzy controller will be exactly the same as that presented in Section 4.5.
4.10. STRUCTURE DECOMPOSITION OF GENERAL FUZZY CONTROLLERS 4.10.1. Configuration of General Fuzzy Controllers From the fuzzy controllers studied in this chapter so far, one may observe that their analytical structures are always decomposed into the sum of a global controller and a local controller. This is the case regardless of the controllers' configuration. A logical question to ask is whether this kind of structure decomposition holds for general fuzzy controllers. The answer is affirmative. In this section, we show that for a broad class of general and typical fuzzy controllers, they can always be represented as the sum of a global controller and a local controller. Let us first define the configurations of these controllers. They have M input variables. Each variable is denoted as xi(n), where 1 ~ i ~ M. The scaling factor for xi(n) is (Xi' and the scaled variables are (4.13)
Xj(n) = (Xi' xi(n).
Without losing generality, we assume -L
~
Xj(n) :::: L.
Xj(n) is fuzzified by N = 2J + 1 input fuzzy sets, each of which is denoted as AI..' where -J
IF X1(n) isAI 1j AND .. . ANDXM
isA
IM j
THEN Au(n) is
where k =f(I1J , andf(I1j
, •••
,IM j ) is integer at I 1J ,
•••
· ••
,IM J )
,IM J so that k is integer.
Vk ,
110
Chapter 4 • Mamdani Fuzzy Controllers of Non-Pill Type
There are W = 2K + 1 output fuzzy sets where (4.14) If a computed K is not integer, K will always be selected as the least integer larger than the computed K. Among the W fuzzy sets, K sets (those with positive subscript k) are for positive Au(n), another K sets (when k is negative) are for negative Au(n), and the remaining one (when k is zero) is for near zero Au(n). Depending on fuzzy rules, some of these fuzzy sets mayor may not be used. It does not matter if some fuzzy sets are not used. The centers of the output fuzzy sets are equally spaced with the distance between two adjacent sets being
Thus, the center of Vk is kV. The shapes of Vk are identical: The membership value of Vk is zero at (k - I)V + a (0 :::; (J < V) and increases to one at kV - 0 (0 :::; 0 < V - o). The membership value maintains a constant value of one between kV - 0 and kV + 0 and decreases from one at kV + 0 to zero at (k + I)V - a, The membership value is zero elsewhere. By definition, the fuzzy sets are symmetrical about their centers, k~ Any types of fuzzy AND operators can be used to evaluate ANDs in the fuzzy rules. In each rule, there are M - 1 AND operators, and their operations may be different. In addition, the use of AND operators may be different between the rules. As for fuzzy inference, any sensible inference methods can be used, including, but not limited to, the methods in Table 1.1. If more than one rule generates memberships for a same Vk' any types of fuzzy OR operators may be utilized to calculate the combined membership value. Different rules may use different types of fuzzy OR operators, too. The flexible assumptions on fuzzy AND and OR operators are mainly of theoretical and general importance. Very few fuzzy controllers in the literature employ more than one type of fuzzy AND and OR operators. Assume that at time n there are w(n) membership values, each of which is denoted as j.,lm(x, A), for lD"(n) distinctive Vm after execution of the fuzzy AND operation, the fuzzy OR operation, and fuzzy inference. Since the shape of Vm is identical and each membership function is symmetric about its center, the global centroid can be calculated from the local centroids, which are the centers of Vm , mV. Consequently, ru(n)
L
_
j.,l~(x,A)·mV
AU(n) = K Au m=~n)
L
m=l
At any time, Pi: S
:::;
Xj(n) :::; (Pi
_
j.,l~(x,A)
+ 1)8, and hence Ii,m = Pi
+ bi,m
where bi,m is either 0 or 1. Thus, m can be written as
or in a vector form:
Ii,m can be expressed as
(4.15)
Section 4.10. • Structure Decomposition of General Fuzzy Controllers
Definitions of the vectors arep be written as
111
= (PI' ... ,PM) and b m = (b1,m' ... ' bM,m). Then, (4.15) can ru(n)
AU(n) = K
_
E Jl~(x,A) ·f(p + bm)V
tiu
_m=_l
ru(n)
_
_
(4.16)
E J1.r:,,(x, A)
m=l
This configuration is general in terms of fuzzification, fuzzy rules, fuzzy logic operators, fuzzy inference method, and defuzzification. It covers many typical fuzzy controllers in the literature.
4.10.2. Structure Decomposition Theorem We now decompose the general fuzzy controllers. Expression (4.15) can always be expressed as (4.17) where K ti ·H AUG(n) = ---t-f(p), ru(n)
AU (n) = L
K
H
E
~ _m=_l
(4.18) _
Jl~(x,A)(f(p + b m )
K
-
f(p)) _
ru(n)_
E
m=l
(4.19)
Jl~(x,A)
AUG(n) is a global f-dependent nonlinear controller because its control action is determined by a nonlinear function f of PI' ... ,PM with respect to the origin of the input space. AUL(n) is obviously a nonlinear controller. However, we need to show it to be a local controller. The following is always true: Xj(n)
E
[Pi ·S, (Pi
+ 1)8],
-J ::SPi
::s J
- 1.
After fuzzification of Xj(n), two memberships are generated. Denote the memberships as Jlpi(Xj) and Jlpi+l (Xj). Let
+ 0.5)S is the center of the interval [Pi · 8, (Pi + 1)8]. It is obvious that Jlpi(Xj) = Jlpi(AXj(n) + (Pi + 0.5)8), AXj(n)
where (Pi
+ 0.5)S
= Xj(n) -
(Pi
Jlpi+l(Xi) = Jlpi+l(AXj(n)
+ (Pi + 0.5)8)
which mean that J1.pi(X; ) and Jlpi+l (Xi) are functions ofAXj(n) with respect to (Pi + 0.5)8. After fuzzification of the M input variables, at most 2M nonzero memberships result, generating up to 2M different combinations of the memberships. That is to say, up to 2M fuzzy rules are activated, which produce nonzero memberships for some or all of Vm after fuzzy AND and _OR operations. Because Jl':n(x,A) is determined by Jlpi(Xi) and J1.Pi+I(Xi) for all Pi' Jl':n(x, A) is also a function ofAXj(n) with respect to (Pi + 0.5)8. Hence, AUL(n)
112
Chapter 4 •
Mamdani Fuzzy Controllers of Non-Pill Type
is a local nonlinear controller, for it is ultimately determined by Mj(n) with respect to the center of the M-dimensional cube configured by [Pi ·S, (Pi + 1)S]. The center is «PI + 0.5)S, · .. , (PM + 0.5)8). The values off(p + bm ) andf(p) remain the same if the states ofXj(n), for all i, do not jump from one cube to another as time progresses. Hence, as long as Xj(n)s stay in the same intervals, the value of IlUG (n) remains unchanged. On the other hand, IlUL (n) changes with Mj(n). The role of the local nonlinear controller is to adjust control action of the global nonlinear controller. It is apparent that the above conclusions hold if fuzzy OR operation is not used to produce the combined memberships for the same Vm (see (2.28)). Stating these results formally, we have the following structure decomposition theorem.
Theorem 4.4. Analytical structure of the general fuzzy controllers can always be expressed as the sum of a global fuzzy rules-dependent nonlinear controller and a local nonlinear controller that adjusts the control action of the global controller. A similar conclusion has been drawn for the general MIMO fuzzy controllers [263].
4.10.3. Structure of Global Controllers for Linear Fuzzy Rules Given a specific configuration of a fuzzy controller, finding its explicit structure of IlUG (n) and IlUL (n) is usually a difficult task. Sometimes, it is easier to derive the analytical structure of IlUG (n) than that of IlUL (n). This is especially the case for the fuzzy controllers using linear fuzzy rules. General linear fuzzy rules are described by
f(p) =
M
EPi·Pi +1'.
(4.20)
i=1
Hence,
Thus, the global controller is
IlUG (n) =
«:K·H j(p)=
Kau . H
[
M
J
E IPil + 11'1
M
]
M
~Pi·Pi+Y =C~Pi·Pi+C.y z=1
(4.21)
z=1
i=1
where C is a constant:
C=
Kau·H
M
JEIPil + 11'1 i=1
Clearly, IlUG (n) is a global M-dimensional multilevel relay. The global controller of the fuzzy controller with two input variables and linear fuzzy rules in Section 4.5 is just its special case. The global controllers of the general MIMO fuzzy controllers with linear rules also share this conclusion [263]. Because linear and almost linear fuzzy rules are widely used, this global controller structure is important, and we express this result in theorem form, as follows.
Section 4.11. •
Limit Structure of General Fuzzy Controllers
113
Theorem 4.5. The analytical structure of the general fuzzy controllers using linear fuzzy rules can always be represented as the sum of aM-dimensional multilevel relay and a local nonlinear controller that adjusts the control action of the global controller.
4.11. LIMIT STRUCTURE OF GENERAL FUZZY CONTROLLERS A natural system design question is as follows: How many fuzzy rules should be used? It may seem to be intuitive to think that the more rules, the better the control performance. Interestingly, this is not necessarily true in general and certainly not true for fuzzy controllers using linear fuzzy rules. This is because, as we will show in this section, the more linear rules are employed by a fuzzy controller, the more linear it becomes. If the number of linear rules asymptotically approaches 00, the fuzzy controller becomes a linear controller. Next, we use the fuzzy controller in Section 4.5 to demonstrate these points, and we will then extend the analysis to the fuzzy controllers using arbitrary fuzzy rules.
4.11.1. Degree of Nonlinearity for Fuzzy Controllers with Linear Fuzzy Rules The fuzzy controllers using linear fuzzy rules are nonlinear controllers. We can quantify their nonlinearity with respect to the number of the fuzzy rules. This, however, cannot be done for fuzzy controllers with nonlinear rules because there is no way to quantitatively differentiate the rules themselves. As an example, let us look into the fuzzy controller in Section 4.5. From there, we have IlURelay(ij) = (i +j
+ 1) ~~ ~
and
su
(MM)=M(n)+AR(n) Kdu·H PI' 2(S _ input) x N - 1 ·
The absolute maximum value of ~URelay(iJ), denoted as ~~y, is (N - 2)KAu ·H/(N - 1), which is achieved when i = j = J - 1 or i = j = -J. The absolute maximum value of ~UPI(AE,AR), designated as ~u:F, is K Au ·H/(N - 1), which is achieved when E(n) = (i+ I)S and R(n) = (j+ I)S, or when E(n) = i-S and R(n) =j·S. The absolute maximum value of total control action, ~U(n), is therefore ~~y + ~u:F. We define the following ratio p=
1 =-~~y + ~upr N - 1 ~upr
to describe (1) the role of the local nonlinear PI controller and the role of the global multilevel relay in total control action, and (2) the degree of nonlinearity of the fuzzy controller at different number of rules, N. The smaller the p is, the less significant the role of the local nonlinear PI controller in total control action and the more significant the role of the global multilevel relay. When N = 3, which is the minimum for the general fuzzy controllers, p = 50%, which signifies that the local nonlinear PI controller plays as important a role as does the global multilevel relay. For the simplest SISO fuzzy controllers in Chapter 3, N = 2 and thus p = 1. In other words, the simplest fuzzy controllers, as compared with the fuzzy
114
Chapter 4 • Mamdani Fuzzy Controllers of Non-Pill Type
controllers with linear rules, are the most nonlinear fuzzy controllers. This statement is invalid if the simplest fuzzy controllers are compared with the fuzzy controllers with nonlinear rules.
4.11.2. Limit Structure for Fuzzy Controllers with Linear Rules The smaller the ratio p, the finer the resolution of the output of the global multilevel relay and therefore the less nonlinear the fuzzy controller. To the extreme, if N ~ 00, P = 0, meaning the nonlinearity disappears and the fuzzy controller becomes a linear controller. Of course, no fuzzy controller can use an infinite number of input fuzzy sets and rules. By studying N ~ 00 cases, the objective is to find out how N affects the characteristics of the fuzzy controller. We call the structure corresponding to N ~ 00 the limit structure of a fuzzy controller. We now investigate what happens to the global relay and local nonlinear PI controller when N ~ 00 and how the fuzzy controller becomes a linear controller and explicitly what it is. We state the result first:
AU() = Ke · K Au . H () K r · K Au · H ( ) n 2L en + 2L r n .
·
1 0 N~OO
(4.22)
Let us prove it. Because
· 1tm
N.-+-oo
A TT11l3X
OllpI
K Au ·H 0 un N 1 = ,
1·
=
N.-+-oo-
L\UPI(M,M) = 0 when N ~ 00. That is, the local nonlinear PI controller disappears. On the other hand, for the global multilevel relay,
· 1un
N.-+-oo
ATT
Ol.lRelay
( • •)
lJ
1· (. . l)KAu·H 1· = J.-+-oo im I+J+ - 2 J = J.-+-oo un
(i
j)KAU.H J-+J2 ·
(4.23)
At any time, the following is always true: i.s
.s E(n):::: (i+ l)S,
j.s ~ R(n)
.s (j+ l)S.
Also note that
L
(i + l)S = (i + 1)],
L
L
jS = j J '
(j+l)S=(j+l)].
Hence, i E(n) i + 1 -<--<-J- L - J
and
!.- = E(n)
and
L
.! + 1
< R(n) J- L -
J
'
which mean lim
J.-+-ooJ
L
lim
L=
J.-+-ooJ
R(n) . L
Therefore, (4.23) leads to
.
1 OUReiay N~ A
(..)
IJ
KAu . H () KAu . H () = -----u;-E n + 2L R n = Ke · KAu . H () 2L en
which is a (global) linear PI controller.
+
Kr . K Au · H r( ) 2L n
Section 4.11. •
115
Limit Structure of General Fuzzy Controllers
This limit structure result can be extended to cover the more general fuzzy controllers with linear rules in Section 4.10.3. Using (4.21) and noting that limN.-+ooPi/J = X;(n)/L,
N~ AUG(n) = J~
KAU.H(tPi'Pi+Y) M
J
1=1
L IPil + 11'1
t
K.H =
L
i=1
M
"& (XiPiXi(n).
L IPil,-1
i=O
This is a linear controller. The local nonlinear controllers of these fuzzy controllers disappear as N ~ 00. We will prove this in the next section. Summarizing these results, we have the following theorem.
Theorem 4.6. For the fuzzy controllers with linear fuzzy rules, as N --+ 00, the local nonlinear controllers disappear and the global multilevel relays become global linear controllers, which contain linear Pill controllers as special cases.
4.11.3. Limit Structure for General Fuzzy Controllers with Nonlinear Rules We now extend this limit result to the general fuzzy controllers described in (4.17).
Theorem 4.7. For a fuzzy controller of the general class using nonlinear rules, as N ~ 00, the local controller disappears and the fuzzy controller approaches a fuzzy rulesdependent global controller. Mathematically, (1) (2)
lim IiUL(n) = 0,
and
N.-+oo
lim AUG(n) = lim AU(n)
N.-+oo
N.-+oo
= KAu·H N.-+oo lim f(KP )
if and only if
+ bm ) -
lim f(p
K
N.-+oo
The proof is simple. N --+
00
f(p)
impliesf(p)
= 0,
for all m.
~ 00
and K
tu(n)
K
lim IiUL(n) = lim N.-+oo
.H Jiu
_
_ tu(n)_
L
m=l
~) L..J
= lim K Jiu ·H m= l N.-+oo
A)f(p + b m )
rt (
Jlm x,
K
tu(n)_
L
m=l
-
Jl':n(x, A)
f(p)
= 0,
Jl~(x,A)
if and only if lim f(p N.-+oo
+ bm ) K
According to (4.19),
J,l':n(x,A)(f(p+bm)-f(p))
_m_=l
K
N.-+oo
L
~ 00.
(4.24)
f(p) = 0,
for all m.
116
Chapter 4 • Mamdani Fuzzy Controllers of Non-Pill Type
This necessary and sufficient condition (4.24) is important. If it is not met, then there exist at least one m at which lim f{p
+ bm} -
f{p}
K
N~oo
#- o.
This leads to
+ bm} #-
lim f{p} K ' which means the existence of more than one limit structure for the fuzzy controller. We have completed the proof. A similar theorem has been established for the general MIMO fuzzy controllers with nonlinear rules [263]. On the basis of Theorem 4.7, one can determine whether the local controller of a fuzzy controller will disappear without knowing the expression of the local controller. One just needs to check whether condition (4.24) is met by the fuzzy rules. Many classes of nonlinear fuzzy rules satisfy the condition. General linear rule (4.20) is one such example. According to Section 4.10.3, lim f{p
N~oo
K
N~oo
b )-f( ) $:P;(Pi+bi,m}+Y- ($:P;'Pi+Y) P = li1m 1=1 · f( P + m - - - - - - - -1=1 ----11m K
N~oo
N~oo
M
JEIPil+I1'1 i=1
M
= J~oo lim
~p.·b. L...J 1 i.m i=1 M
= O.
JE IPil + 11'1 i=1
Therefore, the local controllers will disappear when N already given in the last section.
~ 00.
The limit controller structure is
4.12. STRUCTURE DECOMPOSITION AND LIMIT STRUCTURE OF GENERAL FUZZY MODELS From the mathematics standpoint, the analytical structure of a fuzzy dynamic model is very similar to that ofa fuzzy controller (see Section 2.13.3). A MISO Mamdani fuzzy controller becomes a SISO Mamdani fuzzy model if (1) the scaling factors are not used, and (2) different input and output variables are used in fuzzy rules. Thus, it is not difficult to understand that all the structural derivations and analytical analyses on the fuzzy controllers can directly be extended to the corresponding fuzzy models. All the fuzzy controller results hold for the corresponding Mamdani fuzzy models, subject to some possible minor modifications. For example, one can simply extend Theorem 4.4 and Theorem 4.7 on the structure decomposition and limit structure of the general fuzzy controllers to the corresponding general fuzzy models as follows.
Theorem 4.8. For the general SISO fuzzy dynamic models that correspond to the general fuzzy controllers, their analytical structure can always be represented as the sum of a global fuzzy rules-dependent nonlinear model and a local nonlinear model. As the number of fuzzy rules approaches 00, the local model will disappear.
117
Exercises
By the same token, MIMO results on the fuzzy controllers can be extended to cover the corresponding MIMO fuzzy models.
4.13. SUMMARY Linear fuzzy rules encapsulate a human operator's common-sense control strategy. Although fuzzy rules in the literature differ from case to case, they cannot be too nonlinear and are thus quite similar to linear rules. A Mamdani fuzzy controller with linear fuzzy rules can become a linear controller if certain conditions are satisfied. Similarly, a Mamdani fuzzy controller with linear rules can be just a linear PID controller under some conditions. In general, however, a fuzzy controller with linear rules is not a linear controller. The typical Mamdani fuzzy controllers with nonlinear fuzzy rules are the sum of a global nonlinear controller and a local PI or PD controller. As a special case, when linear rules are used, the fuzzy controllers become the sum of a global multilevel relay and a local nonlinear PI or PD controller with variable gains. Extending the results to the general Mamdani fuzzy controllers, we find that they can always be decomposed into the sum of a global fuzzy rules-dependent nonlinear controller and a local nonlinear controller that adjusts the control action of the global controller. When the number of input fuzzy sets (equivalently, fuzzy rules) approaches 00, the local controller disappears and the limit controller is a global nonlinear controller whose structure depends on fuzzy rules. For linear rules, the structure is linear controller and contains linear PID controller as a special case. These conclusions hold for the general Mamdani fuzzy models.
4.14. NOTES AND REFERENCES A linear fuzzy controller using linear fuzzy rules was first studied in [20]. Investigation of typical nonlinear fuzzy control using linear fuzzy rules (Section 4.5) was first carried out in [256]. Section 4.6 contains the results in [261], whereas the results in Sections 4.7 and 4.8 are adopted, respectively, from [275] and [262]. The explicit structure of the fuzzy controller using nonlinear fuzzy rules in Section 4.9 was studied in [273]. Structure decomposition of the SISO and MIMO fuzzy controllers in Section 4.10 was conducted, respectively, in [255] and [263]. They are the only results in existence. The limit structure of a class of SISO fuzzy controllers with linear fuzzy rules was first derived in [19]. In [14], the limit structure of another class of SISO fuzzy controllers using linear fuzzy rules was then established. All these results were generalized to any typical fuzzy controllers using linear or nonlinear fuzzy rules in [255] for the SISO cases, and in [263] for the MIMO cases. The SISO results are described in Section 4.11. There are other explicit results on other fuzzy controllers in literature. The reader is referred to, for example, [34][108][115][125][226].
EXERCISES 1. Is a fuzzy controller that uses linear fuzzy rules always a linear fuzzy controller? 2. Find some fuzzy control or fuzzy modeling papers in the literature that include complete information on the Mamdani fuzzy rules used. Compare these fuzzy rules with the
118
Chapter 4 •
Mamdani Fuzzy Controllers of Non-PID Type
corresponding linear fuzzy rules to see how different they can be. Are the differences significant? 3. Generate nonlinear fuzzy rules using some nonlinear functions of your choice. (See Section 4.3.) What are the limit controllers for fuzzy controllers using these nonlinear fuzzy rules? 4. Verify the analytical structures of the fuzzy controllers derived in this chapter. 5. Use computer simulation to compare control performance between the fuzzy controllers with linear fuzzy rules in this chapter and their respective limit controllers (i.e., linear PI, PD and PID controllers). Use different system models. Are the fuzzy controllers better than the linear controllers? 6. The fuzzy controllers in this chapter are non-PID type, whereas those in the previous chapter are PID-type. What are the causes? 7. Section 4.7 shows that a fuzzy controller with linear fuzzy rules and three input variables does not necessarily become the sum of a global three-dimensional multilevel relay and a local nonlinear PID controller. Can you configure a fuzzy controller so that this is the case? 8. Use the results in Section 4.9.2 to directly generate the analytical structures of some fuzzy controllers that interest you. See Section 4.9.5 for examples. 9. Build a nonlinear fuzzy controller with linear fuzzy rules. Conduct a simulation study, using different system models, to explore how the degree of nonlinearity of the fuzzy controller, determined by the number of input fuzzy sets, affects the performance of the fuzzy control systems. 10. Compare the fuzzy control performances in Problem 8 with those achieved by the linear limit controller. 11. Is it possible to quantify the degree of nonlinearity for fuzzy controllers with nonlinear fuzzy rules? If yes, how can you do it? If no, why?
TS Fuzzy Controllers with Linear Rule Consequent
5.1. INTRODUCTION Having studied the analytical structures of various Mamdani fuzzy controllers in the last two chapters, we now turn our attention to the analytical structure ofTS fuzzy controllers. We first establish that a general class of TS fuzzy controllers is nonlinear controllers of the PID type with variable gains. We examine in detail two different types of TS fuzzy PI and PD controllers that are two example configurations of the general class. Then, by showing that the TS rule scheme usually requires too many design parameters in the rule consequent, we introduce a simpler rule scheme as a solution. We analyze the analytical structures of the TS fuzzy PI, PD, and PID controllers that use the simplified linear rule scheme. All these fuzzy PID controllers, using the original or simplified rule scheme, are shown to be nonlinear PID controllers with variable gains. Like the Mamdani fuzzy PID controllers, the TS fuzzy PID controllers can outperform the linear PID controller because of their variable gains. A convincing simulation demonstration is made by utilizing a patient model. Finally, the major differences, advantages, and disadvantages of Mamdani and TS fuzzy controllers are compared.
5.2. WHY NOT USE NONLINEAR RULE CONSEQUENT Theoretically speaking, any function, linear or nonlinear, can be used as a TS rule consequent, and different rules can employ different functions. That is, some rules may use linear functions whereas others use nonlinear ones. These linear and nonlinear functions do not have to be identical in different rules. If a nonlinear function is desired, the first logical choice would probably be a polynomial function because it generalizes linear functions. Using nonlinear functions seems to make fuzzy rules more powerful. All these advantages, however, are on paper only and are not very realistic and practical. The linear rule consequent is the simplest, yet it already has too many parameters to design and tune. This will be discussed later in this chapter. Most TS fuzzy controllers use linear
119
120
Chapter 5 • TS Fuzzy Controllers with Linear Rule Consequent
functions, which is critical to the practicality and usefulness of the controllers. We will only investigate fuzzy controllers with the linear rule consequent.
5.3. GENERAL TS FUZZY CONTROLLERS AS NONLINEAR VARIABLE GAIN CONTROLLERS OF PID TYPE 5.3.1. Configuration of General Fuzzy Controllers We start with the configuration that is quite similar to the general Mamdani fuzzy controllers in Section 4.10.1. The general TS fuzzy controllers employ M input variables Xl (n), X2(n), ..., XM(n). xi(n) is fuzzified by Pi continuous input fuzzy sets whose membership functions can be any shapes and can be different from each other. The fuzzy set for xi(n) in the jth rule is denoted as AI.',J.. The jth rule is like (1 ~ j ~ Q): IF xt(n) isA[l,J. AND .. . ANDxM(n) isA[u.]. THEN U(n) (or ~U(n)) = aOj
+ a1jxI(n) + ... + aAqxM(n).
(5.1)
To avoid positive feedback of fuzzy control systems, all aij must be nonnegative. The necessity of this requirement will become clearer later. To combine the M membership values of the input fuzzy sets in the rule antecedent, any types of fuzzy logic AND operators may be used and different types may be used in different rules. The combined membership for the rule consequent is denoted as ,uj(x,A). When x;(n) = 0 for all i, x = 0 and ,uj(x,A) at that time is denoted as Jlj(O). After defuzzification using the generalized defuzzifier, we get
n
_
L ,uj(x,A)(aoj + a1jxI (n) U(n)
=j=l
+ .·.+ aAqxM(n)) (5.2)
Q
L,uj(x,A)
j=l
and the expression for AU(n) is the same if ~U(n) is used in the rule consequent.
5.3.2. Analytical Structure as Nonlinear Controllers of PID Type Having configured the fuzzy controllers, we now relate their structure to conventional control. Rewrite (5.2) to represent the general TS fuzzy controllers as follows:
U(n) (or AU(n» where
= bo(x,A) + b l (X,A)Xl(n) + ... + bM(x,A)xM(n) n
(5.3)
_
L ,uj(x,A) ·aij j=l bi(x,A) = n L,uj(x,A)
for i = 0, ... , M.
(5.4)
j=l
Comparing (5.3) with (3.7), one sees that the general TS fuzzy controllers are of the PID type. They are nonlinear controllers with variable gains changing with state of the input variables because b;(x,A), the gain for x;(n), is a nonlinear function ofx. For a specific fuzzy
Section 5.4. •
Simple TS Fuzzy PljPD Controllers as Nonlinear Variable Gain PljPD Controllers
121
controller, b;(x,A) mayor may not be available in an analytic form, but they are always available in a numeric form, no matter how complex the controller configuration is. Hence, one can always use (5.4) to investigate the gain variation characteristics numerically.
Theorem 5.1. The general TS fuzzy controllers are fuzzy controllers of the PID type. In the context of classical control, they are nonlinear controllers with variable gains changing with the state of input variables. The analytical structure of the general TS fuzzy controllers is different from that of the general Mamdani fuzzy controllers in Chapter 4. The former is always of the PID type, whereas the latter is the sum of a global nonlinear controller and a local nonlinear controller. The key to understanding the general TS fuzzy controllers is to derive and analyze the variable gains. The mathematical expressions of the gains of any specific fuzzy controller depend on its configuration and hence need to be investigated case by case. Starting in the next section, we will analytically derive and examine the gain variation for several different types of TS fuzzy Pill controllers.
5.3.3. General Fuzzy Controllers as Linear Controllers Can the variable gains of some general fuzzy controllers become constant gains? The answer is yes, and it happens when all the rule consequent are exactly the same. That is, the rule consequent in (5.1) is U(n) (or L\U(n)) = ao + alxl(n) + ... + aMxM(n),
forj = 1, ... , Q.
When this is the case, the general TS fuzzy controllers become linear controllers. If only three input variables are used and they are e(n), r(n), and d(n), then a linear PID controller will result. Obviously, the coefficients of the variables are the constant proportionalgain, integral-gain, and derivative-gain. On the other hand, if these three variables are used but not all rule consequent are the same nonlinear PID controllers with variable gains will result. The gain variation characteristics differ from those of the Mamdani fuzzy PID controllers but will still be desirable and beneficial from the standpoint of control, as shown later in this chapter.
5.4. SIMPLE TS FUZZY PI/PO CONTROLLERS AS NONLINEAR VARIABLE GAIN PI/PO CONTROLLERS 5.4.1. Configuration of Fuzzy Controller We first study a TS fuzzy PI controller and then extend the results to the corresponding TS fuzzy PD controller. Part of the TS fuzzy PI controller configuration is similar to the configuration of the simplest Mamdani PI controller in Section 3.6. Except for the rule consequent, this TS fuzzy controller is simplest. We call it a simple, instead of simplest, fuzzy controller because the rule consequent are quite general.
122
Chapter 5 • TS Fuzzy Controllers with Linear Rule Consequent
The fuzzy sets for the input variables, e(n) and r(n), are given in Fig. 5.1. They are the same as those used by the Mamdani fuzzy PI controller, shown in Fig. 3.1a, except for the xaxis variables. Four fuzzy rules are used: IF e(n) is Positive AND r(n) is Positive THEN ~U(n) = ale(n) + b1r(n) IF e(n) is Positive AND r(n) is Negative THEN
~U(n)
= a2e(n) + b2r(n)
(r1) (r2)
IF e(n) is Negative AND r(n) is Positive THEN
~U(n)
= a3e(n)
IF e(n) is Negative AND r(n) is Negative THEN ~U(n) =
+ b3r(n) a4e(n) + b4r(n)
(r3) (r4)
where a, and b, are eight design parameters, all of which have nonnegative values, or the fuzzy controller becomes a positive feedback controller in one or more ICs. This point will become clearer after its explicit structure is derived. In the rules, the Zadeh fuzzy logic AND operator is used. Unlike the Mamdani fuzzy (PID) controllers, the TS fuzzy rule scheme never uses the fuzzy logic OR operator because no two rule consequent are exactly the same. For defuzzification, the centroid defuzzifier is utilized.
5.4.2. Derivation and ReSUlting Structure According to (5.3), this fuzzy controller is a nonlinear PI controller with variable gains: ~U(n)
= Ki(e,r). e(n) + Kp(e,r). r(n).
To derive the explicit expressions of Kp(e,r) and Ki(e,r), we need to evaluate the fuzzy AND operations in the four rules, which requires the divisions of the input space into 12 ICs shown in Fig. 3.3. The evaluation outcomes are the same as those given in Table 3.1. Putting these memberships into the defuzzifier, one obtains the variable gains in Table 5.1. Although the mathematical structures for Kp(e,r) and Ki(e,r) are identical, their expressions are actually different because of the difference in the coefficients.
Membership Negative
Positive
e(n) or r(n)
-L
o
L
Figure 5.1 Graphical definitions of two input fuzzy sets of the TS fuzzy PI controller, Positive and Negative for both e(n) and r(n).
Section 5.4. •
Simple TS Fuzzy PljPD Controllers as Nonlinear Variable Gain PljPD Controllers
123
TABLE 5.1a Proportional-Gain Kp(e,r) and Integral-Gain Kj(e,r) of the Simple TS Fuzzy Controller When e(n) and r(n) are in the 12 different ICs shown in Fig. 3.3. ICNo. 1 and 3
(L - le(n)\)A 1 + (L + r(n»)A2 + (L - r(n»)A3 2(2L - le(n)\)
2 and 4
(L -lr(n)\)B 1 + (L + e(n»B2 + (L - e(n»B3 2(2L - Ir(n)1)
5 and 9
(L + r(n»C1 + (L - r(n»C2
7 and 11
(L + e(n»D 1 + (L - e(n»D2
6, 8, 10, and 12
2L 2L E
IC 1 to IC4 are of the greatest interest and importance because the variable gains are most nonlinear in these regions. A stable fuzzy control system should operate in these regions most of the time as (e(n), r(n» = (0,0) is the system equilibrium point. From the table, one can see the following:
(1) Kp(e,r) depends only on b i to b4, whereas Ki(e,r) depends only on al to a4. Kp(e,r) and Ki(e,r) are uncoupled and hence can be designed separately using proper values of a, and b., i = 1, 2, 3, 4. (2) When e(n) and r(n) are in an IC other than IC6, IC8, ICI0, or ICI2, Kp(e,r) and Ki(e,r) depend on e(n) and r(n). The dependence is nonlinear and is also partially affected by the values of a i and b.. When e(n) and r(n) are in IC6, IC8, ICI0, or ICI2, the fuzzy controller becomes a linear PI controller, and Kp(e,r) = b, and Ki(e,r) = a, (i depends on IC number). (3) Kp(e,r) becomes a constant if b i = b2 = b 3 = b4 and Ki(e,r) is fixed when al = a2 = a3 = a4. This is the case with respect to the entire input space. Figure 5.2 provides an example of constant Kp(e,r), where b i = b2 = b 3 = b4 = 5 and the gain surface is a plane. Hence, one can choose such a, and b, that make both Kp(e,r) and Ki(e,r) variable gains, one of them variable gain and the other constant gain, or both fixed gains. If both gains are fixed, the fuzzy controller becomes a linear PI controller. (4) At the system equilibrium point, the fuzzy controller becomes a linear PI controller with Kp(O,O) = (b i + b2 + b3 + b4)/4 and Ki(O,O) = (al + a2 + a3 + a4)/4. (5) The fuzzy controller switches from one IC to another, depending on the change of e(n) and r(n). However, the switching is always continuous and smooth on the boundaries of the adjacent ICs involved, as is the switching of Kp(e,r) and Ki(e,r). (6) The values of a, and b, should be nonnegative. A negative value for anyone of them will result in a negative gain for the linear PI controller in IC6, IC8, IC 10, and IC 12 and may also cause negative gain in other les. A negative gain means a positive
124
Chapter 5 • TS Fuzzy Controllers with Linear Rule Consequent TABLE S.tb The coefficients for Kp(e,r) and Ki(e,r) in Table 5.1a. Kp(e,r)
rc No. 1 3
2 4
5 9
7
11
Ki(e,r)
Al
A2
A3
Al
A2
A3
b3 +b4 bl +b2
bI b3
b2 b4
a3 +a4 +a2
al
a3
a2 a4
BI
B2
B3
BI
B2
B3
b2 +b4 b, +b3
bI b2
b3 b4
a2 +a4 +a3
at a2
a3 a4
CI
C2
CI
C2
s,
bI
b2 b4
al
a3
a2 a4
DI
D2
DI
D2
b, b2
b3 b4
al
a3 a4
al
al
a2
E
E
b, b3 b4 b2
6 8 10 12
al
a3 a4 a2
feedback controller. Although such a controller will be local, it could make the fuzzy control system unstable and hence undesirable.
5.4.3. General Characteristics of Variable Gains The key for the fuzzy controller is its nonlinear, time-varying characteristics of the gains. First, we prove that Kp(e,r) and Ki(e,r) monotonically increase or decrease in every IC. In ICI and IC3, K (
) _ (L - le(n)I)A I
p e,r -
+ (L + r(n»A 2 + (L 2(2L - le(n)1)
r(n»A 3
,
and 8Kp (e,r ) _
A2
-
A3
8r(n) - 2(2L - le(n)/)
=
b i - b2 2(2L - le(n)1) =F O.
Hence, when b i =1= b2 , Kp(e,r) does not have any extreme point and thus is monotonic in leI and IC3. On the other hand, when b i = b2 , K (
) _ (L - le(n)I)A I + 2LA 2 _ Al 2(2L - le(n)1) - 2
p e,r -
L(2A 2
+ 2(2L -
-
AI)
le(n)1) ,
Section 5.4. • Simple TS Fuzzy PI/PD Controllers as Nonlinear Variable Gain PI/PD Controllers
125
10
-.::
2
~ 5
~
0 -2
2
e(n)
Figure 5.2 A three-dimensional plot of an example constant proportional-gain shows Kp(e,r) when b, = b2 = b3 = b4 = 5. The gain surface is a plane parallel to the e(n}-r(n) plane.
°
which is monotonic when le(n)1 changes from to L. Combining the two cases, one sees that Kp(e,r) is monotonic in ICI and IC3. The same can be shown for IC2 and IC4. In IC5 to ICI2, Kp(e,r) is of a plane and hence is monotonic. Since Kp(e,r) and K j(e,r) have the same mathematical structure, Kj(e,r) is monotonic in ICI to ICI2, too. Next, we show that the maximum ofKp(e,r) and Kj(e,r) is a constant plane that is the entire region of IC6, IC8, ICIO, or ICI2. Their minimum is also a constant plane and is the whole area of one of the three ICs left. These planes are parallel to the e(n) - r(n) plane. Furthermore, Kp(e,r) and K j(e,r) satisfy the following:
s Kp(e, r) -s max(b l ,b z,b3,b4),
(5.5)
min(al,aZ,a3,a4) ::: Kj(e, r)::: max(al,aZ,a3,a4)'
(5.6)
min(b l ,b z,b 3,b4)
The proof is quite straightforward. Because of the monotonicity, Kp(e,r) in leI to IC4 can achieve its maximum and minimum only when (e(n), r(n» is at the following five coordinates: (0,0), (L,L), (-L,L), (L,-L) , and (-L,-L) . At (0,0),
KP(0,O) = bl +b z : b3 + b4 •
126
Chapter 5 •
TS Fuzzy Controllers with Linear Rule Consequent
In the remaining four coordinates, Kp(e,r) is equal respectively to b., b 3 , b 2 , or b4 , regardless of which IC is involved. Thus, the maximum of Kp(e,r) is the largest value, whereas the minimum is the smallest value among the four parameters. In IC5, IC?, IC9, and ICII, Kp(e,r) is a plane and reaches its maximum on the boundary with IC6, IC8, ICIO, or ICl2 and its minimum on the other boundary with one of the three ICs left. The maximum and minimum of Kp(e,r) are the same as those of Kp(e,r) in ICI to IC4. In IC6, IC8, ICIO, and ICI2, Kp(e,r) is a constant, bb s; b4 , or b 2 • Hence, the maximum and minimum of Kp(e,r) are the largest and smallest parameters among these four parameters. Putting these analyses together for ICI to ICl2 and noting that Ki(e,r) has the same mathematical structure as that of Kp(e,r), we obtain the ranges in (5.5) and (5.6). The maximum occurs in IC6, le8, ICIO, or ICI2, and the minimum takes place in one of the remaining three ICs. The number of different shapes for the nonlinear gain variation are countless. However, according to the above discussion, major features of the gain variation are largely determined by a i and b.. For brevity, we only need to study Kp(e,r). Figure 5.3 shows the values of Kp(e,r) at (0,0) as well as in IC6, IC8, ICIO, and ICI2. Because
which means the smallest or largest gain cannot happen at (0,0). As a result, the tbreedimensional gain surface cannot be convex, leading to the impossibility of producing gain surfaces, regardless of the values of b., similar to the one generated by the Mamdani fuzzy PI controller (Fig. 3.5). On the other hand, the TS fuzzy PI controller can generate a countless number of other types of gain variation impossible to the Mamdani fuzzy PI controller. One can design the gain variation characteristics for a particular application through a, and b..
IC6 (Kp(e,r)=b j )
IC?
(Kp(e,r)=b3) IC8
IC2 ICI IC9
Ie3
1 4 Kp(e,r)=4 _ l
Lb
ICS
e(n)
11
IC4 (Kp(e,r)=b4 ) ICIO
ten
ICl2 (Kp(e,r)=b2 )
Figure 5.3 The values of Kp(e,r) at (0,0) as well as in IC6, IC8, ICIO, and JCI2.
•
Section 5.4. •
Simple TS Fuzzy PI/PD Controllers as Nonlinear Variable Gain PI/PD Controllers
127
5.4.4. Three Specific Types of Gain Variation Characteristics
The three major types of characteristics can be visualized with the aid of threedimensional plots of Kie,r) . The first major type occurs when b, 2: b2 and b 3 2: bs. This situation is illustrated in Fig. 5.4 where b l = 4, b 2 = 2, b3 = 3, and b4 = 1. Without loss of generality, we let L = I for this and the rest of the figures in this section. There are three more similar situations: (1) b4 2: b2 and b 3 2: s; (2) b2 2: b, and b4 2: s; and (3) b 3 2: b l and b4 2: b2 • Anyone ofthem is representative, but we will discuss the one shown in Fig. 5.4. The gain in IC6 is larger than that in IC8 and ICI2, but the gain in ICIO is the smallest, due to b, 2: b2 and b 3 2: b4 • Loosely speaking, the gain in the first quadrant of e(n)-r(n) plane is larger than that in the second quadrant, which is bigger than that in the fourth quadrant. The gain in the third quadrant is the smallest. In ICI to IC4, the gain surface is nonlinear, and the surface is linear (i.e., planes) in the rest of ICs. In each IC, the gain varies monotonically with the change of e(n) and r(n), which confirms the above theoretical analysis. The gain surface in Fig. 5.4 is asymmetric. It can be made symmetric by letting, say, b 2 = b 3 = 2, leading to the symmetry with respect to the line e(n) = r(n) (see Fig. 5.5).
4 -;:::3
2
'll
~2 1
-2
e(n)
2
Figure 5.4 A three-dimens ional plot showing the first type of gain variation with e(n) and r(n) . The parameter values are: b l = 4, b2 = 2, b3 = 3, and b4 = 1. Without loss of generality, L = 1.
128
Chapter 5 • TS Fuzzy Controllers with Linear Rule Consequent
4 ~3 Q)
2
~2 1 -2
e(n)
2
-2
Figure 5.5 A three-dimensional plot showing the first type of gain variation with e(n) and r(n) . The parameter values are: b l = 4, b2 = 2, b3 = 2, b4 = 1, and L = I. Because b2 = b3 , the gain surface is symmetric with respect to the line e(n) = r(n).
The second major type occurs when b, and b4 are larger than b 2 and b3 , as illustrated in Fig. 5.6, where b = 4, b2 = 1, b3 = 2, and b4 = 3. The largest two gains occur in the first and third quadrants, whereas the smallest two are in the third and fourth quadrants. The characteristics are governed by the relationships b l and b4 ::: b 2 and b3 • Figure 5.7 shows a symmetric gain surface when b l = 4, b2 = 1, b3 = 1, and b4 = 4. The symmetry is in terms of both the line e(n) = r(n) and the line e(n) = -r(n). The last major type takes place when b, :::: b2 :::: b4 :::: b 3 , an example of which is given in Fig. 5.8, where b, = 4, b2 = 3, b3 = 1, and b4 = 2. The gain magnitude in the descent order is in the first, fourth, third, and second quadrant. By letting b2 = b3 = b4 = 1, we get Fig. 5.9, which is symmetric to the line e(n) = r(n) .
5.4.5. Performance Improvement Due to Variable Gains Like the Mamdani fuzzy PID controllers, proper design and use of the variable gain can achieve the desired control effect superior to linear control with constant gains, including the
Section 5.4. •
Simple TS Fuzzy PI/PD Controllers as Nonlinear Variable Gain PI/PD Controllers
129
4 -=:3
2
q)
~2 1 -2
2
e(n)
Figure 5.6 A three-dimensional plot showing the second type of gain variation with e(n) and r(n) . The parameter values are: b, 4, b2 1, b3 2, b4 3, and L 1. The gain surface is asymmetric.
=
=
=
=
=
linear PID controller. We now study the gain variation in the context of control and in comparison with the gains of the corresponding linear PI controller whose proportional-gain is Kp(O,O) and whose integral-gain is Kj(O,O). We first take the gain variation shown in Fig. 5.7 as an example. When both e(n) and r(n) are in the first or third quadrant of the e(n)-r(n) plane (excluding the origin),
Roughly speaking, the farther the current state (e(n), r(n)) is away from (0,0), the larger Kie,r) and K;(e,r) are as compared to KiO,O) and K;(O,O), respectively. This statement becomes strictly true when (e(n), r(n)) is on the line e(n) = r(n). The maximum gain, 4, is reached at (L,L) and (-L,-L) and is kept as such for e(n) 2: Land r(n) 2: L as well as for e(n) ~ -L and r(n) ~ -L (i.e., IC6 and ICIO). In these two quadrants, the system under control is in one of the following two situations: (1) the system output is already above the setpoint and is still increasing, or (2) the system output is below the setpoint and is still decreasing. In either case, the system output is running away from the setpoint. From the control point of view, a larger decrement of the controller output (or an increment for the
Chapter 5 • TS Fuzzy Controllers with Linear Rule Consequent
130
-r
...1'
.....i.....
";'"
I
!
';
··f·· ..
,
'r" ,
.
' , - '.~
..
.., .....
.....
............
...... . :.
..... .
.
: .
...;
4 10 • •••
.......
2
1 ·2
r(n)
2
e(n)
Figure 5.7 A three-dimensional plot showing the second type of gain variation with e(n) and r(n) . The parameter values are: b, = 4, b2 = 1, b3 = 1, b4 = 4, and L = 1. The gain surface is symmetric in terms of both the line e(n) = r(n) and the line e(n) = -r(n).
second situation) is beneficial. The farther the system output is away from the setpoint and/or the faster the system output is runn ing away from the setpoint, the greater the decrement (or increment) should be so that the system output is driven to the setpoint more quickly. On the other hand, when (e(n), r(n» is close to (0,0) , a smaller decrement or increment of the controller output is advantageous in order to avoid possible system instability owing to excessive change of the controller output. The fuzzy controller with the gain variation shown in Fig. 5.7 clearly implements these control strategies naturally and smoothly. In these two quadrants, the signs of e(n) and r(n) are the same . The proportional control and integral control are additive in absolute value terms . The variable gains provide variable amplification of the addition outcome. When both e(n) and r(n) are in the second or fourth quadrant of the e(n}-r(n) plane (excluding the origin) ,
Kie,r) < KiO,O)
and
Kj(e,r) < Kj(O,O).
Approximately speaking, the farther (e(n), r(n» is away from (0 ,0), the smaller Kp(e,r) and Kj(O,O) are than KiO ,O) and Kj(O,O), respectively. The statement becomes precise if
Section 5.4. • Simple TS Fuzzy PljPD Controllers as Nonlinear Variable Gain PljPD Controllers
131
2
e(n)
2
Figure 5.8 A three-dimensional plot showing the third type of gain variation with e(n) and r(n) . The parameter values are: b l = 4, b2 = 3, b3 = I, b4 = 2, and L = 1. The gain surface is asymmetric.
(e(n), r(n)) is on the line e(n) = -r(n). The minimum gain, 1, is achieved at (-L,L) and (L,-L) and remains as such for e(n) 2: L and r(n) :::: -L as well as for e(n) :::: -L and r(n) 2: L (i.e., in IC8 or ICI2). In these two quadrants, the system output is in one of the two situations: (1) the system output is above the setpoint but is decreasing; or (2) the system output is below the setpoint but is increasing . In either situation, the system output is approaching the setpoint. Because of this, the gains should be reduced to avoid excessive change of the controller output that could result in unwanted oscillation of the system output around the setpoint. The faster the system output is approaching the setpoint, the more the gain reduction. The gains become zero if the approaching rate is too big (i.e., when r(n) :::: -L or r(n) 2: L), regardless of the value of e(n). The gain reduction is insignificant if the approaching rate of the system output is small and the system output is close to the equilibrium point. Since the signs of e(n) and r(n) are opposite, the proportional control action and integral control effect are subtractive in absolute value terms. The gain variation makes the subtraction result smaller. The above structure derivation and gain variation analyses can easily be extended to cover the corresponding TS fuzzy PD controller on the basis of the relationship between a PI controller in incremental form and a PD controller in position form.
132
Chapter 5 • TS Fuzzy Controllers with Linear Rule Consequent
2
2
e(n)
Figure 5.9 A three-dimensional plot showing the third type of gain variation with e(n) and r(n). The parameter values are: b, 4, b2 1, b3 1, b4 1, and L 1. The gain surface is symmetric with respect to the line e(n) r(n).
=
=
= =
=
=
5.4.6. Design of Gain Variation Characteristics
So far, the analysis has been carried out from the viewpoint of control theory. On the practical side, an example on point is the feedback control of mean arterial pressure in postsurgical cardiac patients (see Sections 8.3). Because a lower blood pressure, say 50 mm Hg, is far more life-threatening than a higher pressure, say 110 mm Hg, biased control of the drug infusion rate must be implemented. The infusion rate must be reduced much more quickly when the blood pressure is substantially below the normal level. The farther the blood pressure is below the normal level, the faster the rate reduction must be. The first clinical blood pressure controller [184] indeed implemented this kind of biased control strategies. The controller was a PI controller with a decision table that had seven rules for changing the proportional-gain and integral-gain according to the current state of the blood pressure. One of the rules doubled the controller gains whenever the blood pressure became 5 mm Hg below the normal level, aiming to speed up the infusion rate reduction.
Section 5.4. • Simple TS Fuzzy PIjPD Controllers as Nonlinear Variable Gain PIjPD Controllers
133
With the nonlinear variable gain shown in Fig. 5.9, these biased control strategies can be realized in a smoother and more natural fashion. The gains in the first quadrant of the e(n)-r(n) plane are, roughly speaking, bigger than those in the third quadrant, making the rate reduction faster than the rate increase. The gains at (L,L) are 2.29 (i.e., 4/1.75) times as large as that at (0,0) and four times as big as that at (-L, -L). The gains in the third quadrant are quite "flat," meaning the gain variation in that quadrant is small. All these are desired biased control strategies. In general, properly designed gain variation enables the fuzzy controller to outperform the linear PI controller. On the other hand, inappropriate selection of a, and b, can lead to irrational gain variation for the specific control problem of interest.
5.4.7. Simulated Control of Tissue Temperature in Hyperthermia We now demonstrate the usefulness of the simple TS fuzzy PI controller by applying it to a system model used in hyperthermia control study. High-performance temperature control during hyperthermia is difficult because hyperthermia is a dynamic, time-varying process involving varying blood perfusion rates, both in time and in space, variation in the physical and physiological properties of the tissue under the treatment, and time delay due to heat transfer in the tissue. The system under control is nonlinear and time-varying, and its accurate, explicit model is unavailable. The best mathematical model relates heating energy, E(t) , to tissue temperature, T(t), is a bio-heat transfer equation, which is a complicated three-dimensional partial differential equation with no closed-form analytical solution. Numeric solution takes a prohibitively long time. For a control study, a simplistic linear first-order model with a time delay may be used, which approximates the bio-heat partial differential equation reasonably well [49]. In Laplace form, the hyperthermia temperature model is described by
T(s) K _~ s --=--e d E(s) ts + 1
(5.7)
where K, the model gain, is in the range of 0.12 to 24.6°C/W, and r, the time constant, is in the range of 43 to 2570 s. The value of time delay 'Cd varies from patient to patient-normally 10 to 70 s. The parameter values for typical patients are: K = 1.1, 't' = 250, and rj = 45, and we use these nominal values in computer simulation. The sampling period is chosen to be 1 s. Guided by the theoretical principles coupled with some trial-and-error effort, we found that al = 0.005, a2 = 0.007, a3 = 0.004, a4 = 0.006, b l = 2, b2 = 1.62, b3 = 1.4, b4 = 2, and L = 1 achieved satisfactory temperature performance in computer simulation (Fig. 5.10). The TS fuzzy PI controller could quickly raise tissue temperature to the desired level without overshoot and could also maintain temperature at that level afterward. (See temperature performance between 0 and 799 s.) To demonstrate the robustness and stability of the fuzzy control system, K and 't' were increased suddenly by 20% (to K = 1.32 and 't' = 300) at time 800 s and then dropped suddenly back to their nominal values at time 1500 s. The maximal temperature error due to the abrupt parameter changes was only 1.I°C, and the fuzzy controller eliminated the error quickly. These simulation results show that the fuzzy control system is robust and stable even in the face of sudden and significant changes in the system
134
Chapter 5 • TS Fuzzy Controllers with Linear Rule Consequent 46,---,-----,,---,------r-----r---.----,-----.-----.-----, 45
36 "-_ _'-_----'_ _----L_ _- - ' -_ _---'-_ _- - ' -_ _- - ' -_ _.....L.._ _- - ' -_ _- ' 400 600 200 o 800 1000 1200 1400 1600 1800 2000 Time (second)
Figure 5.10 Simulated performance of the simple TS fuzzy PI control of tissue temperature using the hyperthermia model (5.7). The temperature setpoint is 43°C. Between 0 and 799 seconds, the nominal model parameters (K = 1.1, r = 250 and 'd = 45) are used . To test the stability and robustness of the fuzzy control system, at time 800 seconds, K and r are suddenly increased by 20% and then abruptly returned to their nominal values at time 1500 seconds.
parameters. As the performance is determined by Kp(e,r) and K j(e,r), their changes with respect to e(n) and r(n) are given in Fig. 5.11. We also used a linear PI controller to control the same model, and the system performance was comparable to that of the fuzzy PI control system. For this particular system, the fuzzy controller may not have significant advantages for two reasons. First, the model is rather simple, and the time delay is insignificant as compared with the time constant. The linear Pill controller is known to be capable of handling this type of system well. Second, the fuzzy controller has nine parameters to design and tune (aj , b., and L) , which is difficult and time-consuming. Manually finding optimal values for nine parameters is extremely hard, if possible at all. And there are no automated methods or techniques to do it. After all, this issue is ultimately a global nonlinear optimization problem, and no general solution is available . Thus, any potential performance gain by the nonlinear gain variation may not be realized owing to poor selection of the parameter values. Linear Pill controller may outperform the fuzzy controller not necessarily because it is better in structure but because it is much easier to design and tune to reach suboptimal gain values . We will significantly cut
Section 5.5. • Typical TS Fuzzy PI/PD Controllers as Nonlinear Variable Gain PI/PD Controllers
135
2
-.:::
1.8
2
~ 1.6
~
1.4 1.2 ·2
(a)
e(n) Figure 5.11 Three-dimensional plots of Kp(e,r) and K;(e,r) of the simple TS fuzzy PI controller controlling the hyperthermia model (5.7): (a) Kp(e,r) with the parameters being b, = 2, b2 = 1.62, b3 = lA, and b4 = 2.
the excessive number of design parameters by introducing a simplified TS fuzzy rule scheme in Section 5.6.
5.5. TYPICAL TS FUZZY PI/PO CONTROLLERS AS NONLINEAR VARIABLE GAIN PI/PO CONTROLLERS
In this section, we study more typical and complicated TS fuzzy PI/PD controllers. 5.5.1. Fuzzy Controller Configuration The fuzzy PI/PD controllers in this section use at least three trapezoidal or triangular input fuzzy sets for each of the two input variables (i.e., e(n) and r(n» . Subsequently, at least nine fuzzy rules are needed. There are two main differences, in comparison with the fuzzy controller in the last section. As before, we will only investigate the fuzzy PI controller, and the results can be extended directly to cover the corresponding fuzzy PD controller.
Chapter 5 • TS Fuzzy Controllers with Linear Rule Consequent
136
7 2
~6
"-
ell
~t
5 4 -2
2
(b)
e(n)
Figure 5.11 Three-dimensional plots of Kp(e,r) and Kj(e.r) of the simple TS fuzzy PI controller controlling the hyperthermia model (5.7): (b) K j(e,r) with the parameters being a t = 0.005, az = 0.007, a3 = 0.004, a4 = 0.006, and L=l.
Figure 5.12 illustrates definitions of the input fuzzy sets. They are of trapezoidal type, which contains the triangular fuzzy sets as special cases . The upper and lower sides are 2A and 28, respectively. The shape of each fuzzy set is identical, and the fuzzy sets are uniformly distributed over [-L ,L]. Among N fuzzy sets, J fuzzy sets are for positive e(n) and r(n), J fuzzy sets are for negative e(n) and r(n), and one fuzzy set is for nearly zero e(n) and r(n). Using x(n) to represent either e(n) or r(n), we find that the mathematical definitions of the fuzzy sets are as follows :
0,
p,;(x) =
x(n)
E
(-oo,(i-l)S+A]
x(n) - (i - l)S -A , x(n) S-2A x(n) 1,
E
«i _ l)S +A, is -A]
E
(is-A,iS+A]
x(n)
E
(is+A ,(i+ 1)S-A]
x(n)
E
«i + l)S - A, 00).
(i+l)S-A-x(n) S-2A, 0,
Section 5.5. • Typical TS Fuzzy PI/PD Controllers as Nonlinear Variable Gain PI/PD Controllers
137
Membership
e(n)
-JS -(J-l)S-A -JS+A
-S+A
0
S-A (i-l)S+A
is (i+ I)S-A (i+2)S-A is+A
(J-l)S+A JS JS-A
r(n)
Figure 5.12 Illustrative definitions of N = 2J + 1 trapezoidal input fuzzy sets for e(n) and r(n), where 2A and 28 are the upper and lower sides, respectively.
When i = J or -J, the respective definitions are
0,
x(n) E (-00, (J - I)S + A]
x(n) - (J - l)S -A, S-2A 1,
x(n) E ((J - l)S +A,JS -A] x(n) E (JS -A, 00),
and x(n) E (-00, -JS + A]
1, -(J - l)S -A -x(n) ,
x(n) E (-JS +A, -(J -1)S -A]
0,
x(n) E (-(J - I)S -A, 00).
S-2A
It is obvious that J-li(X) + J-li+l (x) = 1,. X E (-00, +00). The N 2 fuzzy rules used are in the form of IF e(n) is Ai AND r(n) is Bj THEN JiU(n) = aije(n) + bijr(n) where i.j = -J, ... ,J and the Zadeh fuzzy logic AND operator is used. Using the centroid defuzzifier, the fuzzy controller output is J
liU(n) =
J
L L
min(J-li(e), J-lj(r»(aije(n) + bijr(n»)
i=-Jj=-J J
J
L L
i=-Jj=-J
.
min(J-li(e), J-lj(r»
5.5.2. Derivation and Resulting Structure According to (5.3), this fuzzy controller is a nonlinear PI controller with variable gains. To analyze the characteristics of the variable gains, we need explicit expressions of the gains, and we now derive them.
138
Chapter 5 •
TS Fuzzy Controllers with Linear Rule Consequent
First consider the cases when both e(n) and r(n) are within [-L,L]. Without loss of generality, assume that the input variables satisfy is
.s e(n) .s (i + l)S
and jS
.s r(n) .s (j + l)S.
After fuzzification, only memberships for Ai' Ai+1, Bj , and Bj +1 are nonzero. Memberships for the rest of the fuzzy sets are zero. Consequently, only the following four fuzzy rules are executed: IF e(n) is Ai+1 AND r(n) is Bj +1 THEN J1U(n) = a(i+l)(j+l)e(n)
+ b(i+l)(j+l)r(n)
(r1*)
+ b(i+l)jr(n) IF e(n) is Ai AND r(n) is Bj + 1 THEN J1U(n) = ai(j+l)e(n) + bi(j+l)r(n) IF e(n) is Ai AND r(n) is Bj THEN J1U(n) = aije(n) + bijr(n). IF e(n) is A i+ 1 AND r(n) is Bj THEN J1U(n) = a(i+l)je(n)
(r2*) (r3*) (r4*)
To determine the results of the Zadeh fuzzy logic AND operation for rules r1* to r4*, we must use the square configured by [is, (i + 1)8] and [jS, (j + 1)8] and divide it into 12 ICs shown in Fig. 5.13a. The results of using the Zadeh fuzzy logic AND operator in the rules are shown in Table 5.2. Let
0= !(S - 2A), J1e(n) = e(n) - (i
+ 0.5)S,
and
J1r(n) = r(n) - (j
+ 0.5)S.
(5.8)
The size of the square to which IC1 to IC4 belong is 20 x 20. J1e(n) and J1r(n) are the respective distance, along the e(n) and r(n) axis, between the current state, (e(n), r(n)), and the center of the square, ((i + 0.5)S, (j + 0.5)S), in which the state is. The structure of the fuzzy controller in the square is 1
1
L L
min(Jli+k(e), Jlj+m(r))(a(i+k)(j+m)e(n) J1U(n) = _k=_O_m_=_O 1
+ b(i+k)(j+m)r(n)) _
1
L L min(Jli+k(e), Jlj+m(r)) k=Om=O = K i(J1e, Ar)e(n) + K p(J1e,J1r)r(n), where
1
1
L L
K i(J1e,J1r) =
k=Om=O
min(Jli+k(e), Jlj+m(r)). a(i+k)(j+m)
1
1
L L
k=Om=O
•
min(Jli+k(e), Jlj+m(r))
Substituting Table 5.2 to the defuzzifier, one gets the expressions for Kp(Ae,Ar) and K i(J1e,J1r), as shown in Table 5.3. Although the structures of Kp(J1e,J1r) and K i(J1e,J1r)
Section 5.5. • Typical TS Fuzzy PI/PD Controllers as Nonlinear Variable Gain PI/PD Controllers r(n) (j+I)S
res
IC6
IC9
is
e(n)
IC5
-~~-ICI
(i+0.5)S
is+A
(i+ 1)S-A (i+I)S
ICl2
e(n) is
(i+0.5)S
is+A
(i+ 1)S-A
(i+ I)S
(a)
r(n)
i
IC7'
IC8'
IC6'
JS
L JS-A
-IC9'
-JS
L
-L -JS+A
0
JS-A
IC5,---$J) JS
-JS+A
-L -JS
ICIO'
reiI'
ICI2'
(b)
Figure 5.13 Division of input space for analytically deriving structure of the typical TS fuzzy PI controller: (a) 12 ICs for the cases when both e(n) and r(n) are within [-L,L], and (b) eight ICs for the cases when either e(n) or r(n) is outside [-L,L].
139
140
Chapter 5 • TS Fuzzy Controllers with Linear Rule Consequent TABLE 5.2 Results of Evaluating the Zadeh Fuzzy AND Operations in the Four Fuzzy Rules rl * to r4* for the 20 ICs Shown in Fig. 5.13. ICNo. 1 2 3 4 5 & 5' 6 & 6' 7 & 7' 8 & 8' 9 & 9' 10 & 10' 11 & 11' 12 & 12'
rl*
r2*
r3*
r4*
Ilj+l (r) Ili+l(e) Ili+l(e) Ilj+l (r) Ilj+l (r)
Ilj(r) Ilj(r) Ili+l(e) Ili+l(e) Ilj(r)
Ili(e) Ili(e) Ilj+l (r) Ilj+l (r)
Ili(e) Ilj(r) Ilj(r) Ili(e)
1
Ili+l(e)
0 0 0 0 0
0 0
0 0 0 0 0
1
0 0 0 0
Ilj+l (r)
Ilj(r)
Ili(e)
0 0 0
Ili+l(e)
1
1 1 0
TABLE 5.3a Proportional-Gain Kp(e,r) and Integral-Gain Ki(e,r) of the Typical TS Fuzzy PI Controller when e(n) and r(n) are in the 20 Different ICs shown in Fig. 5.13. ICNo. 1& 3 2&4 5,5',9 & 9' 7,7',11&11' 6, 6', 8, 8', 10, 10', 12 & 12'
(0 -1L\e(n)/)Al
+ (0 + Ar(n))A2 + (0 -
L\r(n))A3
2(20 - lL\e(n)1) (0 - lL\r(n)I)B 1 + (0 + L\e(n))B2 + (0 - L\e(n))B3 2(20 - lL\r(n)1) (0
+ Ar(n))C1 + (0 -
r(n))C2
20 (0
+ Ae(n))D 1 + (0 -
L\e(n))D2
20
E
are the same, their expressions are actually different owing to different coefficients. Because ~ 20, all the design parameters, aij and hi}' must be positive in order for K p(L\e,Ar) and K i( L\r, L\r) to be positive, no matter how they change with e(n) and r(n). Let us then derive Kp(Ae,L\r) and Ki(L\e,L\r) for the cases in which either e(n) or r(n) is outside [-L,L]. The input space outside [-L,L] x [-L,L] is divided into eight ICs, namely IC5' to ICI2/, as shown in Fig. 5.13b. The expressions for Kp(L\e,L\r) and Ki(L\e,L\r) can analytically be derived in the same fashion, and the results are given in Table 5.3. Note that expressions for Kp(L\e,L\r) and Ki(L\e,L\r) in IC5' to IC8' are identical to those in IC5 and IC8. In summary, in ICI to IC8, the TS fuzzy PI controller is a nonlinear PI controller with variable gains. In IC9 to IC12 and IC9' to ICI2/, the fuzzy controller becomes a linear PI controller with constant gains, and the gains are different in different ICs. Like all the other fuzzy controllers, control algorithm switching between any adjacent ICs is always smooth and continuous.
o ~ 0 ± L\e(n) ~ 20 and 0 ::s 0 ± L\r(n)
Section 5.5. • Typical TS Fuzzy PI/PD Controllers as Nonlinear Variable Gain PI/PD Controllers TABLE 5.3b
The Coefficients of the Expressions for Kp(fle,Ar) and
Ki(Ae,Ar)
in Table 5.3a. Ki(fle, Ar)
Kp(fle, flr)
ICNo. 1 3
2 4
5 & 5' 9 &9'
7 & 7' 11 & 11'
6 (6') 8 (8') 10 (10') 12 (12')
Al
A2
A3
bi(j+l)+bij
b(i+l)(j+l)
b(i+l)j
bi(j+l)
bij
B1
B2
B3
b(i+l)j+bij
b(i+l)(j+l)
bi(j+l)
b(i+l)j
bij
b(i+l)(j+l)
b(i+l)(j+l)
+ b(i+l)j
+ bi(j+l)
141
Al
A2
A3
ai(j+l)+aij
a(i+l)(j+l)
a(i+l)j
+ a(i+l)j
ai(j+l)
aij
B1
B2
B3
a(i+l)j+aij
a (i+l)(j+ 1)
ai(j+l)
a(i+l)j
aij
a(i+l)(j+l)
a(i+l)(j+l)
+ ai(j+l)
C1
C2
C1
C2
b(i+l)(j+l)
b(i+l)j
a(i+l)(j+l)
a(i+l)j
bi(j+l)
bij
ai(j+l)
aij
01
O2
01
O2
b(i+l)(j+l)
bi(j+l)
a(i+l)(j+l)
ai(j+l)
b(i+l)j
bij
a(i+l)j
aij
E
E
b(i+l)(j+l) (bJJ)
a(i+l)(j+l) (aJJ)
bi(j+l) (b_JJ)
ai(j+l) (a_JJ)
bij (b_J-J)
aij (a_J-J)
b(i+l)j (bJ-J)
a(i+l)j (aJ-J)
The triangular fuzzy sets are special cases of the trapezoidal ones (i.e., A = 0). When A = 0 and both e(n) and r(n) are in [-L,L], IC5 to IC12 will not exist anymore, nor will their corresponding control algorithms. The value of A does not affect the structural results for the cases when either e(n) or r(n) is outside [-L,L].
5.5.3. Analysis of Gain Variation Characteristics First, for all i andj, Kp(~e,~r) and Ki(~e,Ar) monotonically increase or decrease in all ICs in [is, (i + 1)8] x [jS, (j + 1)8]. Suppose e(n) and r(n) to be in' ICI. Thus,
(i+O.5)S
~
e(n)
~
(i+ I)S-A
and
jS+A
~
r(n)
~
(j+ I)S-A.
The variable proportional-gain in ICI is K (~ ~) = (0 - l~e(n)DAl + (0 - ~r(n))A2 p e, r 2(20 _ l~e(n)D
+ (0 + ~r(n))A3
and we have 8Kp(~e,~r) =
8r(n)
A2 - A 3 _ b(i+l)(j+l) - b(i+l)j 2(20 - l~e(n)D - 2(20 - l~e(n)D .
'
142
Chapter 5 • TS Fuzzy Controllers with Linear Rule Consequent
Assume that b(i+l)(}+I) -# bO+1)}' aKp(~e,~r)/ar(n) -# 0, and hence Kp(~e,~r) does not have any extreme point, which means Kp(~e,~r) is monotonic. Now, consider the case when b(i+l)(}+I) = b(i+l)}' we have
°
to O. Combining these two cases, which is monotonic when l~e(n)1 changes from does not have any extreme point and is always monotonic in ICI. The same can be shown for IC2 to IC4. In IC5 to ICI2, Kp(~e,~r) is ofa plane and is thus monotonic. As Kp(~e,~r) and Ki(~e,~r) have the same mathematical structure, Ki(~e,~r) is monotonic in ICI to ICI2, too. We now prove the following: In [is, (i + I)S] x [jS, (j + I)S], for all i and j, Kp(~e,~r) achieves its maximum in one IC among IC9, ICIO, ICII, and ICI2, and reaches its minimum in one of the remaining three ICs. The same is true for Ki(~e,~r). Furthermore, the following is true: Kp(~e,~r)
min{b(i+l)(}+I) ,b(i+l)},bi(}+I) ,bij } :::: Kp(~e,~r)
.s max {b(i+l)(}+I),b(i+l)},bi(}+I),bij} '
min {a(i+ 1)(}+1)' a(i+ l)}' ai(}+ 1)' aij} :::: Ki(~e, ~r) :::: max{a(i+ 1(}+1)' a(i+ I)} ' ai(}+ 1) ,aij }. The proof is actually quite simple. Because of the monotonicity, Kp(~e,~r) in ICI to IC4 can achieve its maximum or minimum only when (~e(n),~r(n» is at the following five coordinates: (0,0), (0,0), (-fJ, fJ), (fJ, -fJ), and (-fJ, -0). At (0,0), KiO,O)
= b(i+l)U+l) + b(i+~j + biU+ 1) + bij .
At the remaining four coordinates, Kp(~e,~r) is equal to b(i+l)(}+I)' b(i+l)}' bi(}+I)' and bij' respectively. Note that b(i+l)(}+l)' b(i+l)}' bi(}+l)' and bij are positive. Hence . mm{b(i+l)U+l)' b(i+l)j' biU+ 1) ' bij}
~
b(i+l)(}+l)
+ b(i+l)} + bi(}+l) + bij 4
:::: max{b(i+l)(}+I) , b(i+l)}' bi(}+l)' bij}' Thus, for ICI to IC4, the maximum of Kp(~e,~r) is the largest parameter, whereas the minimum is the smallest parameter among b(i+l)(}+l)' b(i+l)}' bi(}+l)' and bij' In ICS to ICS, Kp(~e,~r) is that of a plane and reaches its maximum on one of the boundaries with IC9, IC I0, ICII, or IC12, and its minimum on another boundary with the remaining three ICs. The maximum and minimum of Kp(~e,~r) are the same as those of Kp(~e,~r) in ICI to IC4. Finally, Kp(~e,~r) = b(i+l)(j+l)' b(i+l)}' bi(j+l)' or bij in IC9 to ICI2, respectively. Hence, the maximum and minimum of Kp(~e,~r) are, respectively, the largest and smallest parameters among these four parameters. Combining these analyses for ICI to ICI2, the maximum of Kp(~e,~r) is the largest parameter, whereas the minimum is the smallest one among b(i+l)(}+1)' b(i+l)}' bi(}+l)' and bij' The maximum occurs in one of the four ICs, IC9 to ICI2, and the minimum happens in the remaining three ICs. Because Ki(~e,~r) has the same mathematical structure as that of Kp(~e,~r), the same conclusion holds for Ki(~e,~r). The global characteristics of Kp(~e,~r) and Ki(~e,~r) can be visualized in threedimensional graphics, and we will provide such 3D plots later.
Section 5.5. • Typical TS Fuzzy PIjPD Controllers as Nonlinear Variable Gain PIjPD Controllers
143
5.5.4. Relationship with the Simple TS Fuzzy Controller These structure and gain variation analyses are also performed in Section 5.4 for the simple TS fuzzy PI controller. As expected, the results there are very much in line with the results reported here. Indeed, much of the derivation and analysis can be simplified if one considers the following relationships between the simple and typical fuzzy PI controllers. ICI to IC4 in Section 5.4 correspond to ICt to IC4 in this section. The only difference is that the former is the square of [-L,L] x [-L,L], whose area is 2L x 2L, whereas the latter is [is + A, (i + I)S - A] x [jS + A, (j + I)S - A], whose area is 20 x 20. In the former case, e(n) and r(n) changes with respect to (0,0), the center of the square. But in the latter case, e(n) and r(n) vary in terms of the changing center + 0.5)S, (j + 0.5)S), and the relative changes are represented by L\e(n) and L\r(n) in (5.8). Now look at input fuzzy sets. Ai+I and Bj + I correspond to the fuzzy set Positive, whereas Ai and Bj correspond to the fuzzy set Negative. Furthermore, Qb Q2' Q3' and Q4 in fuzzy rules rl to r4 in Section 5.4 correspond, respectively, to Q(i+I)(j+l) , Q(i+l)j' Qi(j+l) , and Qij in rl * to r4*, and b i to b 4 correspond respectively to b(i+l)(j+I) to bij. Keeping these relationships in mind, much of the results in Section 5.5.3 can directly be derived from those in Section 5.4. This will also make understanding of the characteristics of the typical fuzzy PI controller easier. Evidently, Qij and bij govern the gain variation characteristics. All the analyses and illustrations for the simple TS fuzzy PI controller hold for the typical TS fuzzy PI controller. The three types of gain variation characteristics, shown in Figs. 5.4, 5.6, and 5.8, are also shared by the typical fuzzy PI controller. One only needs to replace b., b 2 , b 3, and b 4 by b(i+I)(j+l)' b(i+l)j' b i(j+l)' and bij' respectively, to attain the characteristics. Despite all these similarities, one should remember a critical difference between the typical and simple fuzzy PI controllers: The gain variation characteristic of the typical fuzzy controller is more diverse than that of the simple fuzzy PI controller because the overall gain characteristics of the former are composed of local gain characteristics of the individual smaller squares, [is, (i + 1)8] x [jS, (j + 1)8], i, j = -J, ... ,J - 1. Thus, the controller designer has more control over the shape of the gain surface and can design gain variation to a minute detail by properly selecting J as well as aij and bij. This design flexibility, achievable in theory, comes at the expense of a large number of parameters Qij and bij. The more detail the designer wants to manipulate, the larger the number of the parameters. This tradeoff is of practical importance and limitation. Because there is no systematic way to determine the values of Qij andbij' too many parameters can cause implementation difficulties. For instance, poor selection of some parameters can lead to illogical local gain variation characteristics, which makes the global gain characteristics unreasonable. In contrast, although the gain characteristics of the simple TS fuzzy PI controller are less flexible, they are easier to generate and hence could be of more practical value.
«i
5.5.5. Simulated Control of Tissue Temperature In Hyperthermia As an application, we now design a typical fuzzy PI controller to regulate tissue temperature via the hyperthermia model (5.7). Three trapezoidal input fuzzy sets, namely
144
Chapter 5 • TS Fuzzy Controllers with Linear Rule Consequen1 Membership
Positive
e(n) -1.0-0.8
-0.200.2
0.8 1.0
r(n)
Figure 5.14 Illustrative definitions of three trapezoidal input fuzzy sets used for typical TS fuzzy PI control of tissue temperature in computer simulation, where A = 0.2 and S = 1.
Positive, Zero, and Negative, shown in Fig. 5.14, are used to fuzzify e(n) and r(n). We choose L = 1, A = 0.2, and S = 1 (i.e., () = 0.3), and we employ the following nine fuzzy rules: IF e(n) is Positive AND r(n) is Positive THEN IF e(n) is Positive AND r(n) is Zero THEN
~U(n)
~U(n)
IF e(n) is Positive AND r(n) is Negative THEN IF e(n) is Zero AND r(n) is Positive THEN IF e(n) is Zero AND r(n) is Zero THEN
= aIOe(n)
~U(n)
~U(n)
~U(n)
= alle(n)
+ bllr(n)
+ bIOr(n)
= al_Ie(n) + bl_Ir(n)
= aOle(n)
+ bOlr(n)
= aooe(n) + boor(n)
IF e(n) is Zero AND r(n) is Negative THEN llU(n) = aO_Ie(n) + bO_Ir(n) IF e(n) is Negative AND r(n) is Positive THEN IF e(n) is Negative AND r(n) is Zero THEN
~U(n)
~U(n)
= a_Ile(n) + b_llr(n)
= a_IOe(n) + b_IOr(n)
IF e(n) is Negative AND r(n) is Negative THEN ~U(n) = a_I_Ie(n) + b_I_Ir(n). The analytical structure of this fuzzy PI controller can be obtained directly from the general structure in Table 5.3 by using J = 1, () = 0.3, and L = 1. There are a total of 18 aij and bij' Appropriately determining their values using the trialand-error method is very difficult, time-consuming, and almost impossible. Although there is no systematic method for selecting the values, one may use the analytical structure of the fuzzy controller as guidelines to more intelligently choose the values. Note that when e(n) E [-A,A] and r(n) E [-A,A] (that is, when i = 0 and) = 0), the fuzzy controller is a linear PI controller with proportional-gain boo and integral-gain aOO' We first tune these two parameters in computer simulation and find that aOO = 0.0075 and boo = 1.88 lead to satisfactory control performance in the region around the origin. Based on the general relationship between the gains of linear PI controller and its performance, we use aOO and boo as base values and adjust them to arrive at the initial values for the rest of 16 aij and bij' We then use computer simulation to fine tune these parameter values and obtain the following final values for the fuzzy control system performance shown in Fig. 5.15: all = 0.0088, alO = 0.0086, al-l = 0.0085, aOI = 0.008, aO-1 = 0.007, a-II = 0.0065, a-IO = 0.006, a-l-l = 0.0055, b l l = 2.22, b lO= 2.24, b l - l = 2.19, bOI = 2.05, bO-1 = 1.74, b- l l = 1.70, b_ IO= 1.58, and b- l - l = 1.48. The corresponding three-dimensional plots of Kp(~e,~r) and Ki(~e,~r) are depicted in Figs. 5.16a and 5.16b, respectively. For reference information, we also compare the control performance of the TS fuzzy PI control system with its linear counterpart. To make the comparison as fair as possible, we let
145
Section 5.6. • Simplified TS Fuzzy Rule Scheme 46 r-----r------,....------,r--------------.-------.,
45 44 43
39
38 37 36
L--
o
"-
200
L..-
400
---'
600
"nme(second)
--"
800
---"
1000
---I
1200
Figure 5.15 Simulated fuzzy control performanceof tissue temperature using a typical TS fuzzy PI controller and the hyperthermia temperature model (5.7). The temperature setpoint is 43°C.
proportional-gain and integral-gain equal Kp(O,O) = aoo = 0.0075 and Ki(O,O) = boo = 1.88, respectively. The simulation result, not shown here, indicates the marginal superiority of the fuzzy PI controller over the corresponding linear PI controller, owing to the gain variation. We should make two points clear. First, the performance gain is associated with an excessive number of design parameters. Second, the linear PI controller may outperform the fuzzy controller if it is tuned in an extensive manner.
5.6. SIMPLIFIED TS FUZZY RULE SCHEME 5.6.1. Disadvantages of TS Fuzzy Rule Scheme Compared to Mamdani fuzzy controllers, analytical study of TS fuzzy controllers involves more difficulties. A main reason is that TS controllers, more often than not, have far more design parameters and the number grows exponentially with the increase of the number of input variables. For instance, the TS fuzzy PI temperature controller in the preceding section has as many as 18 aij and bije Even the simple TS fuzzy PI controller in Section 5.4 still has eight aij and bije
Chapter 5 • TS Fuzzy Controllers with Linear Rule Consequent
146
2.5 -c
2
~
J' 1.5
(a)
-1
-1
-1
-1
f (n T)
(b)
e(nT)
Figure 5.16 Three-dimensional plots of Kp(t1e ,t1r) and K;(t1e,t1r) of the typical TS fuzzy PI controller controlling the hyperthermia temperature model (5.7): (a) K/t1e,t1r), and (b) K;(t1e,t1r).
147
Section 5.6. • Simplified TS Fuzzy Rule Scheme
In theory, these parameters provide a means for designing and achieving desired local as well as global control action, possibly resulting in superior control performance. To a large extent, the power of the TS fuzzy rule scheme lies in these parameters. In practice, however, the tuning of these parameters is often ineffective, inefficient, inappropriate, or sometimes even impossible when too many parameters are involved. This is the case partially because of the lack of linguistic intuitiveness of TS fuzzy rules. A Mamdani fuzzy controller intuitively relates the rule antecedent to the rule consequent, for the consequent is a fuzzy set with clear linguistic meaning. The functional rule consequent in a TS rule does not have such meaning. Automatic parameter tuning techniques, such as on-line or off-line nonlinear optimization schemes, may be used; they are not likely to be effective and efficient when the dimension of the parameter space is too high. With a large number of parameters, the convergence of the parameter identification will be difficult, and system stability will be hard to guarantee. In the present section, we introduce a simplified TS fuzzy rule scheme. The objective is to make the TS rule scheme more efficient by modifying it in such a way that the new scheme, while maintaining the spirit and advantages of the original scheme, drastically reduces the number of parameters in the rule consequent. We also derive the analytical structure of the simple TS fuzzy PI/PD controllers with the new rule scheme and analyze the characteristics of the resulting structure and gain variation in the context of control. Let us first look into the shortcoming of the TS rule scheme. For Q rules in the form of (5.1), each of which has M + 1 parameters in the rule consequent, there are in total K
= (M + I)Q
(5.9)
design parameters. For a TS fuzzy PID controller (i.e., M = 3) with only two fuzzy sets (i.e., PI = P2 = P 3 = 2, thus Q = 8) for each input variable, the total number of the parameters is 32. Even for a simpler TS fuzzy PI or PD controller (M = 2, PI = P 2 = 2, and Q = 4), K is still as high as 12. Compared to the linear PID controller that has only three design parameters (or two for a PI/PD controller), the TS fuzzy (PID) controllers are extremely disadvantageous as far as practicality and ease of use are concerned.
5.6.2. Simplified Linear TS Fuzzy Rule Scheme To dramatically reduce .the number of design parameters, we introduce a simplified linear TS rule scheme as follows: IF
Xl
(n) is
AI
1,1
AND ... AND xM(n) is
THEN U(n) (or AU(n)) = kl(ao IF
Xl
(n) is
AI 1J AND
AI
M
(1st rule) t1
+ alxl(n) + .... + aMxM(n))
... AND xM(n) is AIMJ
THEN U(n) (or AU(n)) = '9(ao + alxl (n)
+ ... + aMxM(n)).
(jth rule)
Without loss of generality, the value of kl can always be supposed to be 1. For a better notation, however, we will still use kl , instead of 1, to make the subscript of k consistent, and we will often keep k l in the derivation process as well as in the results for completeness of the presentation. The key to the new rule scheme is the coupling between rules via proportionality. The proportionality is fixed and is '9 for the jth rule with respect to the first rule (1st rule). In general, the proportionality between the ith rule andjth rule is ki/~. All the rule consequent is a common linear function of input variables, and they change as the values of input variables vary. In other words, like the original rule scheme, none of the rule consequent is constant.
148
Chapter 5 • TS Fuzzy Controllers with Linear Rule Consequent
The relationship between the parameters in the original and simplified linear TS rule consequent is (5.10) where 0 ~ i ~ M and 1 ~ j ~ Q. Hence, the simplified linear TS rule consequent can be regarded as a special type of the original linear TS rule consequent. The simplified linear TS rule scheme, though having far fewer parameters than the original scheme, is very powerful. Even a few simplified linear rules are able to produce superior nonlinear control to what the linear PID controller can possibly offer, as proved later in this chapter.
5.6.3. Parameter Reduction as Compared with Original TS Rule Scheme
to
For Q rules, ao, ... ,aM' k2, ... , ko. are design parameters. The total number is reduced
which is much smaller than K in (5.9). For instance, when M = 3 (Pill type) and Q = 8, A = 11 (but K = 32). When M = 2 (PI/PD type) and Q = 4, A = 6 (but K = 12). The parameter reduction rate due to the simplified TS rule scheme is K-A
M(Q-l)
11 = J ( = (M
+ I)Q·
The rate rises with the increase of M and/or Q (i.e., Pi). When at least one of Pi is large, Q is large, and to the limit, lim 11 = 1.
Pi-+OO
This is to say that the simplified scheme can reduce the number of parameters very significantly when at least one of the input variables is fuzzified by a large number of fuzzy sets. For a better illustration of how significant the reduction is, in Table 5.4, we calculate and tabulate 11 for different combinations of M and Q, assuming PI = ... = PM. TABLE 5.4
Parameter Reduction Rate due to the Simplified Linear TS Rule Scheme (%). Number of Input Fuzzy Sets for Each Input Variable Pi
Number of Input Variable M
1
2 3
4
2
3
4
5
6
25 50 66 75
33 59 72 79
38 63 74 80
40 64 74 80
42 65 75 80
149
Section 5.6. • Simplified TS Fuzzy Rule Scheme
5.6.4. Simplified Nonlinear TS Fuzzy Rule Scheme We now generalize the simplified rule scheme from the linear rule consequent to the arbitrary nonlinear rule consequent: IF Xl(n) is AI1,1 AND ... AND xM(n) is AIM,l THEN U(n) (or
~U(n))
(1st rule)
= klf(xl(n), ... ,xM(n))
IF Xl(n) is AI 1J AND ... AND xM(n) is AIMJ
(jth rule)
THEN U(n) = '9f(xI(n), ... , xM(n)). where f can be any nonlinear function. We call this scheme the simplified nonlinear TS rule scheme, which contains the simplified linear scheme as a special case when f is a linear function.
5.6.5. General Analytical Structure of Fuzzy Controllers with Simplified TS Fuzzy Rules Using the same general fuzzy controllers' configuration in Section 5.3 except the fuzzy rules, which are replaced by the simplified nonlinear TS fuzzy rules, we obtain the structure of the new general fuzzy controllers n _ L Jlj(x,A) . '9 j=l U(n) (or AU(n)) =f(xI(n), ... ,xM(n)) n = f3(x,A,k)·f(x), LJlj(x,A) j=l
where k is a vector containing all
'9 and -
f3(x,A,k) =
n
_
L Jlj(x,A) ·
j=l
'9
- 0- - -
LJlj(x,A)
j=l
Obviously, the general TS fuzzy controllers are nonlinear controllers with variable gains governed by f3(x,A,k). Although, from a theoretical standpoint, the nonlinear rule consequent is more general and thus appears to be more powerful, various practical applications with the original TS fuzzy rules have shown that the linear rule consequent is much easier to use and the resulting fuzzy controllers can satisfactorily solve complex nonlinear control problems. Therefore, we will focus exclusively on the fuzzy controllers using the simplified linear rule scheme, as we have done with the original TS rule scheme. When f is a linear function, the general fuzzy controllers become U(n) (or AU(n)) = f3(x,A,k)(ao
+ alxl(n) + ... + aMxM(n)),
where P(x,A,k).ao is a changing control offset, whereas P(x,:4,k).a; is variable gain for input variable x;(n), i = 1, ... , M. As a special case, the fuzzy PID controllers (i.e., when M = 3) are nonlinear PID controllers with variable gains. These results are expected. After
150
Chapter 5 •
TS Fuzzy Controllers with Linear Rule Consequent
all, the simplified linear rule scheme is only a special case of the original one. The results actually can be derived from (5.2) by using (5.10). Explicit formulation of P(x,A,k) for a given fuzzy controller may analytically be derived. The derivability depends on the complicity of fuzzy rules (i.e., f(x), if nonlinear function is used), the fuzzy logic AND operator, input fuzzy sets, and the defuzzifier that are used. Once P(x,A,k) is analytically available, the nonlinear variable gain characteristics can be analyzed in the context of control.
5.7. SIMPLE FUZZY PI/PO CONTROLLERS WITH SIMPLIFIED LINEAR TS FUZZY RULE CONSEQUENT 5.7.1. Configuration and Explicit Structure Derivation We now investigate gain variation characteristics due to P(x,A,k) for a simple TS fuzzy PI controller using the simplified linear rules. Unless otherwise stated, we will always assume that ao = O. The fuzzy PI controller uses the two-input fuzzy sets in Fig. 5.1 for e(n) and r(n) and the following four simplified rules: IF e(n) is Positive AND r(n) is Positive THEN ~U(n) = k1(al e(n) IF e(n) is Positive AND r(n) is Negative THEN
~U(n)
+ a2r(n»
= k2(ale(n)
+ a2r(n»
IF e(n) is Negative AND r(n) is Positive THEN ~U(n) = k 3(ale(n) + a2r(n» IF e(n) is Negative AND r(n) is Negative THEN
~U(n)
= k4(ale(n)
+ a2r(n»
where the product fuzzy logic AND operator is utilized. We remind the reader that k1 is always 1. The controller uses the centroid defuzzifier. Owing to the way the input fuzzy sets are defined, the defuzzifier's denominator is
Therefore,
where
+ k2/lp(e)/li/(r) + k3/li/(e)/lp(r) + k4/li/(e)Jli/(r).
p(e,r) = k1/lp(e)/lp(r)
Here, we use p(e,r), instead of p(e,r,A,k) for simplification. The fuzzy PI controller is a nonlinear PI controller because ~U(n)
= Ki(e,r) ·e(n) + Kp(e,r)-r(n),
where the variable proportional-gain and integral-gain are, respectively, Kp(e,r) = p(e,r)-a2
and
Ki(e,r) = p(e,r)-al-
The two gains are determined by p(e,r)_ Since the input fuzzy sets are piecewise linear, the e(n)-r(n) plane must be divided into nine K's, as shown in Fig, 5_17, to perform the fuzzy AND operations. Then, substituting the definitions of Jlp(e), Jli/(e), Jlp(r), and /lil(r) into the
Section 5.7. • Simple Fuzzy PI/PD Controllers with Simplified Linear TS Fuzzy Rule Consequent
151
t
t\n)
IC5
IC6
Figure 5.17 The e(n)-r(n) plane is divided into nine ICs for the structure derivation of the simple TS fuzzy PI controller with the simplified linear TS rules.
IC7
rca
IC4
(0,0)
IC8
rei
IC2
e(n)
--~
IC9
right side of the above equation and simplifying the resulting expression, we obtain explicit p(e,r) for ICI:
kt
p(e,r) = 4L2 [(1 + k2 + k3
+ (1 -
k2 + k3
-
+ k4 )L 2 + (1 + k2 - k3 - k4 )L · e(n) k4 )L · r (n) + (1 - k2 - k3 + k4 )e(n)r (n)].
(5.11)
The expressions for the rest of the eight ICs are given in Table 5.5. p(e,r) for ICI varies with e(n) or/and r(n). In IC2 and IC6, p(e,r) varies only with r(n), while in IC4 and IC8, p(e,r) changes only with e(n). Hence, in ICI, IC2, IC4, IC6, and IC8, the fuzzy PI controller is a nonlinear variable gain PI controller. p(e,r) is a constant k}, k tk3 , ktk4 , and kt~ in IC3, IC5, IC?, and IC9, respectively, making the fuzzy controller a linear PI controller. How p(e,r) varies with e(n) and/or r(n) is determined by the values of k2, k 3 , k4 , and L. Different values will produce different types of variable gains. Among the nine ICs, IC 1 is of the most interest and importance because p(e,r) is most nonlinear in this region and a stable fuzzy control system should stay in this region most of the time.
TABLE 5.5 The Explicit Expressions of p(e,r) Derived for the Nine ICs That Divide up the e(n) - r(n) Plane Shown in Fig. 5.17. IC No. 1 2 3 4 5 6 7
8 9
p(e,r)
Expression (5.11) k1[(1 - k2)r (n) + (1 + k2)L]/2L ~
k1[(1 - k3)e(n) + (1 + k3)L]/2L k 1k3 k 1[(k3 - k4 )r (n) + (k3 + k4)L]/2L k 1k4 kl[(~ - k4 )e(n) + (~ + k4)L]/2L k 1k2
152
Chapter 5 • TS Fuzzy Controllers with Linear Rule Consequent
The proportional-gain and integral-gain are coupled and proportional: Kp(e,r) _ a2 Ki(e,r) - at
This is not the case for the TS fuzzy PI controllers that use the original linear TS rule scheme. Their variable gain structures are the same, but the coefficients in the structures are different. Therefore, the two gains are not coupled and are not in proportion. The gain coupling is introduced by the rule consequent coupling of the simplified rule scheme and is a small price to pay for the significant parameter reduction and for making the TS rule scheme practically more useful. The gain coupling does not affect control performance. In Chapter 7, we will prove that fuzzy systems (e.g., fuzzy controllers) use the (simplified) linear TS rule scheme are universal approximators capable of approximating any continuous, nonlinear function to any degree of accuracy. This means that this type of TS fuzzy control can achieve any nonlinear solution.
5.7.2. Gain Variation Characteristics and Their Effect on Enhancing Control Performance Some important characteristics of p(e,r) can be observed: (1) The characteristics of p(e,r) are parameterized by '9 (j = 1, ... ,4). Whether the gain variation is sensible in the context of control depends on the values of '9. When symmetric fuzzy rules are used (symmetry in terms of input state, that is, k4 = k t = 1 and k2 = k3 ) , the e(n) and r(n) terms of p(e,r) will not exist and only the e(n)r(n) and Z? terms remain. When asymmetric fuzzy rules are employed (i.e., k4 =I- 1 or ~ =I- k3 ) , either the e(n) term or the r(n) term remains and p(e,r) is asymmetric. (2) Once the value of L is determined, there are three unknown parameters left in (5.11), namely, k2, k3 , and k4 • There are four different terms: L2, e(n), r(n) and e(n)r(n). The coefficients of these terms are determined by k2, k3 , and k4 • Since the number of equations is more than the number of unknown parameters, k2 , k3 , and k4 may not exist to produce some given coefficients. On the other hand, given the values of k2 , k3 , and k4 , the coefficients are always computable. Because Kp(e,r) and Ki(e,r) are determined by p(e,r), we now probe its characteristics when some specific values of '9 are used. Let us first study the situation where k t = 1, ~ = k 3 = 0, and k4 = 1. These values result in the following four symmetric rules: IF e(n) is Positive AND r(n) is Positive THEN ~U(n) = ate(n) + a2r(n)
(r1)
IF e(n) is Positive AND r(n) is Negative THEN ~U(n) = 0
(r2)
IF e(n) is Negative AND r(n) is Positive THEN
(r3)
~U(n)
IF e(n) is Negative AND r(n) is Negative THEN
= 0
~U(n)
= at e(n)
+ a2r(n).
(r4)
We have chosen these particular values for '9 because they generate some of the simplest, most useful control rules. To a large extent, these rules are like the four rules in Section 3.4.1 that are used by the simplest nonlinear Mamdani fuzzy controller. The meaning of these four rules may, in a loose sense, be linguistically interpreted as follows. (See also Fig. 3.2.) When the system output is below the setpoint but is increasing to approach the setpoint or when the
Section 5.7. • Simple Fuzzy PljPD Controllers with Simplified Linear TS Fuzzy Rule Consequent
153
output is above the setpoint but is decreasing to reach the setpoint (these situations are covered by rules r2 and r3), the fuzzy controller output should not change (i.e., liU(n) = 0). That is, the consequent of rules r2 and r3 should be zero . When the system output is below the setpoint and is still decreasing, rule rl should try to generate a positive liU(n) to increase the controller output for driving the output to the setpoint. Conversely, when the output is above the setpoint and is still increasing, rule r4 should attempt to produce a negative liU(n) to reduce the controller output, pulling the output to the setpoint. Substituting k l = k4 = 1 and ~ = k3 = 0 into Table 5.5, we obtain p(e,r) as listed in Table 5.6 for the nine ICs shown in Fig. 5.17. A three-dimensional plot of p(e,r) is provided in Fig. 5.18 for visualization, where without loss of generality, L = 1. p(e,r) is a symmetric function with respect to the lines e(n) = r(n) and e(n) = -r(n). This means that p(e,r) varies symmetrically in terms of these two lines, producing symmetric PI control for symmetric input states . That is, if liU(n) is WI and W2 at (E,R) and (-E,R), respectively, then liU(n) is WI and W2 , respectively, at (-E,-R) and (E, -R).
TABLE 5.6 The Expressions of p(e,r) When kl k4 I and ~ k 3 0 in Table 5.5.
= =
ICNo.
= =
p(e,r)
(e(n)r(n) + L2 )/ 1£ 2 (r(n) + L)/2L I (e(n) + L)/2L
I 2 3 4 5 6 7
o
(-r(n)+L)/2L I (-e(n) + L)/2L
8
o
9
1~~~.
0.75
p(e,r)
O~ 2~
o
-2
=
= =
=
Figure 5.18 Three-dimensional plot of p(e,r) when k l 1, ~ k3 0, k4 1, and L I. The gain surface is symmetric in terms of the line e(n) r(n) and the line e(n) -r(n).
=
=
=
Chapter 5 • TS Fuzzy Controllers with Linear Rule Consequent
154
Furthermore, fJ(O,O) = 0.5 and fJ(e,r) reaches its maximum, 1, at (L,L) and (-L, -L) and minimum, 0, at (L,-L) and (-L ,L). Thus, Kie,r) and Kj(e,r) can be twice as large as their steady-state gains (i.e., Kp(O,O) and Kj(O,0», or they can be reduced to as little as zero. Figures 5.18 and 5.7 are quite similar in shape. Hence, the gain variation in the context of control and in comparison with the gains of the corresponding linear PI controller can be analyzed in the same way as we did in Section 5.4.
5.7.3. Attaining Desired Gain Variation CharacteristIcs The gain variation characteristics may be designed by choosing proper values of '9 . The gain surface shape is governed, to a large extent, by the following five key points: fJ(O ,O) = k t(1 + l0. + k3 + k4)/4, fJ(L,L) = k t , fJ(-L ,L) = k tk3 , fJ(-L,-L) = k tk4 , and P(L, -L) = k t l0. . These points all involve '9. The task is to select such '9 values that fJ(O , 0), fJ(L,L), fJ(-L ,L), P(-L,-L), and fJ(L,-L) meet prespecified conditions. For an illustrative example, let us use the TS fuzzy PI controller in Section 5.7.2 to realize biased control of mean arterial pressure. (See Section 8.3 for details.) First, let k2 = k3 = 0, and the meaning of such selection in the context of control is already given above. Then let k4 be less than k t , causing k4 < 1 and fJ(L,L) to be greater than fJ(-L,-L) . As a consequence, fJ(e ,r) in the first quadrant of the e(n)-r(n) plane is, roughly and globally speaking, bigger than that in the third quadrant, making the drug infusion rate reduction faster than the rate increase. Numerically, let k4 = 1/ A where A is a constant and A > 1. Hence, fJ(O,O) = (1 + A)/4A. Different values of A can create different degrees of biased control. If A = 3 (other reasonable A values such as 2 or 4 are also fine), k4 = 1/3, fJ(-L ,-L) = k4 = 1/3, and P(O,O) = 1/3. This means that (1) the controller gain at (L,L) is three times as large as that at (0,0) or (-L,-L), and (2) fJ(e,r) in the third quadrant is quite "flat" (because fJ(O,O) = fJ(-L,-L», meaning the gain variation in that quadrant is small. This fJ(e,r) is plotted in Fig. 5.19. Indeed, the biased control strategies and the gain variation in the first quadrant are much bigger and steeper than those in the third quadrant. Like the fuzzy controllers using the original TS rule scheme, fuzzy controllers using the simplified TS rule scheme can also become unreasonable from the standpoint of control, if inappropriate values of '9 are used. (The chances of making such mistakes , however, are
~(e,r)
Figure 5.19 'Three-dimensional plot of p(e,r) when k. = I, k,. = k3 = 0, k4 = 1/3, and L = 1. The gain surface is symmetric in terms of the line e(n) = r(n) .
Section 5.7. • Simple Fuzzy PljPD Controllers with Simplified Linear TS Fuzzy Rule Consequent
155
1 0.5
o
~(e,r) -0.5
-1~~ -2 ~ o e(n)
e(n)
1
Figure 5.20 Three-dimensional plot of p(e,r) when k[ = I , kz = k3 = 0, k4 = -I, and L = 1. The gain surface is symmetric in terms of the line e(n) = r(n) . The plot shows that inappropriate values of kj can lead to unreasonable and illogical gain variation characteristics and hence an unusable controller. Specifically in this example, P(O,O) = 0, resulting in zero control gain at the equilibrium point.
probably smaller owing to fewer design parameters.) As an example, if the values of '9 are so chosen that
then p(e,r) for ICI is
k1
p(e,r) = 4L2 [(1 + k:!
+ (1 - k:! -
-
k3
-
k4)L·e(n) + (1 -
k:! + k3 -
k4)L ·r(n)
k3 + k4)e(n)r(n)] .
Obviously, P(O,O) = 0, meaning that the proportional-gain and integral-gain at the equilibrium point are zero . This class of p(e,r) is unusable as far as control is concerned. A plot of one such p(e,r) is shown in Fig. 5.20, where we let k 1 = 1, k2 = k3 = 0, and k4 = -1. This example highlights the importance of selecting proper '9 values.
5.7.4. Other Simple Fuzzy PI/PO Controllers with Simplified Linear TS Fuzzy Rule Consequent The fuzzy PI controller discussed so far uses the product fuzzy logic AND operator in the fuzzy rules. If all the components of the controller are kept the same but the product AND operator is replaced by the Zadeh AND operator, p(e,r) can also be quite straightforwardly derived. The resulting structures are listed in Table 5.7. (The 20 ICs are given in Fig . 3.3.) The characteristics of p(e,r) can be analyzed in a similar fashion. For brevity, we leave this task to the reader as an exercise. For a better understanding of this p(e,r), we provide threedimensional visualization in Fig. 5.21, where k1 = 1, k2 = 1/8, k3 = 1/2, and k4 = I, as well as in Fig . 5.22, where k1 = 1, k2 = 1/8, k3 = 1/4, and k4 = 1/2. In both figures , L = 1.
156
Chapter 5 • TS Fuzzy Controllers with Linear Rule Consequent TABLE 5.7 The Explicit Expressions of fJ(e,r) Derived for the 12 Ies That Divide Up the e(n) - r(n) Plane Shown in Fig. 3.3." ICNo.
fJ(e,r) A[B - (k 3
+ k4)e(n) + (1 -
kz)r(n)]
2L - e(n) A[B
2
+ (I
- k3 )e(n) - (kz + k4 )r(n)] 2L - r(n)
+ (1 + kz)e(n) + (k3 - k4 )r(n)] 2L + e(n) A[B + (kz - k4)e(n) + (1 + k3)r(n)] 2L + r(n) A[(I + kz)L + (1 - kz)r(n)] A[B
3 4
5
6
~
A[(I + k3)L + (1 - k3 )e(n)]
7 8
k 1k3
9
A[(k3
+ k4)L + (k3 -
A[(k2
+ k4)L + (kz -
10
k4)r(n)]
k 1k4
11 12 Note: A =
ik
k4)e(n)]
k1kz
and B = (1 + kz + k3 + k4)L
"This TS fuzzy PI Controller Uses the Zadeh Fuzzy Logic AND Operator.
1~~
0 .75
~(e,r) O~ 2~
o
-2
e(n)
Figure 5.21 Three-dimensional plot of fJ(e,r) when k1 = 1, kz = 1/8, k3 = 1/2. k4 = 1, and L 1. The gain surface is symmetric in terms of the line e(n) r(n) .
=
=
157
Section 5.8. • Fuzzy PID Controller with Simplified Linear TS Rule Scheme
1~~~~~11~
0. 75
~(e,r) O~ 2~ o -2
Figure 5.22 Three-dimensional plot of fl(e,r) when k] = I, k2 and L = I. The gain surface is asymmetric.
e(n)
= 1/8, k3 = 1/4, k4 = 1/2,
5.8. FUZZY PID CONTROLLER WITH SIMPLIFIED LINEAR TS RULE SCHEME 5.8.1. Configuration and Explicit Structure Derivation When the fuzzy PI controller using product fuzzy logic AND operator in Section 5.7 employs den) as an additional input variable, it becomes a fuzzy Pill controller. The following eight simplified linear rules are needed in the study of a fuzzy Pill controller: IF e(n) is Positive AND r(n) is Positive AND den) is Positive THEN !J.U(n) = k1(ale(n)
+ a2r(n) + a3d(n))
IF e(n) is Positive AND r(n) is Positive AND den) is Negative THEN !J.U(n) = k2(ale(n)
+ a2r(n) + a3d(n))
IF e(n) is Positive AND r(n) is Negative AND den) is Positive THEN !J.U(n) = k3(al e(n) + a2r(n)
+ a3d(n))
IF e(n) is Positive AND r(n) is Negative AND den) is Negative THEN !J.U(n)
= k4(ale(n) + a2r(n) + a3d(n))
IF e(n) is Negative AND r(n) is Positive AND den) is Positive THEN !J.U(n) = kS(ale(n)
+ a2r(n) + a3d(n))
IF e(n) is Negative AND r(n) is Positive AND den) is Negative THEN !J.U(n)
= k6(ale(n) + a2r(n) + a3d(n))
IF e(n) is Negative AND r(n) is Negative AND den) is Positive THEN !J.U(n)
= k7(ale(n) + a2r(n) + a3d(n))
IF e(n) is Negative AND r(n) is Negative AND den) is Negative THEN !J.U(n)
= kg(ale(n) + a2r(n) + a3d(n)).
158
Chapter 5 • TS Fuzzy Controllers with Linear Rule Consequent
The result is a nonlinear PID controller
J1U(n) = p(e,r,d)(ate(n) + a2r(n)
+ a3d(n»
with variable proportional-gain, integral-gain, and derivative-gain denoted, respectively, as p(e,r,d)·a2' p(e,r,d)·al' and p(e,r,d)·a3. Specifically,
p(e,r,d)
= k t J1,p(e)J1,p(r)J1,p(d) + ~J1,p(e)J1,p(r)J1,i/(d) + k3J1,p(e)J1,Fl(r)/lp(d) + k4 J1,p(e)J1,Fl(r)J1,i/ (d) +~~~~W~OO+~~~~W~OO
+ k7J1,Fl(e)J1,Fl(r)J1,p(d) + k gJ1,Fl(e)J1,Fl(r)J1,i/ (d) . In the cube [-L,L] x [-L,L] x [-L,L], which is of most nonlinearity and importance,
p(e,r,cl) =
8;'3 (c
3 + c2e(n)L2 + c3r(n)L2 + C4 d (n)L 2 + cse(n)r(n)L
1L
+ c6e(n)d(n)L + c7r(n)d(n)L + cge(n)r(n)d(n» where
+ k3 + k4 + ks + k6 + k7 + kg, C2 + k3 + k4 - ks - k6 - k7 - kg, C3 = 1 + ~ - k3 - k4 + ks + k6 - k7 - kg, C4 = 1 - ~ + k3 - k4 + ks - k6 + k7 - kg, Cs = 1 + ~ - k3 - k4 - ks - k6 + k7 + kg, C6 = 1 - ~ + k3 - k4 - ks + k6 - k7 + kg, C7 = 1 - k2 - k3 + k4 + ks - k6 - k7 + kg, Cg = 1 - k2 - k3 + k4 - ks + k6 + k7 - kg. Ct
= 1 + k2 = 1+~
For the regions outside the cube [-L,L] x [-L,L] x [-L,L], p(e,r, d) can also be found. The derivation is not difficult owing to use of the product fuzzy logic AND operator. (If the Zadeh fuzzy logic AND operator were used, derivation would be more difficult.) p(e,r, d) is four-dimensional and hence direct graphical illustration is impossible. The fuzzy PID controller has one more input variable (i.e., d(n» and five more parameters than the fuzzy PI and PD controllers (i.e., a3 and ks to kg). Hence, it is harder to analyze because of the higher dimensionality. In theory, its control performance should be enhanced by the additional degrees of freedom introduced by the extra parameters. Such enhancement, however, is at the expense of difficult parameter tuning and complicated controller structure. One remedy is to let some parameters be zero, as we did above for the fuzzy PI and PD controllers.
5.8.2. Simulated Control of Mean Arterial Pressure Useful and interesting nonlinear gain variation characteristics can still be generated to produce a superior TS fuzzy Pill controller, even when the majority of '9 are zero. As an example, we now use the fuzzy Pill controller in the last section to realize the biased control strategies for mean arterial pressure control. The patient model is given in (8.1). After experimenting with some parameter values, we found the following values to be adequate: k1 = 1, ~ = 0.5, k3 = k4 = ks = k6 = 0, Iv, = 0.1, kg = 0.85, L = 40, at = -0.024, a2 = -1.6, and a3 = -25. There are seven nonzero parameters, excluding k i . The sampling period is still 10 seconds. Figure 5.23 shows a simulated control performance comparison between the fuzzy Pill controller and the corresponding linear
Fuzzy Pill Controller with Simplified Linear TS Rule Scheme
Section 5.8. •
159
150 I--------.----------,--~===~=:=:::;l fuzzy PI control -_. tinear PI control ........ setpolnl
,, ~
130
,, , ,, ,, I
,,
I
,,
,, ,
~ 120
£
i
\
110
[i
Gl
~ 100
\
\
" ...........
...........
,.. . ,... .,.,.. . ,.,',.,.. . ."., ',." . . ..,.= . .... . . . . . .
~,~I.., IM
~
90
80 '--
o
-'-
---'1000
500
-----1
1500
lime (second)
(a)
Figure 5.23 Comparisons of simulated control performance between the fuzzy PID controller with the simplified linear TS rules and the corresponding linear PID controller that uses the steady-state gains of the fuzzy controller (i.e., P(O. 0, 0) . a., i = I, 2, 3). The patient model is given in (8.1). The parameter values are: k t = I, k2 = 0.5, k3 = k4 = ks = k6 = 0, k7 = 0.1, kg = 0.85, L = 40, at = -0.024, a 2 = -1 .6, and a 3 = -25. The sampling period is 10 seconds. Once set, all the parameters are fixed for both controllers in all the comparisons: (a) the typical patients (K = - 0.72).
Pill controller that uses the steady-state gains of the fuzzy controller (i.e., {3(0,0, 0) . ai' i = 1, 2, 3). The typical (K = -0.72), insensitive (K = -0.18), and oversensitive (K = -2.88) patient cases are included in the comparison. Once set, all the parameters are fixed for both controllers in all the comparisons. For the typical and insensitive patients, according to Fig. 5.23, the rise-time of fuzzy and conventional Pill control systems is about the same, although the response of the fuzzy control system is slightly slower during the initial time period (i.e., 0 to 300 seconds for the typical patients and 0 to 600 seconds for the insensitive patients). In either case, no mean arterial pressure (MAP) overshoot exists. For the oversensitive patients, however, the fuzzy control system performs much better with little overshoot and much more stable MAP response as compared with 15 mm Hg overshoot and oscillatory MAP performance of the Pill control system. The settling time of the Pill control system is also significantly longer. The superiority of the fuzzy controller is especially convincing because it results in a smaller overshoot and a smaller rise-time at the same time. According to linear control theory, simultaneously achieving these two performance objectives is contradictory, and one can only achieve one objective at the expense of the other. The fuzzy Pill control system can do both because it is nonlinear and time-varying.
160
Chapter 5 • 150 i
TS Fuzzy Controllers with Linear Rule Consequent
- - - - - - - ..-- - - - - - - --,-- -;:= =;:= :;== :=:::;""] fulzy PI control _ •• linear PI control "," ," setpoinl
140
~
130
g ~ 120
£ iii
'ij 110
~
c:
I'll
~ 100 90
80 ' - - - - - - - - - - - - ' - - - - - - - - - - - - ' - - - - - - - - - - - '
o
1000
500
1500
l1me (second) (b)
Figure 5.23 Comparisons of simulated control performance between the fuzzy PID controller with the simplified linear TS rules and the corresponding linear PID controller that uses the steady-state gains of the fuzzy controller (i.e., P(O, 0, 0) · Q/, i 1,2,3). The patient model is given in (8.1). The parameter values are: kl = 1, ~ = 0.5, k3 = k4 = ks = k6 = 0, k7 = 0.1, ks = 0.85, L = 40,01 = -0.024, Q2 = - 1.6, and Q3 = -25. The sampling period is 10 seconds. Once set, all the parameters are fixed for both controllers in all the comparisons: (b) the insensitive patients (K = -0.18),
=
To be fair, one needs to keep in mind that the performance gain by the fuzzy controller is at the expense of more parameters, nine more to be exact, even after the simplified linear rule scheme is used.
5.9. COMPARING TS FUZZY CONTROL WITH MAMDANI FUZZY CONTROL Having derived and analyzed the analytical structures of various Mamdani and TS fuzzy controllers, we now compare and summarize their major differences, advantages, and disadvantages.
5.9.1. Major Features of Mamdani Fuzzy Control A Mamdani fuzzy controller uses fuzzy sets as rule consequent. Hence, fuzzy rules are more intuitive and can more easily be extracted from expert knowledge and experience. For this type of fuzzy controller, many different types of fuzzy inference methods are available to
Section 5.9. • Comparing TS Fuzzy Control with Mamdani Fuzzy Control
161
150 i-------....,...-----------r----;:=====::::;-, fuzzy PI control -_. linear PI control ..... ... setpoint 140
¥
130
I
~ 120
•, •
i
ii
'i
I
,
I I
110
I
:
~ e
"
I
III
I
~ 100
I
I
I
I II
I I•
.... ~
~: ,
I
\ : ,'I'
90
80 '--
o
1 ......
~, ..~.. ...".~r-~-..."C:'
.
" \\ I I
-----------------l
-'-
--1.
500
1000 Time (second)
----J
1500
(c)
Figure 5.23 Comparisons of simulated control performance between the fuzzy PID controller with the simplified linear TS rules and the corresponding linear PID controller that uses the steady-state gains of the fuzzy controller (i.e., P(O, 0, 0) · OJ, i = 1,2 ,3). The patient model is given in (8.1). The parameter values are: k( = I, ~ = 0.5, k3 = k4 = ks = k6 = 0, 10 = 0.1, kg = 0.85, L =40,0( = -0.024'02 = -I.6, and 03 = -25. Thesarnplingperiodis 10 seconds. Once set, all the parameters are fixed for both controllers in all the comparisons: (c) the oversensitivepatients (K = -2.88).
be adopted. The TS fuzzy rule scheme, on the other hand, possesses little linguistic meaning and hence is not intuitive. Utilization of expert knowledge and experience in the rule design process is also difficult. Unlike Mamdani fuzzy controllers, a TS fuzzy controller does not use fuzzy inference in a strict sense. A Mamdani fuzzy rule consequent is a fuzzy set, of either the singleton or regular type . For the majority of applications, using singleton fuzzy sets is sufficient. The Mamdani rule scheme is not only economic but also more tunable because the rule consequent has clear meaning and intuitively relates to system control performance. The TS rule scheme not only lacks intuition but also involves many design parameters in the rule consequent. These parameters are troublesome to determine and tune, owing to the lack oflinguistic and intuitive meaning of the parameters as well as their disconnections to system control performance. For fuzzy controllers of both types, the number of design parameters rises quickly with the increase of the number of input and output variables. However, the situation worsens much faster for TS fuzzy controllers owing to its rule structure. Combining these factors , building a Mamdani fuzzy controller is most likely to be easier.
162
Chapter 5 • TS Fuzzy Controllers with Linear Rule Consequent
5.9.2. Primary Characteristics of T5 Fuzzy Control Most TS fuzzy controllers use linear rule consequent. Their analytical structures are always nonlinear controllers of PID type with variable gains. In contrast, Mamdani fuzzy controllers can be configured to form many different types of nonlinear controllers, including the PID type. The general analytical structure is the sum of a global nonlinear controller, whose structure is fuzzy rule-dependent, and a local nonlinear controller. Mamdani fuzzy control is able to generate more diverse nonlinear controllers than TS fuzzy control. TS fuzzy control can generate more than the Pill type of nonlinear controllers if nonlinear rule consequent are used. Properly determining the nonlinear functions is a major obstacle and a technically challenging issue. This issue is even more complicated, if one also considers how to determine the parameters in the nonlinear functions. Compared with the Mamdani fuzzy PID control, the gain variation characteristics produced by the TS fuzzy PID control are more diverse. The characteristics, governed and parametrized by the parameters in the rule consequent, are flexible in design to meet desired shape and specifications. As a result, TS fuzzy PID control is capable of offering more, and possibly better, solutions to a wider variety of nonlinear control problems. Variable gains of the TS fuzzy controllers mayor may not be derivable in an analytic form. For the TS fuzzy controllers in this chapter, the gains have been explicitly derived. There exist many other configurations whose gains cannot be expressed analytically. They are, however, always available in a numeric form, regardless of configuration complexity. This is because the gains are characterized by (5.4), which is readily computable. One can always use the formula to generate the data and then plot the variable gains and investigate the gain variation characteristics numerically. For example, one can make three-dimensional graphics of the gain surface without analytical expressions for TS fuzzy PI or PD controllers. If more than two input variables are involved, one may vary their values and study how the gains change. In comparison, although variable gains of a Mamdani fuzzy controller of PID type also mayor may not be analytically derivable, in most cases they cannot be calculated in a numeric form. This is because a Mamdani fuzzy controller is generally not readily expressed as a linear combination of input variables multiplied by the nonlinear gains. As a result, if the analytical expressions are not obtainable for a Mamdani fuzzy controller, its gain variation characteristics usually cannot be studied even numerically.
5.9.3. Comparison Conclusions In summary, each type of fuzzy controller has its advantages and disadvantages, and no one type is absolutely better or worse than the other. Which type to use depends on the application, experience of the controller designer, and his/her personal preference. It also depends on the amount of knowledge and data available about the system to be controlled. Fuzzy controllers are merely nonlinear and time-varying controllers. As such, they are also partially subject to the same disadvantages and constraints as their traditional counterparts. Since a general nonlinear system theory does not exist, designing a classic nonlinear controller is often more an art than a science, which is certainly true of fuzzy controllers as well. In conventional control, human judgment is always required even for linear controller design: Selecting controller structure (e.g., Pill control, robust control, or optimal control) and controller order. Fuzzy control, however, requires more selections because more components are present. As always, a certain amount of trial-and-error effort is unavoidable for either type of fuzzy controllers. Between the two, TS fuzzy control almost certainly requires more.
163
Exercises
5.10. SUMMARY The general TS fuzzy controllers are inherently nonlinear controllers of PID type, with variable gains changing with state of input variables. The gain variation characteristics, peculiar and beneficial for improving control performance, empower the fuzzy controllers to outperform linear (Pill) controllers. We have investigated in depth two TS fuzzy PI/PD controllers, one simple and one typical. They are also used to control tissue temperature in hyperthermia based on computer simulation. A simplified TS fuzzy rule scheme is developed to dramatically reduce the prohibitively large number of design parameters in the original TS fuzzy rule scheme. The new scheme is a special case of the original one. Fuzzy PID controllers with simplified linear rule scheme are examined in detail. One of them is used to control the mean arterial pressure model. It convincingly outperforms a linear PID controller. The tradeoff, however, is the selection and tuning of a few more design parameters. Finally, Mamdani fuzzy control is compared with TS fuzzy control in terms of their differences, merits, and shortcomings. 5.11. NOTES AND REFERENCES That a TS fuzzy controller is a nonlinear controller of Pill type with variable gains was first rigorously established in [269][270] and then generalized in [265], which is the content of Section 5.3. Structure of the simple TS fuzzy PI/PD controllers was derived and used for the temperature control application (i.e., Section 5.4) in [54]. The materials in Section 5.5 can be found in [56]. The simplified TS fuzzy rule scheme in Section 5.6 was introduced in [269] [270]. The fuzzy PI and PD controllers using the simplified linear rule scheme (i.e., Section 5.7) were developed in [269][270]. Finally, the results in Section 5.8 are given in [274]. EXERCISES 1. Is a fuzzy controller using linear TS rule consequent always a linear fuzzy controller? 2. In theory, a nonlinear TS rule consequent is more powerful than a linear one. Why is it not widely used then? What are the practical difficulties of using it?
3. Can a TS fuzzy controller realize linear or nonlinear control of the non-Pill type? Ifno, why? 4. Under what conditions does a TS fuzzy controller become a linear Pill controller? 5. Both the Mamdani fuzzy controllers and the TS fuzzy controllers inherently introduce gain variation. Generate various gain variation characteristics three-dimensionally and compare them. Can one say that one type of gain variation is better than other types? Give your rationale for your answer. 6. In comparison with the original (linear) TS rule scheme, what are the advantages and tradeoff of the simplified (linear) TS rule scheme? 7. Following the example in Section 5.7.3, design the gain variation of characteristics that interest you. 8. Derive the analytical structure of the fuzzy PI/PD controllers in Section 5.7.4. 9. Use the fuzzy Pill controller in Section 5.8 to control various system models to explore its performance gain over the corresponding linear Pill controller. Do you feel the parameter tuning is overwhelming for the fuzzy controller? 10. Compare Mamdani fuzzy control with TS fuzzy control. Which type do you prefer to use?
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
6.1. INTRODUCTION Stability is always a fundamental issue in the analysis and design of control systems, be it linear, nonlinear, or fuzzy. The preceding three chapters have clearly shown the Mamdani and TS fuzzy controllers to be nothing but nonlinear, time-varying controllers. Unlike common types of nonlinear, time-varying controllers, the fuzzy controllers are unique owing mainly to their peculiar gain variation characteristics. In theory, all the well-developed stability tools in classical control theory are applicable to fuzzy control systems, but the tasks are technically more challenging. In this chapter, we will study local stability as well as the bounded-input bounded-output (BmO) stability of the fuzzy control systems. Design is another fundamental issue in any control technology. Traditionally, fuzzy controllers are empirically constructed case by case instead of being systematically designed, using the time-consuming trial-and-error method, which often fails, especially for complex systems. In critical applications such as those in biomedicine, aerospace, and nuclear engineering, little trial-and-error effort can be tolerated. Hence, a theoretically sound and practically usable design theory is needed to reduce the cost and time associated with development of the fuzzy control system. Based on explicit structural knowledge, we now show how to design Mamdani and TS fuzzy control systems. In the last few sections, we will prove the general TS fuzzy systems to be nonlinear ARX (Auto-Regressive with the eXtra input) systems or nonlinear IIR/FIR filters, depending on system configuration. We will utilize the feedback linearization technique to design stable controllers capable of controlling the general TS fuzzy systems in achieving the perfect tracking of any desired output trajectory.
165
166
Chapter 6 •
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
6.2. GLOBAL STABILITY, LOCAL STABILITY, AND BIBO STABILITY First, we briefly review the major concepts of system stability. Stability is an inherent property of a dynamic system. Whether or not a system is stable depends only on its structure and is independent of its input signal. Different definitions exist for characterizing different aspects of system stability behavior. They include global (asymptotic), local, BmO, asymptotic, and exponential stability. Global stability and local stability describe, respectively, the global and local behavior of a system with respect to its equilibrium point/points. A system is said to be globally asymptotically stable if it is asymptotically stable for any initial states, no matter how far the initial state is from the equilibrium point. In other words, the system is stable in the whole state space. In contrast, local stability guarantees system stability only in a region around the equilibrium point, called basin. If the initial state is in the basin, the system will be stable; otherwise it will not be. For linear systems, local stability implies global stability and vice versa. This, however, is not true for nonlinear systems for which local stability does not necessarily mean global stability; indeed, in most cases, this does not hold. BIBO stability simply means that the system output should not become infinitely large as long as the magnitude of the system input is limited. As such, Bmo stability is a weaker definition than asymptotic stability that guarantees the system output convergence with time, provided that the input is not infinitely large. By definition, if the output of a system is oscillating and the oscillation magnitude is huge but not infinite, the system is still Bmo stable. This system is neither asymptotically stable nor globally or locally stable.
6.2.1. Why Study Local Stability Instead of Global Stability This book focuses more on the local stability of fuzzy control systems than on their global stability. The motivation and justification are as follows. In our opinion, the two types of stability are equally important; one cannot replace the other, for each type has its distinctive merits and drawbacks. A global stability condition determines system stability in the whole state space. For nonlinear systems, global stability conditions are, in most cases, sufficient conditions; necessary ones are uncommon. Except for linear systems, a global stability condition is rarely a necessary and sufficient condition. The most widely used and effective methodology for global stability determination was developed by A.M. Lyapunov, which requires a Lyapunov function to be constructed for the control system involved. For any specific system, more than one Lyapunov function exists. Regardless of the methodologies, the foremost assumption for establishing a global stability condition, sufficient or necessary, is the availability of the analytical expressions of both the controller and the system. This assumption is critical: Global stability analysis is impossible without it. This assumption is rather unrealistic and impractical not only to specific fuzzy controllers, but also to the fuzzy control paradigm as a whole. First of all, the explicit structures of many fuzzy controllers are not analytically derivable. A fuzzy controller is made up of several interrelated nonlinear components (e.g., input and output fuzzy sets, fuzzy rules, fuzzy logic AND and OR operators, fuzzy inference, and a defuzzifier). The structures and parameters of these components are chosen by the controller designer at will and involve little restriction. As such, the structures of most fuzzy controllers are inherently complex and can virtually be any nonlinear form, making analytical derivation very challenging. Second, the mathematical model of the nonlinear system involved mayor may not be available. (It makes
Section 6.3. •
Local Stability of Mamdani and TS Fuzzy PID Control Systems
167
little sense to use a fuzzy controller to control a linear system.) A nonlinear system model may be developed by two approaches. The first approach analytically derives a model by using the natural laws governing the system. This approach often fails if the system is too complicated. The second approach is system identification using data describing the system's dynamic behavior, which is a black-box approach. Accurate nonlinear system identification is difficult because very often the modeler cannot even correctly assume the system's nonlinear structure to begin with. The second difficulty is true for any control methodologies, not fuzzy control alone. Even when this strict assumption is met, properly determining global stability for fuzzy control systems can still be difficult. Lyapunov functions are system-dependent, and their construction currently is more an art than a science. They often require skills and experience as well as trial-and-error effort. There does not exist a general method to automatically construct an appropriate Lyapunov function for any given nonlinear system. Because of the structural complexity and peculiarity of fuzzy controllers (that is, nonlinear and timevarying), Lyapunov function construction is challenging. At best, the global stability of fuzzy control systems may be judged on a case-by-case basis with no general solutions. Determining global stability for the general fuzzy control systems, Mamdani type or TS type, is certainly out of question at present. Given these difficulties associated with global stability determination, one would be better off by concentrating on local stability. It should be emphasized that local stability does not mean system stability at the equilibrium point only. Rather, it means system stability in a region around the equilibrium point. Local stability can be determined without much information and assumption on the fuzzy controller and system. As we will show, only two pieces of information are needed: (1) the fuzzy controller structure around the equilibrium point and (2) the linearizability of the system at the equilibrium point. Both are obtainable in many cases, even for the general Mamdani and TS fuzzy controllers. These simple requirements also make the local stability results for fuzzy control systems practically usable.
6.3. LOCAL STABILITY OF MAMDANI AND TS FUZZY PID CONTROL SYSTEMS
6.3.1. Local Stability Determined by Lyapunov's Linearization Method Most physical systems are nonlinear, and nonlinear control can achieve better control performance than linear control. However, designing a linear control system is significantly easier than developing a nonlinear control system. Lyapunov's linearization method (e.g., [191]) provides a theoretical justification for using a linear controller to control a nonlinear system. The basis of the method is the continuity of a nonlinear control system: The method assumes the nonlinear control system to be continuously differentiable at the equilibrium point. In essence, Lyapunov's linearization method states that if the linearized control system is strictly stable (or unstable), then the equilibrium point is locally stable (or unstable) for the nonlinear control system. If the linearized control system is marginally stable, then the local stability of the nonlinear control system cannot be determined by the linearized system. When this is the case, the higher-order terms of the nonlinear system in the Taylor expansion need to be examined to judge local stability. In this book, we will not address the marginal stability of a fuzzy control system because it depends on the structures of the fuzzy controller and
168
Chapter 6 •
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
system. In other words, it is system-dependent and hence lacks the generality and significance for fuzzy control systems at large. Nevertheless, such an analysis could be conducted using structures of the fuzzy controllers. In Chapters 3 and 5, various Mamdani and TS fuzzy PID controllers (PI and PD controllers are special cases) were proved to be nonlinear PID controllers with variable gains. At an equilibrium point, the variable gains become constant gains (i.e., static gains), and the fuzzy controllers become linear Pill controllers, called corresponding linear PID controllers. On the basis of Lyapunov's linearization method, it immediately follows that if a fuzzy Pill control system is continuously differentiable and its corresponding linear PID control system is strictly stable (or unstable) at the equilibrium point, the fuzzy control system is locally stable (or unstable). Hence, we have the following result. Theorem 6.1. Assume that a Mamdani or TS fuzzy Pill controller is used to control a nonlinear system and both the controller and the system are continuously differentiable at an equilibrium point. The fuzzy control system is locally stable (or unstable) if and only if the corresponding linear PID control system is strictly stable (or unstable). Using this theorem offers at least three practically important advantages. First, it is a necessary and sufficient condition. Unlike the sufficient or necessary global stability conditions in the literature, this condition is not conservative and is the tightest possible stability condition. Second, only analytical structure of the fuzzy controller around the equilibrium point is required. Availability of the complete analytical structure is unnecessary. Third, the criterion can be used to determine local stability, not only when the system model is explicitly available, but also when the model is unavailable but is known to be linearizable about the equilibrium point. (Most physical systems are linearizable.) In the latter case, one can devise a linear PID controller and use it to control the nonlinear system. If the resulting control system is observed to be locally stable (unstable), then the same system controlled by a linearizable fuzzy PID controller whose static gains equal the gains of the linear Pill controller will be locally stable (unstable). This approach is important because, in practice, physical systems are often too complex and costly to be precisely modeled. Since any model is merely an approximation to the physical system, it is rational to seek a method capable of determining system stability without the accurate model. These merits and advantages hold not only for the fuzzy Pill control systems but also for other types of fuzzy control systems that are much more general. (See Sections 6.4 and 6.5.) The geometry and size of a basin depend on the control system in question. It can be small or large; sometimes it may be large enough to cover the region of interest in the state space. It is usually difficult to exactly determine the geometry and size. In most cases, a computed basin is rather conservative. For practical applications, because local stability guaranteed by Theorem 6.1 provides a good starting point, it may not be too difficult for a fuzzy control system to be tuned manually using the trial-and-error method in achieving global stability. After all, many real-world Pill control systems are tuned manually to obtain satisfactory performance as well as global stability.
6.3.2. System Linearizability Criterion Theorem 6.1 is established under the following assumption: Both the controller and the system are continuously differentiable (that is, linearizable) about the equilibrium point, making the fuzzy control system linearizable about the equilibrium point. The linearizability
Section 6.4. • Local Stability of Mamdani Fuzzy Control Systems of Non-Pill Type
169
requires the system to be differentiable at least once with respect to all input variables and the resulting derivatives at the equilibrium point to be unique for every input variable. Thus, before utilizing the theorem to reach a stability conclusion, the validity of this assumption must be checked. One may check the linearizability of the fuzzy controller and the system separately. If both are linearizable, the fuzzy control system is linearizable; otherwise, the system is not linearizable. The linearizability of a fuzzy controller depends on its components and configuration. It is easy to verify that all the TS fuzzy Pill, PI, and PD controllers in Chapter 5 are linearizable except the one that uses the Zadeh fuzzy AND operator. However, none of the nonlinear Mamdani fuzzy PI and PD controllers in Chapter 3 is linearizable about (0,0). Take the Mamdani fuzzy PI controller described in Table 3.3 as an example:
8~u(n)1 8e(n)
(0,0)
8~U(n) I 8r(n)
=KAu·Ke·H, 4L
for ICI and IC3
= K Au ·Kr .H,
for IC2 and IC4.
4L
(0,0)
Therefore,
8~U(n) I 8e(n)
(0,0)
=J aAU(n) I 8r(n)
(0,0)'
which means this fuzzy controller is not linearizable at (0,0). The cause is the use of the Zadeh fuzzy AND operator that leads to two different control algorithms in IC 1 to IC4 around (0,0). In general, caution should be exercised in validating the linearizability test for a fuzzy controller that uses the Zadeh fuzzy AND operator in its rules. Whenever this is the case, input space around the equilibrium point must be divided into several ICs, resulting in one control algorithm per IC. The algorithms may be different in different ICs. This can yield more than one derivative result at the equilibrium point, failing the linearizability test. At this point, it is still mathematically unclear whether using the Zadeh fuzzy AND operator always causes a fuzzy controller to fail the test. Control algorithms in different regions depend not only on the AND operator but also on other components of the controller. Many different situations need to be examined before a solid conclusion can be made in this regard. Our conjunction is that the test fails whenever the Zadeh fuzzy AND operator is employed. The test will not fail for Mamdani and TS controllers of PID type if they use other fuzzy AND operators. Thus, Theorem 6.1 is general and widely applicable. If a fuzzy control system is not linearizable about the equilibrium point, the theorem should not be used to derive stability information. This, however, does not imply system instability. It simply means that the system fails to satisfy the assumption required by the theorem, making it inapplicable to the particular case. Whenever this happens, one needs to use other stability analysis methods. As an alternative, we will develop Bmo stability conditions for those Mamdani and TS fuzzy PID controllers that fail the linearizability test.
6.4. LOCAL STABILITY OF MAMDANI FUZZY CONTROL SYSTEMS OF NON·PID TYPE We now develop local stability conditions for fuzzy control systems involving the Mamdani fuzzy controllers of non-Pill type that use linear or nonlinear fuzzy rules. We directly extend Theorem 6.1 to cover these fuzzy control systems.
170
Chapter 6 •
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
Theorem 6.2. Assume that a typical Mamdani fuzzy controller with linear fuzzy rules is used to control a nonlinear system and suppose that the fuzzy controller and the system are continuously differentiable at the equilibrium point. The fuzzy control system is locally stable (or unstable) if and only if the corresponding linear control system is strictly stable (or unstable). This conclusion also holds for the typical Mamdani fuzzy controller with nonlinear fuzzy rules. There are many different fuzzy controllers with linear or nonlinear rules, and the theorem is in principle applicable to all of them. Like Theorem 6.1, however, one should first check the linearizability of the fuzzy control system in question before drawing any stability conclusion. For the particular configurations of the fuzzy controllers with linear rules in Chapter 4, they are not linearizable at (0,0). Again, the reason is the use of the Zadeh AND operator. Nevertheless, if the product fuzzy AND operator is used and the rest of the controllers' components remain the same, the controllers will be linearizabale.
6.5. LOCAL STABILITY OF GENERAL TS FUZZY CONTROL SYSTEMS 6.5.1. Theoretical Development The local stability results on the Mamdani fuzzy controllers can be extended to TS fuzzy controllers. According to Theorem 5.1, the general TS fuzzy controllers are nonlinear controllers of Pill type, with variable gains changing with state of input variables: (6.1) where o
_
L Jlj(x,A) . aij -
bi(x,A) =
j=l
-0----
for i = 0, ... , M.
(6.2)
LJlj(x,A)
j=l
Without loss of generality, assume that the system to be controlled, designated as P(x), is linearizable about the equilibrium point. Then, according to Lyapunov's linearization method, the TS fuzzy control system consisting of P(x) controlled by a TS fuzzy controller of the general class is locally stable around the equilibrium point x = if and only if the control system consisting of P(x) and the linear constant-gain controller
°
(6.3) is strictly stable around x = O. Here, bi(O) caI! be calculated using (6.2) because aij and ~ are known for any given fuzzy controller; Jlj(x,A) and Q are readily computable based on the input fuzzy sets, fuzzy rules, and fuzzy logic AND operator. We state this necessary and sufficient stability condition as follows. Theorem 6.3. Assume that a TS fuzzy controller of the general class and a system to be controlled are linearizable about the equilibrium point. The fuzzy control system is locally stable (or unstable) if and only if the linearized fuzzy control system is strictly stable (or unstable) about the equilibrium point.
Section 6.5. • Local Stability of General TS Fuzzy Control Systems
171
The linearizability of a TS fuzzy controller depends on its configuration. When widely used components (e.g., triangular, trapezoidal, or Gaussian membership functions for input fuzzy sets, product fuzzy logic AND operator, centroid defuzzifier) are used, the controller is likely linearizable about the equilibrium point. In some circumstances, one can even determine the linearizability of a fuzzy controller without its explicit structure. For example, if, by some means, we know the structure of a fuzzy controller to be a polynomial function around the equilibrium point, then we know the controller to be linearizable even without explicit knowledge about the polynomial function (e.g., the degree of the polynomial and its coefficients). If such qualitative knowledge is not available, then analytical expression of the controller structure around the equilibrium point is necessary for the linearizability test. We emphasize that analytical expression of the controller structure for the whole input space is not needed. The theorem can be used even when the system model, P(x), is unavailable but is known to be linearizable about the equilibrium point. One can construct a TS fuzzy controller of the general class that is linearizable about the equilibrium point and computes bi(O) using (6.2). One can then devise a linear controller whose input variables are the same as those of the TS fuzzy controller and whose gains are respectively bi(O). Now, one can use the linear controller to control the system. If the resulting control system is observed to be locally stable (unstable), the fuzzy control system is locally stable (unstable) too. Using Theorems 6.1, 6.2, and 6.3 only requires minimal information on the fuzzy controller and the system. Moreover, they cover very broad classes ofMamdani and TS fuzzy control systems. None of these merits would be possible for global stability analysis of the same fuzzy control systems.
6.5.2. Numeric Example Having developed the theory, let us see how to use it by a numeric example. The example uses a forced pendulum as P(x) whose motion is described by a second-order nonlinear differential equation [66]: ...
() + b(} + 0)2 sin () =
1': (t)
--!!!.-
ml2
(6.4)
where () is the angle between a rigid rod holding the pendulum and a vertical line, b is the coefficient of viscous friction, m is the mass of the pendulum, I is the length of the rod, 0)2 = gil, and Tin(t) is input torque applied to the rod. After being linearized about the equilibrium point () = 0, system (6.4) becomes
(j + bO + olo
= Tin~) . ml
(6.5)
We use mP = 1, b = 0.25, and 0)2 = 100. To discretize the continuous-time system, a sampling period of 0.01 seconds (i.e., T = 0.01 seconds) is adopted.
172
Chapter 6 •
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
EXAMPLE 6.1 Suppose that one wants to use a nonlinear TS fuzzy controller of the general class to control the forced pendulum. Assume that the designed controller has two input variables: e(n) = S(n) - O(n)
and r(n) = e(n) - e(n - 1) T
where S(n) is the setpointjreference signal. The chosen membership functions for e(n) and r(n) are shown in Fig. 6.1, where ell = -1, el2 = -0.7, el3 = 0.4, el4 = 0.8, PI = -1.1, P2 = -0.6, P3 = 1.7, and P4 = 2.1. There are four fuzzy rules covering the input space around the equilibrium point. (Note that the complete rulebase contains more than four rules, but we do not need to know the rest of them.)
= all e(n) + a21 r(n) IF e(n) is Al AND r(n) is B2 THEN U(n) = aI2e(n) + a22r(n) IF e(n) is A2 AND r(n) is BI THEN U(n) = a13 e(n) + a23r(n) IF e(n) is Al AND r(n) is BI THEN U(n)
IF e(n) is A2 AND r(n) is B2 THEN U(n) = aI4e(n) + a24r(n)
where all = 20, a21 = 1, a12 = 24, a22 = -18, a13 = 7, a23 = 2, al4 = 13, and a24 = 6. The product fuzzy logic AND operator is used in the rules, and the centroid defuzzifier is employed. One wants to know whether this TS fuzzy control system is locally stable around the equilibrium point.
Solution The nonlinear system is obviously linearizable, as we are using the linearized system. One needs to determine the linearizability of the fuzzy controller. The fuzzy controller is described by
U(n) = Kp(e,r)e(n)
+ K;(e, r)r(n) ,
(6.6)
Membership
e(n)
Membership
r(n)
o Figure 6.1 Membership functions used by the TS fuzzy controller in Example 6.1.
Section 6.6. •
173
BillO Stability of Mamdani Fuzzy PI/PD Control Systems
= 4 (only the four rules
which is a nonlinear PD controller with variable gains. Using (6.2) and noting Q are of interest and relevant), K (e,r) =
/JA (e)/JiJ (r)all 1
P
1
+ /JA (e)/JiJ (r)a12 + /JA (e)/JiJ (r)a13 + /JA (e)/JiJ (r)a14 + /JA (e)/JiJ (r) 1
2
2
1
/JA 1 (e)/JiJ l (r) + /JA 1 (e)/JiJ 2 (r) + /JA 2 (e)/JiJ l (r)
2
2
2
2
and
K.(e r) l
= /JA (e)/JiJ (r)a21 + /JA (e)/JiJ (r)a22 + /J'A- (e)/JiJ (r)a23 + /JA (e)/JiJ (r)a24 1
1
1
2
/JA 1 (e)/JiJ l (r) + /JA 1 (e)/JiJ2 (r)
,
+ JlA
2 2
1
2
2
(e)/JiJ l (r) + JlA 2 (e)/JiJ2 (r)
•
The membership functions relevant to local stability determination are just four segments of the straight lines covering the equilibrium point. The remaining part of the triangular /JAl(e) and /JiJ2 (r) and trapezoidal /JA 2 (e) and /JiJ t (r) is irrelevant. As a result, one can know, even without any computation, that the numerator and denominator of Kp(e,r) and Ki(e,r) are second-order polynomials in terms of e(n)r(n). Therefore, the result of the first-order derivative of U(n) with respect to e(n) or r(n) at the equilibrium point is unique. As pointed out earlier, in many cases, one can conclude a fuzzy controller to be linearizable about the equilibrium point even without seeing the actual mathematical formulation of the fuzzy controller. This example shows this point and also demonstrates the practicality of the local stability conditions.
We then compute:
JlA 1 (O)JliJ 1 (0) = 0.2182,
fJA 1 (O)JliJ2 (0) = 0.4321,
JlA 2 (O)JliJ 1 (0) = 0.1429,
fJA 2 (O)JliJ2 (0) = 0.2828.
Hence,
Kp(O,O) = 18.0405
and
Ki(O,O) = -6.4456.
The closed-loop transfer function of the fuzzy PD control system around the equilibrium point can easily be determined as follows:
O(z) -0.0549z + 0.0567 S(z) = z2 - 2.0412z + 1.0533 ' which has two poles 1.0206±0.1081i. Both poles are outside the unit circle; hence the designed fuzzy control system is locally unstable at the equilibrium point. Here, S(z) is the z-transform of S(n).
6.6. BIBO STABILITY OF MAMDANI FUZZY PI/PD CONTROL SYSTEMS 6.6.1. Small Gain Theorem The Mamdani fuzzy PI and PD controllers using the Zadeh fuzzy AND operator in fuzzy rules are not linearizable around the equilibrium point. Thus, Theorem 6.1 cannot be used to determine the local stability of these fuzzy control systems. Alternatively, in this section, we use the Small Gain Theorem to explore their Bmo stability. The Small Gain Theorem is an analytical method for determining the BffiO stability of general nonlinear control systems (e.g., [48][98]). Figure 6.2 shows a general nonlinear control system in a block diagram form, where C is a (nonlinear) controller, conventional or fuzzy, and
174
Chapter 6 •
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
U(n-l)
Sen) +
yen)
Figure 6.2 Block diagram of a general nonlinear control system for explaining the Small Gain Theorem and establishing BillO stability for the Mamdani fuzzy control systems.
easier to understand by specifically relating them to the fuzzy control systems. They are, however, still consistent with the conventions in the literature used for studying the Small Gain Theorem. We need to introduce 1/<1>1/ and IICII, which are the operator norms ofa given system and controller, respectively. The system norm is defined, as usual, by 1
sup
11<1>11 =
u,
Ul#U2,n~O
-
over a set of admissible control signals with any meaningful function norm. According to the definition, II
with respect to U(n), and hence the gain may change with U(n). For a linear time-invariant system, the gain is fixed and the norm is the gain. For other types of systems (e.g., nonlinear systems or timevarying systems), the magnitude of the gain depends on the operating point and is a variable. If <1> represents a nonlinear and/or time-varying system in the form of a nonlinear differential equation, and ((U) is its analytic solution, then 1I<1l11 = sup I('(U)I where the superior limit is u
over the range in which (( U) is defined. Generally speaking, because nonlinear differential equations cannot be easily solved analytically, determining the exact value of 1I<1l11 is usually difficult or even impossible. Often, an approximate value of 1I<1l11 is obtained through analytic or numerical estimation calculation. One of these numerical methods is the Maximum Modulus Theorem in complex analysis. Without loss of generality, we assume that 1I<1l11 < 00 in this book. The essence of the Small Gain Theorem is the following. For a fuzzy controller C assume that (6.7) and 1I<1l(U(n))1I
.s (;(211 U(n) II + P2'
(;(2'
P2 :::: o.
The fuzzy control system is Billa stable if (;(1 • (;(2
< 1.
For any system, the following is always true: 1I<1l(U(n))1I
This means
(;(2
.s
1I<1l11 . 1U(n)l.
= 1I<1l1l, and one only needs to determine
(;(1
for the stability judgment.
(6.8)
175
Section 6.6. • BIDO Stability of Mamdani Fuzzy PI/PD Control Systems
6.6.2. 8180 Stability Conditions We now investigate the BffiO stability of the fuzzy control systems involving the nonlinear Mamdani fuzzy PI controller in Section 3.6. Because the controller is made of 12 control algorithms, we need to establish BIBO stability for each of them. For ICI and IC3, in which Kele(n)1 ~ L, lIC(e(n»1I =
II
2(2LKJiu·H _K
ele(n)1)
(K e • e(n) + K,: r(n»
= II 2(2LKJiu _ K. H· le(n)1) (K e KJi ·H ::: --t:[(K
e
e •
II
e(n) + K,» e(n) - K,: e(n - 1»
I
+ K r) le(n)I + x.. eM]
_ K Jiu ·Kr·H· eM KJiu(Ke + Kr)H 1 ( ) 2L + 2L en I, where (6.9)
eM = suple(n - 1)1. n~1
Note that e(n - 1) can be in anyone of the 12 ICs. Every one ofthem has a stability condition that, once satisfied, guarantees BffiO stability in the IC involved. This is to say that e(n - 1) is bounded, and so is eM. We should point out that eM is not only bounded for finite n, but also when n ~ 00 due to the stability condition in every IC. This is important because if eM is bounded only for finite n, the system may not be stable. Using the Small Gain Theorem notations (6.7) and (6.8), we have
and
PI =
KJiu ·Kr·H· eM 2L
where PI is a nonnegative number. Based on the Small Gain Theorem, the fuzzy controller's parameters must satisfy the following inequality to ensure BffiO stability in ICI and IC3:
_ KJiu(Ke + Kr)H 2L
(1.,1' (1.,2 -
For IC2 and IC4, in which Krlr(n)1 lIC(e(n»1I
~
11<1>11
<
1 ·
L,
= 112(2LK~~;(n)1) (K e • e(n) + x.. r(n» II = I 2(2LKJiu·H _K I) (K e • e(n) + K; · e(n) rIr(n) KJi ·H .s --t:[(Ke + Kr)le(n)1 + «: eM] = KJiu . Kr . H . eM
2L
+
KJiu(Ke + Kr)H 1 ( )1 2L en .
K; · e(n - 1» II
176
Chapter 6 •
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
Since (Xl is the same as that for ICI and IC3, the stability condition for IC2 and IC4 is the same as that for ICI and IC3. For IC5 and IC7, lIC(e(n))1I
= IIKAu::'r oH r(n) ± KA;oHII Kau·H
s --2- +
Kau ·Kr·H 2L
eM +
Kau ·Kr ·H 1 ( )1 2L
en.
Therefore, (Xl • (X2
=
Ka·Kr ·H u
2L
11<1>/1 <
1,
for IC5 and IC7.
For IC6 and IC8, lIC(e(n))1I
= IIKAU~~e oH e(n) ± KA~oHII
Consequently, (Xl • (X2
=
Ka·Ke ·H u
2L
/1<1>/1 <
1,
for IC6 and IC8.
Finally, for the rest of the four ICs, IC9 to ICI2, /lC(e(n))/I is constant (0 or ±Kau . H). The Small Gain Theorem holds unconditionally because the coefficient of le(n) 1 can be regarded as 0 in all these four cases. Thus, (Xl = O. This leads to (Xl • (X2 = 0, which means that BillO stability always holds. By deriving a stability condition for each of the 12 ICs, we have established the conditions for BillO stability of the nonlinear Mamdani fuzzy PI controller controlling any nonlinear system. For any given fuzzy PI control system, these conditions must be checked one by one. Only when every one of them is met is the system stable in the BillO sense. It is more convenient to use one common condition applicable to all 12 ICs simultaneously. Clearly, the condition for ICI to IC4 is such a common condition. Hence, BillO stability for the Mamdani fuzzy PI control systems now becomes (6.10)
Theorem 6.4. A Mamdani fuzzy PI control system is BillO stable if the inequality (6.10) is satisfied for all 12 ICs. Following this principle, BIBO stability conditions for other types of Mamdani fuzzy control systems can also be established. The controllers include, but are not limited to, the fuzzy PD controller and the fuzzy controllers using linear fuzzy rules.
6.6.3. Numeric Example A numerical example can help demonstrate how to use this stability result.
177
Section 6.7. • BillO Stability ofTS Fuzzy PI/PD Control Systems
EXAMPLE 6.2 Given the hyperthermia temperature model (5.7) with the nominal parameter values T(s) 1.1 -45s e E(s) 250s + 1 and sampling period T = 1 seconds, design a BillO stable Mamdani fuzzy PI control system.
Solution We first need to convert the continuous-time model to a discrete-time model. The delay term e-45s can be represented by a fourth-order Pade approximation [124], resulting in the following discrete-time model: T(z) 0.0027z4 - 0.0121z3 + 0.0203z2 - 0.0152z + 0.0043 E(z) = z5 - 4.5619z4 + 8.3324z3 - 7.6173z 2 + 3.4855z - 0.6386' By using the Maximum Modulus Theorem, it is calculated that T(z)
I E(z)
I = I~~ IE(z) T(z) I = 0.008.
That is, 1I<1l11 = 0.008. We then design a BmO stable fuzzy PI control system. Suppose the following parameter values are chosen: L = 1, H = 4, K; = 0.1, K; = 1.4, and K Au = 5. Then,
K.1uCK;1"Kr )H 11<1>11 = 0.12
< 1,
which means the designed system is Bmo stable.
6.7. 81BO STABILITY OF TS FUZZY PI/PO CONTROL SYSTEMS 6.7.1. Theoretical Derivation We now extend the BIBO results to cover the simple TS fuzzy PI and PD control systems (e.g., Section 5.4). For rei, where 0 .s e(n) ~ L and /r(n)/ ~ L, /IC(e(n»/1 =
11(£ -
le(n)l)(a3
+ a4) + (L + r(n))al + (L -
+ (L - le(n)l)(b3 + b4) + (L + r(n))b l 2(2L - /e(n)/)
1
~ 2L /[L(a3
+ a4) + (L + r(n»al + (L -
+ [L(b 3 + b4) + (L + r(n»b 1 + (L -
= ~I [L ~ (a i + bi) + e(n)(al + [e(n - 1)(b l - b2) - L
::::
r(n))a2 e(n)
2(2L - /e(n)/)
~ bi -
2~ {[L ~ (ai + bi) + Llal + [eM1bl -b21
a2
a2
+ (L -
r(n))b2 r(n) II
r(n»a2]e(n) r(n»b2]r(n)/
+ bl
- b 2)]e(n)
e(n)(al - a2
+ bl -
+ bl -
b 2 1]e(n)
+L~bi+Llal -a2 +bl -b2
1]eM}
b 2)]e(n -
1)1
178
Chapter 6 •
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
where eM is defined in (6.9). In the above derivation, we have used the fact that all a, and b, are nonnegative. In terms of the Small Gain Theorem notations, we have 4
LL(ai+bi)+Llal-a2+bl-b21 i=1
2
2L and
Hence, the BIBO stability condition for ICI is
Because IC3 and IC 1 have the same structure and only AI' A 2 , and A 3 values are different, the following BIBO stability condition can easily be established for IC3:
For IC2, where 0
lIC(e(n»1I
= II(L + ~
.s r(n) ~ L and
Ir(n)l)(a2
le(n)1
.s L,
+ a~~ ~ ;(:j~;)al + (L -
e(n»a3 e(n)
(L - Ir(n)I)(b2 + b4) + (L + e(n»b 1 + (L - e(n»b3 ( )11 2(2L _ Ir(n)1) rn
1 2L I[L(a2
+ a4) + (L + e(n»al + (L - e(n»a3Je(n) + [L(b2 + b4) + (L + e(n»b 1 + (L - e(n»b3Jr(n)1
~~ {[L~(ai+bi)+Llal-a3+bl-b3I]e(n)+[Llbl-b31+L~bi]eM}' Hence, the BIBO stability condition for IC2 is
Similarly, the condition for IC4 is found to be 4
L (a, + bi) + la2 - a4 + b2 - b4 1 i=1
2
11<1>11 <
1.
179
Section 6.7. • BffiO Stability of TS Fuzzy PI/PD Control Systems
Now let us work on IC5, where Ir(n)1 lIC(e(n»1I
= II(L + r(n»a 1 ;;' (L <
-
2La1
1
~ (al
~
L; we have
r(n»a2 e(n) + (L
+ r(n»b 1 ;;' (L
+ 2La 2 e(n) + 2Lb 1 + 2Lb 2 (e(n) -
2L
2L
e(n -
- r(n»b2 r(n) II
1»1
+ a2 + b l + b2)e(n) + (b l + b2)eM '
Consequently, the BffiO stability condition for IC5 is (al
+ a2 + b l + b2 ) II <1> 1I
< 1.
The derivation for the rest of the ICs is similar and we just give the complete BIBO stability conditions for all the ICs in Table 6.1. Notice that all the conditions are independent of L. Finding a tight common condition that satisfies all 12 ICs simultaneously appears to be difficult in this case. The key word here is "tight." One can easily find a loose common condition, which could be so conservative that the condition would be practically useless. Without a common condition, one just needs to verify each of the 12 conditions individually for the BffiO stability determination. Theorem 6.5. A simple TS fuzzy PI control system is BIDO stable if (Xl • (X2 < 1 holds for all entries in Table 6.1. Along the same line of the principle and procedure presented here, BffiO stability conditions for systems controlled by other TS fuzzy controllers can also be established.
6.7.2. Numeric Example We now show how to use these stability conditions. TABLE 6.1 BffiO Stability Conditions for Nonlinear Systems Controlled by the Simple TS Fuzzy PI Controller. IC No.a
~ [t(Oj + hj)+ 101- 02 + hi -
h21] 114>11
2
~ [t(Oj + h;) + 101- 03 + hi -
h31] 114>11
3
~ [t(Oj + hj)+ 103- 04 + h3 -
h 1] 114>11
~ [~(Oj + hj)+ 102 -
h4 1] 114>11
4
5
11 6, 8, 10 and 12 a The
+ a2 + b, + b2)IIt1l11 + a3 + b I + b3 )IIt1l11 (a3 + a4 + b3 + b4 )IIt1l11 (a2 + a4 + b2 + b4 )IIt1l 11
(al (al
7 9
04
o
12 ICs are shown in Fig. 3.3.
+ h2 -
4
180
Chapter 6 • Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
EXAMPLE 6.3 In Section 5.4.7, a simple TS fuzzy PI controller is designed to control the hyperthermia temperature model (5.7). The resulting fuzzy control system appears to be stable according to the simulation.
Assuming the simulation has not been conducted, determine the Bmo stability of the designed fuzzy control system.
Solution
= 0.008. From Section 5.4.7, the values of the TS fuzzy PI controller parameters are: al = 0.005, 02 = 0.007, 03 = 0.004, 04 = 0.006, b 1 = 2, b2 = 1.62, b3 = 1.4, and b4 = 2. Using Table 6.1, one can easily find that all the conditions are met. Thus, the TS fuzzy PI control system is BffiO stable.
In Example 6.2, we found the system norm 1/<1>11
6.8. DESIGN OF MAMDANI FUZZY CONTROL SYSTEMS 6.8.1. Design Principle In this section, we develop a systematic, practical design procedure for fuzzy control systems involving the Mamdani fuzzy controllers in Chapters 3 and 4. We concentrate on the fuzzy controllers with nonlinear rules (see Table 4.6). The underlying assumption for the procedure is the unavailability of the mathematical model of the system to be controlled. A Mamdani fuzzy controller consists of a number of components: input and output fuzzy sets, fuzzy rules, fuzzy logic AND and OR operators, fuzzy inference, and a defuzzifier. They can be classified into two different types: structural parameters and functional parameters. The structural parameters, which determine the controller structure, are I (fuzzy rules), N, and f}. It is generally difficult to calculate or theoretically determine exact structural parameters. The designer needs to determine them empirically case by case, based mainly on the system type, the knowledge of the system operator from whom fuzzy rules are obtained, and the designer's experience with fuzzy control. Empirically selecting the structural parameters is a necessary step in fuzzy controller design, just as manually selecting a specific controller structure is a necessary step in classical controller design. We will establish guidelines for determining N and f}. The functional parameters, which determine the system performance once the structural parameters are fixed, include K e , K; K Au ' L, and H. After the structural and functional parameters are determined, the remaining parameters, J, S, V and A, can be calculated. The basis of the design procedure is the analytical structure of the fuzzy controllers with linear or nonlinear fuzzy rules. The analytical structure of the fuzzy controller with linear rules constructed via I(i,}) = i +} is given in Table 4.8. Its limit structure is a linear PI controller (see (4.22)): ·
AU() n
1 L1 N~
= K e ·K2LAu ·H e() K r ·KAu ·H ( ) n + 2L rn .
(6.11)
Since the limit structure and analytical structure are related, the limit structure can be used to systematically design the analytical structure. We will go a step further and use the limit controller (i.e., the linear PI controller) to develop a three-step design procedure for the fuzzy controllers with linear or nonlinear fuzzy rules. In the first step, the designer uses a linear PI controller to regulate the system. The proportional-gain and integral-gain of the PI controller are tuned to obtain at least an acceptable system output. In the second step, the values of the functional parameters,
Section 6.8. •
Design of Mamdani Fuzzy Control Systems
181
Ke , Kr, K!!,.u' L, and H, are calculated using the tuned proportional-gain and integral-gain as well as the system output of the tuned PI control system. Other parameters, J, S, ~ and A, are also calculated. In the last step, the structural parameters.j", N, and (), are determined based on intuitive and sensible guidelines.
6.8.2. Justifications for Design Principle For the following reasons, utilizing the limit controller corresponding to a fuzzy controller with linear control rules, instead of nonlinear control rules, is technically justified for developing the design procedure. First, the limit controller corresponding to a fuzzy controller with nonlinear fuzzy rules is usually more difficult to obtain. The result will be a nonlinear controller and will not be a linear controller of the PID type. Thus, such a controller is difficult to deal with and is more forbidding to be utilized as a vehicle for the fuzzy controller design. Second, linear rules represent common-sense strategy to control general systems. Nonlinear rules, though different from case to case, share some common characteristics that are similar to those of the linear rules. For example, Table 6.2 shows 49 nonlinear control rules, whereas Table 6.3 provides the corresponding 49 linear rules. There are 22 different rules between the tables. The similarities are as follows. The linear rules are symmetric about the off-diagonal of the table, as are the nonlinear rules. Also, within a row, ~u(n) gradually increases from left to right, whereas within a column, ~u(n) gradually increases from top to bottom. Finally, ~u(n) corresponding to the central area of the tables is small. Because of these characteristics, nonlinear rules usually deviate from the corresponding linear rules in TABLE 6.2
B_ 3 B_ 2 B-1 Bo BI B2 B3
Forty-nine Nonlinear Fuzzy Rules. a
A_3
A_2
VV_ V_ 4s V- 4 * V- 2 V_I Vo
V- 6 * V- s* V- 4 * V- 3 * V- 2 * Vo VI
6
A-I
Ao
Al
A2
A3
V- 4
V- 4 * V- 2 V- 2 * Vo V2* V2 V4 *
V_ 2 * Vo VI V3 * V4 * V4
V- 2
V-I Vo V2 * V3 * V4 * Vs* V6 *
Vo
V- 4 * V- 3 * V-I
Vo V2* V2
VI V2
V4 * V4 Vs V6
The rules that are different from the corresponding linear rules, shown in Table 6.3, are marked with *. There are 22 of them.
a
TABLE 6.3 Forty-nine Linear Fuzzy Rules Corresponding to the 49 Nonlinear Rules Given in Table 6.2.
B_ 3 B_ 2 B-1
Bo BI
B2 B3
A_3
A_2
VV- s
V- s
6
V- 4 V- 3
V- 2
V-I Vo
V- 4
V- 3 V- 2 V-I
Vo VI
A-I V- 4
Ao
Al
V- 2
V- 2 V-I
V- 3 V- 2 V-I Vo VI
V- 3
Vo VI V2
V2 V3
V-I Vo VI V2
V3 V4
A2 V-I
Vo VI V2
V3 V4 Vs
A3 Vo VI V2
V3 V4 Vs V6
182
Chapter 6 •
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
only a mild way. Another factor preventing rules from being severely nonlinear is that N often has to be quite small in practice to make construction of a fuzzy controller manageable. Third, a linear Pill controller can adequately be tuned through trial-and-error effort. The effort is minimal because it can be guided by qualitative knowledge about the system as well as numerous theoretical and practical methods (e.g., [10][185]). Usually, satisfactory control performance can be achieved quickly even if the explicit system model is unavailable. Considering the popularity and practicality of the Pill controller, making use of it in the fuzzy controller design process is desirable. This is the case even when the limit controller corresponding to a fuzzy controller with nonlinear rules can be derived. In addition to these reasons, the following inequality about the fuzzy controller with the linear rules provides further justification: IAU(n) -
J~ AU(n) I .s 2~~u~~).
(6.12)
The proof is quite simple. When E(n) and R(n) are in ICI to IC8, according to Table 4.8, we have
.
~U(n) - J~~U(n)
I
H I = K/!"u· N _ 1 (1 -
Pt(M,M» I1 - (E(n) S
-
l.) -
(R(n) S
- ]·)1 .
Using minimum Pt(M,M) = 0.5, minimum E(n) = is, and minimum R(n) =jS +A, we can achieve the maximum of this equation as K/!"uH(1 - ()/2(N - 1), which is less than K/!"uH/2(N - 1). The same can be proven true for ICl' to IC8'. Inequality (6.12) provides an estimate for the incremental output difference between the fuzzy controller with the linear rules and its limit controller (i.e., the linear PI controller). It discloses that if the fuzzy controller employs a large N, it will perform somewhat like the PI controller. If N is small, in a global sense, the fuzzy controller and the PI controller will act differently. For the fuzzy controllers with nonlinear rules, it is logical to reason that if the rules covering the region around the equilibrium point are linear, the fuzzy controllers should behave in a similar fashion in the area as the linear PI controller does. The two control systems will have the same local stability if the fuzzy controller is linearizable at the equilibrium point.
6.8.3. Design Procedure Next we will design a fuzzy controller with nonlinear rules to control a nonlinear system whose mathematical model is unknown. In the first step of this design procedure, the designer appropriately chooses the sampling period, T, according to the observed/estimated characteristics of the system. Since this is not a fuzzy controller specific issue, all the methods in conventional control theory can be used. The designer then tunes a linear PI controller to control the system. The time response period of the control system should be sufficiently long to cover the transient phase as well as the major portion of the steady-state phase. It should be assumed that at least acceptable system output performance is achieved. This requirement minimizes the likelihood of physical damage to the system when the PI controller is later replaced by the fuzzy controller designed according to the procedure. It is desirable, though not critical, to achieve as good a system output as possible. The better the system output of the tuned PI control system, the more appropriately the functional parameter values of the fuzzy controller will be
Section 6.8. •
183
Design of Mamdani Fuzzy Control Systems
calculated, and hence less tuning efforts will be needed to adjust the calculated values. Let the proportional-gain and integral-gain of the tuned linear PI controller be K; and K1, respectively. The corresponding maximal absolute value of e(n) and r(n) of the system output are emax and rmax' respectively. The design then enters the second step, in which the designer calculates first the five functional parameter values (i.e., K e , K; K au' L, and H) and then the values of J, S, "K and A. The sampling period of the fuzzy control systems should be the same as that of the PI control system because the sampling period depends only on the system's dynamics. This step encompasses three phases:
s;
(1) Calculating the functional parameters x; K au. The relationship between the gains of the PI controller and the scaling factors in the limit controller is
Obviously, if K, is known, K; can be calculated, and vice versa. The values of K; and K; are not critical, but their ratio is. The value of K; (or K r ) can be any number, but for simplicity let K; = 1. The value of K r , therefore, can be calculated:
K* K r - K~p r:
t :
From K; or K; K au can be calculated if L and H are known. (Recall K; = K au . Kr · H /2L and K1 = K au · K; . H /2L.) For simplicity, H and L are assumed to be equal. (Such an assumption will be shown valid later.) Under this condition, K au can be calculated by I
2K* K au =_P-
s;
or
(2) Calculating the functional parameters L and H. It is desirable that E(n) and R(n) most often fall into [-L, L]. This may be achieved by letting L = max(emax,rmax ) , because the designed fuzzy controller is expected to behave somewhat like the PI controller in a global sense. Next, H needs to be calculated. Because K au and H always appear as a product in the analytical structure (see Table 4.6; this is true for all the fuzzy controllers), the value of H is not critical, but the value of KauH is. To simplify the calculation of K au' we assumed H = L. (3) Calculating J, S, K and A.
184
Chapter 6 •
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
Calculation of these parameters is straightforward once N and fJ are decided in the third step: N-1 J=-2-' L
S=J' H V=2J'
and A = fJS.
The third step of the design procedure completes the design. The designer empirically selects the structural parameters of the fuzzy controller, namely, N, fJ, and f. Different values of N result in different nonlinearity. For linear rules, the larger the N, the .closer the nonlinear fuzzy controller is to a linear PI controller. Mathematically assessing the effect of different values of N on the fuzzy control system performance is difficult, and the effect is also system-dependent. According to the literature, N is usually moderate, with a typical value ranging from 3 to 16. Different fJ values result in different nonlinearity. According to Table 4.6, different values of fJ do not alter the structure of the global controller, but they do change the structure of the local PI controller (i.e., A and P2(M,M)). For different fJ values, the size of the square configured by [(i + 0.5)S - A, (i + 0.5)S + A] on the E(n) axis and [(j + 0.5)S - A, (j + 0.5)S + A] on the R(n) axis is different, and so is the size outside this square but inside the square configured by [i· S, (i + 1)S] and [j. S, (j + 1)S]. As an extreme, IC1' to IC8' will disappear if fJ = 0 (i.e., triangular input fuzzy sets). Analytically estimating the effect of different fJ values on control performance is virtually impossible. The effect is system-dependent as well. It appears reasonable to use fJ = 0.25 as an initial value for trial, which is midpoint of the fJ range, 0 to 0.5. As for the nonlinear fuzzy rules, they reflect the control operator's knowledge and experience with the system. They are application-specific and thus should be determined by the designer case by case.
6.8.4. Design Example Having described the design procedure, let us use an example to determine its effectiveness and practicality. EXAMPLE 6.4 In this example, a first-order nonlinear differential equation y'(t) - 3.Sy(t) + y(t) = u(t)
(6.13)
serves as the system to be controlled. The sampling period T is chosen as 0.01, and the setpoint is arbitrarily chosen as 3. To be realistic and practical, we assume the system to be mathematically unknown to the designer.
Section 6.8. • Design of Mamdani Fuzzy Control Systems
185
The first task is to use the design procedure to design two fuzzy controllers: one with the 49 linear rules in Table 6.3 and the other with 9 linear rules. The second task is to compare their control performance to appreciate the effect of different N values. Solution
Using the trial-and-error method guided by prior qualitative knowledge about the system, one can empirically tune the gains of the linear PI controller. A good control performance, shown in Fig. 6.3, is achieved when the proportional-gain x.; = 1.1 and the integral-gain K1 = 2. From the recorded output of the tuned PI control system, the maximal absolute value of e(n) is found to be 3 (i.e., emax = 3) and the maximal absolute value of r(n) to be 3.2837 (rmax = 3.2837).
Based on this information, we design the desired fuzzy controllers. Let us work on the 49-rule case first (N = 7). Let () = 0.25 and K, = I, the default values for these parameters. Then, the following parameters can be calculated:
K*
s, = ~ = 0.55, I
L = max(emax, rmax ) = 3.2837, H
= L = 3.2837,
J_ N- 1_ 7- 1_3 -
2
S=
J=
L
-
2
-
,
1.0946,
H V = - = 0.5473 2J 4.5,..----r------"'T---..,..-----y---__r----_--. 4
3.5 3
\ PI
0.5 Olo-oo-_ _-......_ _--.a. o 0.5
..&-_ _........._ _----'a....-_
2
2.5
_
~
3
Figure 6.3 Performances ofthe PI control system and designed fuzzy control systems with 49 and 9 linear rules.
186
Chapter 6 •
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
and
A
= OS = 0.274.
The absolute value of the maximum increment for the fuzzy controller is K/1uH = 13.1348. Simulated output of this designed fuzzy control system is shown in Fig. 6.3. We now handle the 9-rule case (i.e., N = 3). Still, let 0 = 0.25, and K; = 1. Then the values of K r, K/1u, L, and H are the same as those in the 49-rule case. Nevertheless, J = (N - 1)/2 = 1, S = L/J = 3.2837, V = H/2J = 1.64185, and A = OS = 0.821. The absolute value of the maximum increment for the fuzzy controller remains 13.1348. The simulated performance of this fuzzy control system is also given in Fig. 6.3. Now compare the performances of the three control systems. Among them, the fuzzy control system with N = 3 is clearly the best. Compared with the fuzzy control system with N = 7, its rise-time is significantly less. This is because the fuzzy controller with the smaller N is more nonlinear and therefore is able to control the nonlinear systems better. The performance of the fuzzy controller with 49 rules is slightly worse than that of the linear PI controller owing to the small overshoot. As expected, the larger the N, the more similar the performance. If N = 00, the fuzzy control performance would be exactly the same as the PI control performance. Assuming the performances of either fuzzy control systems meet the designer's specifications, the design is finished.
6.8.5. System Tuning Guidelines As is true of any control system, especially nonlinear ones, the performance of a designed fuzzy controller may not be that specified prior to design. This may be especially true if the performance of the tuned PI control system is barely acceptable. When this is the case, the calculated functional parameters need to be carefully fine tuned to obtain the desired performance. The following practical guidelines, based on the structure of the fuzzy controller, should help during the fine-tuning process: 1. The value of L should not be modified first because (1) it is calculated from emax and rmax' and (2) the increase of K; and K; is somewhat equivalent to the decrease of L, and vice versa. 2. The value of H need not be modified, as the adjustment of K/1u is equivalent to the adjustment of H. 3. Theoretically assessing the role of 0 is difficult, whereas practical assessment requires a lot of trial-and-error effort. Hence, 0 should be adjusted later, ifnecessary. 4. The fuzzy rules acquired by the designer are usually reasonable, and only minor modifications may be needed. Modifying rules at a later time is wise because it is difficult to identify the individual rules responsible for overall unsatisfactory control performance. Moreover, the rule effect is determined not solely by the rules themselves, but also by the functional parameters, mainly K e, K r, and K/1u. Without adequate parameter values, rule refinement can be troublesome.
Section 6.8. • Design of Mamdani Fuzzy Control Systems
187
In summary, K e , K r , and K tiu should be tuned first. The role of these three parameters can be seen from the limit controller (6.11) in relation to the gain and integral-time of the linear PI controller, which can be expressed as
(6.14) where T, is the integral-time. Note that (6.11) can be rewritten as
J~ AU(n) = Kr·~1u·H (~: e(n) + r(n)). We can see that changing K; only affects the integral control term (i.e., the e(n) term). Increasing K; is equivalent to decreasing Ti , which, according to the PID control theory, will result in a more oscillatory system output and less system stability. Decreasing K; will produce the opposite effect to the system output. If K; is too small, it will take a long time to eliminate the steady-state error of system output owing to too weak integral action. Changing K; only affects the proportional control term (i.e., the r(n) term). Increasing K; results in a more responsive system output with less rise-time but longer settling-time. A too large K; causes a too large Kp which destabilizes the system. Decreasing K, causes K p to decrease, which produces the opposite effects. Changing K tiu affects both the proportional control term and the integral control term, and it is equivalent to changing Kp in (6.14). Therefore, increasing K tiu produces a more responsive but less stable control system. Decreasing K ti u produces the opposite result. Finally, it should be pointed out that changing Land H is equivalent to changing Kp in (6.14).
6.8.6. Examples of Designing More Complicated Fuzzy Control Systems We now continue Example 6.4 and design fuzzy controllers with nonlinear fuzzy rules to demonstrate the usefulness of the tuning guidelines as well as the design procedure. EXAMPLE 6.5 Design a fuzzy controller with the 49 nonlinear rules in Table 6.2 to control the system (6.13).
Solution According to Tables 6.2 and 6.3, the difference between the nonlinear and linear rules is significant; there are 22 different rules, accounting for 45% of the total rules.
The poor but acceptable performance of the PI control system shown in Fig. 6.4a is presumably the best performance that the designer is able to achieve after trial-and-error tuning effort. The tuned proportional-gain = 2 and integral-gain K1 = 2. The poor performance is hypothetical because much better performance can be achieved when = 1.1 and K1 = 2, shown in Example 6.4 (see Fig. 6.3). But to demonstrate that a good PI control system performance is not critical for designing an adequate fuzzy control system and that an acceptable performance will suffice, the PI control performance is deliberately set poor. From the tuned PI control system output, the maximal absolute value of e(n) is found to be three (i.e., emax = 3) and the maximal absolute value of r(n) is found to be 7.0956 (i.e., rmax = 7.0956).
K;
K;
188
Chapter 6 •
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
4.5r---~---~--~~--~-----,
4
luzzy control system
3.5 3 "S c. "S 2.5
o ~
2
ili
1.5
'iii
Figure 6.4 Performances of the PI control system and the designed fuzzy control system : (a) initial performances, and (b) final, tuned performances.
Now, design a fuzzy controller with the nonlinear rules using the information provided by the PI control. Again, let () = 0.25 and K, = 1. The parameter computation is as follows:
K! K =....J!....= 1 r Ki ' K Au =2Ki =4, L = max(e max , rmaJ = 7.0956,
H = L = 7.0956, N-l 7-1 J=-2-=-2-=3,
S
L
= J = 2.3652, H
= 2J = 1.1826, A = ()S = 0.5913 . V
Section 6.8. •
189
Design of Mamdani Fuzzy Control Systems
The maximum increment of the fuzzy controller is computed as K Au ' H = 28.3824. The simulated output of the designed fuzzy control system with these calculated parameter values is shown in Fig. 6.4a. The performance is unsatisfactory (but supposedly acceptable), with too much oscillation and too large rise-time. The parameters need to be tuned to eliminate the oscillation and significantly reduce the rise-time. According to the tuning guidelines, the first option is to tune K e , K r , and K Au ' Decreasing K Au alone can eliminate the oscillation but at the expense of longer rise-time, whereas increasing K Au produces the opposite result. Increasing K; alone can significantly reduce the rise-time, but the oscillation still exists. It is found that decreasing K; can achieve the goal. K; is gradually reduced with improving system performance. A good performance is achieved, as shown in Fig. 6.4b, when K; = 0.276. This good control performance is obtained by merely tuning K; from 1 to 0.276. Simultaneously adjusting more than one scaling factor may achieve even better results. However, higher dimensional parameter search is far trickier than one-dimensional search, especially when the fuzzy control system is complex and highly nonlinear. The PI control system performance is also included in Fig. 6.4b for comparison, where is calculated based on the tuned value of K; (Le., 0.276) and KT remains unchanged since it is not related to K: Evidently, the PI control system is unstable. Example 6.6 is more realistic for it represents a real-world application.
K;
EXAMPLE 6.6 Suppose a fuzzy controller is designed with the nonlinear rules in Table 6.2 to control the model of MAP in patients (see (8.1)). It is known that the sampling period T = 10 seconds is adequate. The initial MAP and the target MAP are 140mmHg and lOOmmHg, respectively. How should the fuzzy controller be designed?
Solution We first design and then tune a linear PI controller to control the patient model. Supposedly, we can only achieve the performance labeled as PI (initial) in Fig. 6.5. The performance is poor because MAP decreases too slowly, but it is still clinically acceptable as far as the patient's safety is concerned. We 150 r----..,---~--....----..--__-
f
140
! 130
i
120
~
110
~c
100
!
!
J
...
' ... ",.
.........
"<;
fuzzy (final)
.........
__-_-___r-_____.
PI (initial) .........
........
......
.. _-
90 80 "-------.......- - . . . . - - . . - -
o
200
400
600
800
1000
-~-
1200
--....----'
1400
1600
1800
Time (second)
Figure 6.5 Initial and final performances of the PI control system and the designed fuzzy control system for mean arterial pressure control.
190
Chapter 6 •
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
know X; = -0.I,K1 = -0.01, emax = 40, and r max = 0.03726. Following the design procedure, we choose 0 = 0.25 and K; = 1 and compute the following:
K* K r = ~= 10, I
K Jiu
= 2K1 = -0.02,
L = max(emax , rmax)
= 40,
H=L=40,
N-l J=--=3, 2
S= V
L
J=
13.333,
H
= 2J = 6.667,
A = OS = 3.333.
The performance of the fuzzy control system with these calculated parameter values is shown in Fig. 6.5 and is marked "fuzzy (initial)." The performance is unsatisfactory (but safe) owing to the slow decrease of MAE Using the tuning guidelines, we can increase the absolute value of K Jiu and achieve a clinically very desirable performance, as shown in Fig. 6.5 (labeled as fuzzy (final)), when K Jiu = -0.092. Such a good performance is obtained by merely adjusting K Jiu alone from -0.02 to -0.092. The performance of the PI control system whose gains are calculated based on K Jiu = -0.092 is also plotted in Fig. 6.5. The curve is marked PI (final). The new gains areK; = -0.46 and K1 = -0.046. The performance is not very stable as indicated by the oscillation in the initial transient phase, which may cause a life-threatening low MAP to patients very sensitive (i.e., K = -2.88) to sodium nitropresside. From Examples 6.4 to 6.6, one can see that the design procedure and guidelines are reasonable for systematically designing the fuzzy controllers with either linear or nonlinear rules. This is the case even when the system's mathematical model is unknown. The design procedure has substantially simplified the unmanageable task .of blindly and globally searching the entire parameter space, which is five or higher dimensional, to the much easier task of tuning a linear PI controller and calculating all functional parameters based on the tuned PI control system. This eliminates a major portion of the trial-and-error effort associated with fuzzy control system development. The remaining trial-and-error effort is insignificant as it only involves locally fine-tuning some, or maybe only one, calculated parameters in their neighborhood parameter space. This is justified at least by the fact that the system model is not required in the entire design process. Another important advantage of the design procedure is a significantly lower possibility for the actual systems to be damaged in the design stage since much less trial-and-error effort is involved. It is critical to differentiate the amount of effort required to fine-tune the calculated functional parameters from the amount of effort required to blindly search the functional parameters using the trial-and-error method. The fine-tuning effort is much less demanding
191
Section 6.9. • Design of General TS Fuzzy Control Systems
than the blind search effort, because the fine-tuning only modifies the calculated functional parameters locally in their neighborhood in the five-dimensional parameter space. In sharp contrast, hopefully the blind search finds appropriate values of the five functional parameters in the entire parameter space without good initial conditions. The design procedure can be automated to a certain extent. Optimal parameter finetuning under certain performance indexes may be achieved through optimization techniques. This design procedure, along with its guidelines, is in principle directly applicable to other fuzzy controllers using different types of input and output fuzzy sets, fuzzy logic operators, and fuzzy inference methods. This is because the limit controller structure of a fuzzy controller is fundamentally determined by fuzzy rules alone. When linear rules are used, the limit controller is a linear controller. The idea of using a limit controller as a means of developing a design procedure holds for much more general SISO and MIMO fuzzy controllers.
6.9. DESIGN OF GENERAL TS FUZZY CONTROL SYSTEMS 6.9.1. Design Technique Theorem 6.3 can be used not only to determine local stability but also to design a general class ofTS fuzzy control systems that are at least stable around the equilibrium point. This can be achieved with or without system models. The design technique is as follows. If P(x) is mathematically available, we first design a linear controller (6.3) and use it to control the linearized P(x) to achieve asymptotic stability at least around the equilibrium point. On the other hand, if the system model is mathematically unavailable, we use the linear controller to control the physical system itself to obtain the asymptotic stability. Suppose that gain for x;(n) is d, and that the resulting linear controller is (we assume do == 0 without loss of generality) U(n)
== d1xl (n) + ·.. + dMxM(n).
To design a TS fuzzy controller of the general class that will make the fuzzy control system asymptotically stable around the equilibrium point, we let b;(O) == d, for all i. In other words,
n
L Jlj(O) . aij j=l (}
== d.i»
i
== 1, ... , M,
(6.15)
LJlj(O)
j=l
and M equations are the result. Obviously, one solution set is aij == d; for all i and j. But this solution set causes the general TS fuzzy controllers (6.1) to be linear controllers because all the rule consequent become the same, as follows: U(n)
== d1Xl (n) + ..·+ dMxM(n).
This means that, regardless of input fuzzy sets and input state (i.e., any combination of the input variables), the output of the general fuzzy controllers is always the same as that of the linear controller. Therefore, the solution set aij = d, is not an appropriate one for the purpose of fuzzy control. To find other solution sets that will make the fuzzy controller locally stable and nonlinear, we need to solve (6.15) for the unknowns, namely, Jlj(O) and aij for all i andj. Jlj(O)
192
Chapter 6 •
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
are not really unknowns, and they can be determined first to reduce the number of unknowns. To do so, the designer must select three components: input fuzzy sets, the fuzzy AND operator, and the defuzzifier. Designing a fuzzy controller always requires a certain ad hoc procedure as well as trialand-error effort. The designer must use his/her intuition, knowledge, and experience to properly construct fuzzy sets, select a proper defuzzifier, and choose appropriate fuzzy logic AND operators. Numerous successful applications have indicated that (1) triangular, trapezoidal, and Gaussian membership functions are excellent choices for input fuzzy sets, and (2) the centroid defuzzifier (i.e., a = 1) works very well. As for the fuzzy logic operation, only two types are widely used: the product AND operator and the Zadeh AND operator. This part of the design process cannot be fully automated, and human judgment is required because (1) these components determine the controller structure and hence are nonparametric, and (2) there are too many degrees of freedom for the nonparametric choices. The only imaginable way to automate this portion of the design process seems to involve global optimization schemes, such as genetic algorithms, for blindly optimizing the components. Such an approach would be time-consuming and would involve excessive trial-and-error effort. Furthermore, such an approach should not be considered as a design approach in the sense of traditional control theory. Once these three components are decided, J.,lJ(O) can be computed, and we will then only need to solve (6.15) for aij. This involves solving a set of M linear equations that are independent of each other. Each equation typically contains more than one but up to n unknowns. Obviously, an infinite number of solution sets exist, but they can be found rather easily. One way is as follows. In (6.15), let, ail
= Pil' ... , ai(n-l) =
Pi(n-l)'
for all i,
where Pil' ... , Pi(n-l) are constants chosen by the designer at will. Then compute ain: 0-1
L
j=1
ain =
J.,lJ(O)(di
-
Pij) + J.,ln(O)
J.,ln(O)
for all i.
(6.16)
This will produce one solution set. Such computed aij satisfy (6.15) and thus guarantee the local stability of the fuzzy control system. Performance of the fuzzy control system, however, is not guaranteed, which is the case for any method solving for aij based on (6.15) alone. This, however, should not be regarded as a shortcoming because many (nonlinear) control systems designed according to conventional control theory also can only guarantee system stability. We suggest that a number of solution sets be first computed and then, using computer simulation, one solution set be chosen that enables the fuzzy control system to perform satisfactorily. This nonunique solution problem is a universal problem associated with any TS fuzzy controllers because there are so many design parameters and components.
6.9.2. Design Examples We now continue Example 6.1 to show how to use the design method. Recall that the designed fuzzy control system in that example is unstable. EXAMPLE 6.7 If the controller designer wants to make the fuzzy control system locally stable by keeping all the components of the fuzzy controller in Example 6.1 unchanged except the values of aij' what should
193
Section 6.10. • General TS Fuzzy Dynamic Systems as Nonlinear ARX Systems
aij be in order to achieve local stability for the TS fuzzy PD control system around the equilibrium point?
Solution We first design a linear PD controller with proportional-gain 6.0 and derivative-gain 2.0, which can control the pendulum with local stability at the equilibrium point. This means that d I = 6 and d 2 = 2 in (6.15), and we get two independent linear equations:
JlA I (O)JlB I (O)all
+ JlA
I
(0)JlB2 (0)aI2 + JlA 2 (O)JlB I (O)al3 + JlA 2 (0)JlB 2 (0)aI4
JlA I (O)JlB I (0)a21 + JlA I (0)JlB 2 (0)a22
+ JlA (O)JlB (O)a23 + JlA 2
I
2
(0)JlB 2 (O)a24
= a,
= d2·
Letting all = al2 = al3 = a21 = a22 = a23 = 1, we compute to attain al4 = 16.2207 and a24 = 4.8052 using (6.16). The fuzzy PD control system is locally stable with these new aij values. Indeed, the closedloop transfer function of the fuzzy PD control system around the equilibrium point now becomes O(z) 0.02z - 0.0195 S(z) = z2 - 1.9674z+ 0.9777'
which has two poles 0.9837 ± 0.1005i that are within the unit circle. Thus, the redesigned fuzzy PD control system is stable.
Let us see one more example, which is related to Examples 6.1 and 6.7. EXAMPLE 6.8 Suppose that the mathematical model of the pendulum is unavailable but we know it is linearizable around the equilibrium point. Also, after experimenting, suppose we know, that a linear PD controller with proportional-gain 6.0 and derivative-gain 2.0 can control the pendulum with local stability at the equilibrium point. How should the values of aij be chosen so that the designed fuzzy PD control system is locally stable?
Solution The parameter computation is similar to that in Example 6.7. As one of many possible results, the parameter values calculated in Example 6.7 can be used to achieve the desired local stability for the present example.
Example 6.8 shows that one needs only minimal information about the fuzzy controller and the system in order to design a locally stable fuzzy control system of the general class. The example clearly illustrates the practicality of the design technique.
6.10. GENERAL TS FUZZY DYNAMIC SYSTEMS AS NONLINEAR ARX SYSTEMS So far in this chapter, we have studied how to design fuzzy control systems and determine their stability. Every fuzzy control system consists of a nonlinear system, in the form of a differential equation, and a fuzzy controller. We now tum our attention to another type of fuzzy control system: The system is a TS fuzzy dynamic system, whereas the controller is a conventional feedback linearization tracking controller. We will first investigate the analytical structure of the TS fuzzy dynamic systems in relation to the popular ARX model of classical black-box modeling approaches in this section. The next two sections focus on the local stability of the TS fuzzy dynamic systems and designing stable feedback linearization tracking controllers for them.
194
Chapter 6 •
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
Configuration of the TS fuzzy dynamic systems is similar to that of a TS fuzzy controller: It is composed of input fuzzy sets, fuzzy logic AND operators, fuzzy rules with linear consequent, and a defuzzifier. The fuzzy systems of interest here are of general type. 1 Thejth fuzzy rule is (1 s i-: !l, where !l = Pi)):
n;:i
IF y(n) is AzOJ. AND y(n - 1) is AIIJ. AND ... AND y(n - m) is AlmJ. THEN y(n
m
+ 1) = E aijy(n i=O
i)
(6.17)
P
+ E blju(n -I) 1=0
where y(n - i) and u(n - I) are system output and input at times n - i and n - 1, respectively. logic AND operators may be used, ~(j different types may be used in one rule or in different rules. The ANDed membership for the jth rule is denoted as J.,lj(Y(n)) where
AI.. can be any continuous fuzzy sets. Any types of fuzzy
y(n) = (y(n), ... ,y(n - m)).
When y(n) = ... = y(n - m) = O,y(n) = 0, and the corresponding J.,lj(Y(n)) is expressed as ,uj(O). Using the generalized defuzzifier, we find that the system model is
(m
n
~ ,uj(Y(n)) ~ aijy(n - i)
1) = ( yn+
1=0
1=1
n
P +E blju(n -I) )
1=0
.
E ,uJ(y(n))
j=1
We rewrite this equation as follows: y(n
m
+ 1) = E (Ji(y(n))y(n -
i)
i=O
P
+ E lfJl(y(n))u(n -I) 1=0
where
n
n
E J.,l~(y(n))· br " 1 J Y
E ,uj(Y(n)). aij
(Ji(y(n)) = J_"=_la
_
lfJl(y(n)) =J= n
and
E J.,lj(Y(n))
.
(6.18)
EJ.,lj(y(n)) j=1
j=1 In other words, y(n
m
+ 1) - E lJi(y(n))y(n -
i) =
~o
P
E lfJl(y(n))u(n -1).
(6.19)
~o
Recall that the linear time-invariant ARX dynamic system model (e.g., [135][136]) is: y(n
m
+ 1) + E c;y(n i=O
i)
P
= E d1u(n -I) + e(n + 1), 1=0
(6.20)
where c, and d1 are constant parameters, and e(n + 1) represents random error. Comparing (6.19) with (6.20), one sees that the general TS fuzzy dynamic system model is a nonlinear time-varying ARX model without the e(n + 1) term. The nonlinearity and time-variation of the fuzzy systems are due to (Ji(y(n)) and qJl(y(n)), whose values are determined by ,uj(Y(n)) that change with y(n) and hence with time.
195
Section 6.12. • Local Stability of General TS Fuzzy Models
Theorem 6.5. The general TS fuzzy dynamic systems are nonlinear time-varying ARX dynamic systems. This rigorous analysis shows that, in the context of traditional system modeling, TS fuzzy modeling is indeed a rational and viable way to construct general nonlinear timevarying dynamic models. A significant and unique advantage of the fuzzy system modeling is that both qualitative information (e.g., knowledge and experience) and quantitative information (e.g., measured data) can be utilized. Conventional system modeling focuses mainly on linear time-invariant dynamic systems, whereas the TS fuzzy modeling scheme can handle nonlinear, time-varying dynamic systems. Thus, fuzzy modeling can be desirable and effective when dealing with complex systems. 6.11. GENERAL TS FUZZY FILTERS AS NONLINEAR FIRJIIR FILTERS Digital filters are dynamic systems as well. Hence, fuzzy systems can realize them. A linear infinite impulse response (IIR) filter with input u(n) and output y(n) is described by y(n) =
m
L c;y(n -
;=1
i)
p
+L
[=0
d[u(n -1).
(6.21)
When d[ = 0 for alII, the IIR filter becomes a finite impulse response (FIR) filter. On the basis of the similarity between (6.21) and (6.20), the general TS fuzzy systems become nonlinear time-varying IIR or FIR filters, provided that the variables in the fuzzy rules represented in (6.17) are properly modified in the context of signal filtering. We directly state the result below without proof.
Theorem 6.6. The general TS fuzzy filters are nonlinear time-varying FIR or IIR filters. Nonlinear time-varying filters can be advantageous and useful in applications (e.g., [143]), and so are the fuzzy filters. However, much more research is needed in this area.
6.12. LOCAL STABILITY OF GENERAL TS FUZZY MODELS 6.12.1. Local Stability Conditions and Their Use for Model Quality Check Revealing the analytical structure of the general TS fuzzy dynamic systems makes it possible to mathematically investigate various aspects of fuzzy modeling. We now concentrate on the local stability of these general fuzzy systems, which characterizes one of the most important behaviors of physical systems. We will not try to establish global stability conditions because that would require complete system information in analytic form. This is impractical in general TS fuzzy systems because their structures are not analytically derivable in many cases. Aside from structure availability, even when the complete structure is available, obtaining useful global stability criteria is still very difficult, as we have pointed out earlier in this chapter. In contrast, determining local stability requires much less information. For a general TS fuzzy system, one only needs to know its analytical structure and the linearizability around the equilibrium point yen) = o.
196
Chapter 6 •
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
Stability is an inherent system characteristic and is unrelated to system input signal. Thus, the (local) stability of the fuzzy dynamic systems (6.19) is determined by the following nonlinear time-varying difference equation:
yen + 1) -
m
L lJi(y(n»y(n -
i) = O.
i=O
(6.22)
If this equation is linearizable at yen) = 0, then Lyapunov's linearization method can be utilized to judge the local stability of the resulting linear difference equation. This leads to the following necessary and sufficient condition.
Theorem 6.7. If the nonlinear difference equation (6.22) of a general TS fuzzy dynamic system (6.19) is linearizable at the equilibrium point, the fuzzy system is locally stable at y(n) = 0 if and only if its corresponding linearized system yen + 1) -
m
L lJi(O)y(n -
i=O
i) = 0
(6.23)
·
(6.24)
is stable, where according to (6.18),
n
L Jlj(O)· aij
lJi(O) =
j=l
n LJlj(O)
j=l
With minor modifications, this result will also hold for the general TS fuzzy filters in the last section. The easiest way to determine the stability of system (6.23) is to use the z-transform. That is, system (6.23) is stable if and only if all the roots of the corresponding z-transform equation
Z-
m
L
i=O
lJi(O)Z-i = 0
are inside the unit circle. In addition to the local stability determination, another important use of Theorem 6.7 is to check the quality of the general TS fuzzy system models. If a physical system is known to be stable at the equilibrium point, the result of applying Theorem 6.7 to the fuzzy system model should confirm it. If the confirmation occurs, the model builder can be more confident about the quality of the fuzzy system model. Otherwise, the fuzzy system model is incorrect, and a new fuzzy system model needs to be established. This simple qualitative model verification can practically be important and useful for the TS fuzzy system modeling technique. Without this method, there would have existed no analytical means for checking or invalidating a TS fuzzy system model. The common practice with fuzzy model validation had been to use computer simulation, which was not only time-consuming but, more importantly, could lead to erroneous validation results. This is because fuzzy systems are nonlinear and time-varying and no simulation can be comprehensive enough to cover all possible situations.
197
Section 6.12. • Local Stability of General TS Fuzzy Models
6.12.2. Numeric Example We now use an example to demonstrate the usefulness of Theorem 6.7. We purposely use an unstable fuzzy dynamic system because we will use the same system in the next section to show that a feedback linearization tracking controller can be designed to stabilize it. Example 6.9 Suppose that we have identified a physical system using the TS fuzzy modeling technique. Assume that the resulting TS fuzzy system model has the following eight TS fuzzy rules: IF y(n) is Po AND y(n - 1) is PI AND y(n - 2) is P 2 THEN y(n
+ 1) = -2y(n) -
y(n - 1) - 3.1y(n - 2)
+ u(n) + 0.5u(n -
IF y(n) is Po AND y(n - 1) is PI AND y(n - 2) is N2 THEN y(n
+ 1) =
-4y(n) - 18y(n - 1) - 1.8y(n - 2)
+ 1) =
-7y(n) - 2.3y(n - 1) - 1.9y(n - 2) - 2u(n)
IF y(n) is Po AND y(n - 1) is NI AND y(n - 2) is N2 THEN y(n
+ 1) =
-3y(n) - 8.5y(n - 1) -l.ly(n - 2)
IF y(n) is No AND y(n - 1) is PI AND y(n - 2) is THEN y(n
+ 1) =
P2
-7.5y(n) - 2.6y(n - 1) - 2y(n - 2)
IF y(n) is No AND y(n - 1) is PI AND y(n - 2) is N2 THEN y(n
+ 1) =
-3y(n) - 5.5y(n - 1) - 1.2y(n - 2)
IF y(n) is No AND y(n - 1) is NI AND y(n - 2) is THEN y(n
+ 1) =
+ 4.6u(n -
+ u(n) + 0.5u(n -
+ 1.2u(n) -
P2
-1.7y(n) - 4.2y(n - 1) - 1.8y(n - 2)
+ 1) = -1.3y(n) -
(r2) 1) (r3) 1) (r4) 1)
+ 0.5u(n) + 0.7u(n -
(r5) 1) (r6)
u(n - 1)
(r7)
+ 4.2u(n) + 0.2u(n -
1)
+ 0.2u(n -
1).
IF y(n) is No AND y(n - 1) is NI AND y(n - 2) is N2 THEN y(n
1)
+ 9u(n) + 0.4u(n -
IF y(n) is Po AND y(n - 1) is NI AND y(n - 2) is P2 THEN y(n
(rl)
5.8y(n - 1) - 2.9y(n - 2) - 3.6u(n)
(r8)
Nt,
Here, Pi and where i = 0, 1, 2, are six fuzzy sets whose mathematical definitions are illustrated in Fig. 6.6. The membership functions of Pi are described by
0, JlP (y(n - i)) = j
kp .y(n - i) { 1,
+ dp,
y(n - i) ~ ap, ap < y(n - i) ~ bp, y(n-i»bp,
(6.25)
whereas the membership functions of Ni are defined by
(6.26)
The parameters specifying the shapes are listed in Table 6.4. The product fuzzy AND operator is used in the rules, and the centroid defuzzifier is used (i.e., (X = 1). Question: Is this fuzzy system model stable around y(n) = O?
198
Chapter 6 •
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems Membership
y(n-l)
Figure 6.6 Illustrative definitions of the six fuzzy sets used in Example 6.9. The mathematical definitions are given in (6.25) and (6.26), with the parameter values being listed in Table 6.4. TABLE 6.4 Parameter Values for Defining the Six Membership Functions Used in Example 6.9. ap
Po PI 1'2
No Nl N2
bp
-1 0.8 -1.1 1.7 -1.1 1.3
kp
dp
0.5556 0.3571 0.4167
0.5556 0.3929 0.4583
aN
bN
-0.7 0.9 -0.6 1.4 -0.6 1
kN
dN
-0.625 -0.5 -0.625
0.5625 0.7 0.625
Solution According to Theorem 6.5, this TS fuzzy dynamic system model is a nonlinear time-varying ARX system: yen + 1) -
2
L
;=0
O;(y(n»y(n - i) =
1
L
z=o
lfJz(y(n»u(n -l).
In order to obtain the corresponding linearized system: yen + 1) - Oo(O)y(n) - 01(O)y(n - 1) - 02(0)y(n - 2) = lfJo(O)u(n)
+ lfJl (O)u(n -
1),
we first need to determine whether the nonlinear system is linearizable aty(n) = O. We can actually find this out without explicit expressions of Oi(y(n» and lfJz(y(n». The nonlinear system is linearizable because: (1) all the membership functions for y(n),y(n - 1), andy(n - 2) are differentiable aty(n) = 0, and (2) Jlj(y(n» yielded by product AND fuzzy logic operations are differentiable at yen) = o. As a result, lfJz(y(n» are differentiable aty(n) = o. The values of Oi(O) and lfJz(O) can easily be computed using (6.18), and the resulting linearized system at yen) = 0 is: yen + 1) + 3.4555y(n) + 4.462Iy(n - I)
+ 1.9681y(n -
2) = 0.669u(n) + 0.0459u(n - I).
The corresponding z-transform equation is
; + 3.4555~ + 4.4621z + 1.9681 = O. -0.9342 and z = -1.2606 ± 0.7194i. The last two roots
The three roots are z = are outside the unit circle. Hence, this TS fuzzy dynamic system is unstable aty(n) = O. Figure 6.7 shows the system output
199
Section 6.13. • Design of Perfect Tracking Controllers for General TS Fuzzy Models 7
I
I
6-
-
5 4f-
i
!
~2
LL
~ '5
!
-
3f~
1~ O~
-1
•
.. .. .. ..
• • •
.
• •
-
~
-2 -3
-
I
0
2
4
f
I
6 8 Time Index n
..
-
12
14
I
10
Figure 6.7 Simulated output of the TS fuzzy dynamic system given in Example 6.9, confirming its instability determined analytically by the necessary and sufficient stability condition. The initial system output is set at 0.0001.
when a very small initial value is given (y(0) = 0.0001). The system output diverges with time, clearly demonstrating instability and confirming the analytical result. If the actual physical system is stable, one then can be sure that the TS fuzzy system model is wrong because it is unstable. The model is invalidated then.
6.13. DESIGN OF PERFECT TRACKING CONTROLLERS FOR GENERAL TS FUZZY MODELS 6.13.1. Controller Design via Feedback Linearization Method System identification and controller design are two closely related issues in the theory and practice of control and modeling. Disclosing the analytical structure of the general TS fuzzy dynamic systems leads to the development of a systematic controller design technique for output tracking control of the general TS fuzzy dynamic systems (6.19). Assume that a general TS fuzzy system model accurately represents the physical system to be controlled. The model can be stable or unstable, depending on the actual system. The design objective is to make output of the general TS fuzzy dynamic system achieve perfect tracking of any bounded, time-varying trajectories, Sen). In other words, the design is to produce such controller output that yen) = Sen) all the time (i.e., perfect tracking). Another
Chapter 6 •
200
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
important design requirement is that output of the designed controller must always be bounded, even when n ~ 00. The principle underlying the design method in this section is feedback linearization, a well-established nonlinear controller design technique (e.g., [67][77]). The essence of this technique is using feedback to cancel internal nonlinearities of the system to be controlled and making the closed-loop control system linear so that linear controller design techniques can be used. Based on the above-stated conditions, at time n, we know Sen + 1), u(n - 1), ... , u(n - p),y(n), ... ,yen - m), and we can calculate the values of Oo(y(n», ... , Om(y(n», cpo(y(n», ... , cpp(y(n». To be general and realistic, supposedly we do not know the explicit expressions of lJo(y(n», ... , Om(y(n», cpo(y(n», ... ,cpp(Y(n». (Indeed, one is not able to obtain them in many cases.) Assume that cpo(y(n» =I- 0 for any n, meaning that fuzzy system output always depends on fuzzy system input. Using feedback linearization, we choose the tracking controller for the general TS fuzzy dynamic systems (6.19), as follows: u(n)
=
qJo
1 (y(
n
» ( - Lm (}jCv{n»y(n ;=0
i) -
Lp If'/(y(n))u(n -I) + S(n + 1))
1=1
·
(6.27)
Substituting (6.27) into (6.19) results in output of the closed-loop fuzzy control systems as
yen + 1) = sen
+ 1),
for any n.
This means that the perfect tracking has been achieved, and it starts from the beginning of the control, that is, from time n = o. Whether a controller so designed can achieve perfect tracking depends on how accurate the model is; it can be achieved if the model accurately describes the dynamics of the physical system. Otherwise, the perfect tracking control performance cannot be guaranteed, owing to incomplete cancellation of the system's nonlinear dynamics. The extent of the performance degradation relates to the degree of mismatch between the fuzzy model and the real system. The issue here is the robustness of the resulting physical control system. This issue is not peculiar to control of the TS fuzzy systems; rather, it is a general, difficult, and still open issue in nonlinear control. It has hardly been addressed [67].
6.13.2. Stability of Designed Controllers A controller designed by the above feedback linearization technique can always achieve perfect tracking for any given trajectory, starting at time as early as n = O. However, the controller output mayor may not be bounded, that is, the controller is not guaranteed to be stable. A controller is practically meaningless if its output is not bounded because such a controller cannot physically be realized. We now study what determines stability of the controller and under what conditions the controller is stable or unstable. For better presentation, we divide general fuzzy systems (6.19) into two groups: those with p = 0 and those with p ~ 1. We study their stability accordingly. According to (6.19), the general TS fuzzy dynamic systems withp = 0 are described by
yen + 1) -
m
L
;=0
fJ;(y(n»y(n - i) = CPo(y(n»u(n).
Section 6.13. • Design of Perfect Tracking Controllers for General TS Fuzzy Models
201
This class of fuzzy systems is widely used in the theory and practice of fuzzy control and modeling. Using (6.27), we find that controller for these fuzzy systems is
u(n)
= q>o~n»
(-
~ OJ(y(n))y(n - i) + S(n + 1)).
Because a desired trajectory S(n) is always bounded and y(n - i) = S(n - i) for i = 0, ... , m,y(n - i) are bounded, too. Thus, u(n) is always bounded, and the controller is always stable. We now study the controller stability for the general TS fuzzy dynamic systems with p 2:: 1 in (6.19). For this group of fuzzy systems, if a desired trajectory constantly varies, the controller output will, too. Because of the time-varying and nonlinear nature of the fuzzy systems, it is difficult to analyze the controller stability if the desired trajectory endlessly changes. A related important question is: If a desired trajectory does not change forever, say it is only a step function, will the controller designed be guaranteed always stable? The answer, as we will show now, is no. Assume that a desired trajectory has a final, fixed position. Our tracking control task is to make output of the general TS fuzzy dynamic systems with p 2:: 1 follow the trajectory to reach this final, fixed position within a finite period of time. One example of such tracking control is to park a car, and another one is to reach a still object by a robot arm. Without loss of generality, let us assume that the desired trajectory varies with time before time L and becomes unchanged thereafter. Mathematically, the desired trajectory is described by a time series: S(O), S(I), ... , S(11), Sf' Sf' ... , where Sf is the final, fixed position and S(n) = Sf when n > 11. Since a designed controller always achieves perfect tracking, output of the fuzzy systems is always Sf after time 11. This means that y(n) = ... = y(n - m) = Sf when n > 11 + m. In addition, when n > 11 + m, qJz(y(n)), and Oi(y(n)) in (6.27) become constants because y(n) becomes constant Sf (i.e., y(n) = · · . = y(n - m) = Sf). We denote ((Jz(Sf) and 0i(Sf) as respective values of ((Jz(y(n)) and Oi(y(n)) when n > 11 + m. Using all these facts, we find that the nonlinear time-varying controller (6.27) becomes a linear time-invariant controller when n > 11 + m: (6.28) In order for the controller to be stable (i.e., u(n) is bounded), all the roots of the ztransform equation of (6.28):
(6.29) must be inside the unit circle. Whether a controller is stable depends on ((Jz(Sf)' which are the parameter values of the fuzzy dynamic system when y(n) = Sf. The controller stability depends not only on the parameters of the fuzzy system but also on the final fixed position of the desired trajectory, Sf. For the same fuzzy system, it is possible that the controller is stable for one final position but unstable for another one. We show this point in Examples 6.10 and 6.11.
202
Chapter 6 •
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
For a stable controller, its output corresponding to Sf' designated as uf' can be computed by letting u(n - 1) = ... = u(n - p) = uf in (6.28), which yields
"r =
(1 - Eo
();(s/)
)s/
p .
L
1=1
(6.30)
CPl(Sf)
If the denominator is replaced by CPl(Sf)' uf computed will be for the general TS fuzzy systems with p = 0, meaning (6.30) contains the steady-state controller output for those fuzzy systems as a special case. Controller output will reach and stay at uf after time '1 + m for the fuzzy systems with p = o. For the fuzzy systems with p ~ 1, controller output will reach and stay at uf after time '1 + r, where r > m. According to (6.28), the size of r depends on how stable the controller is, which is determined by ((Jl(Sf). The more stable the controller, the smaller the 'to Requiring that all the roots of (6.29) be inside the unit circle is equivalent to requiring that the general TS fuzzy dynamic systems be minimum-phase systems when y(n) = Sf. (Note that the fuzzy systems become linear time-invariant systems when y(n) = Sf.) A discrete-time system that has open-loop zeros outside the unit circle is defined as a nonminimum-phase system [124]. Otherwise, the system is said to be a minimum-phase system. All the fuzzy systems with p = 0 are minimum-phase systems, regardless of the desired trajectory. As such, controllers designed using the feedback linearization method are always stable. A fuzzy system withp ~ 1 belongs to one of the three situations: (1) it is a minimumphase system for any value of Sf' (2) it is a nonminimum-phase system for any value of Sf' and (3) it is a minimum-phase system for some values of Sf and a nonminimum-phase system for the remaining values. We summarize these controller stability results in theorem form as follows:
Theorem 6.8. Tracking controller (6.27) designed for the general TS fuzzy dynamic systems (6.19) withp = 0 is always stable for any bounded, time-varying trajectory. Tracking controller designed for a fuzzy system with p ~ 1 is stable at a given Sf if and only if the fuzzy system is a minimum-phase system at Sf. Since a designed control system always achieves perfect tracking, the controller can be regarded stable between time 0 and '1 + r. If the system satisfies Theorem 6.8, it is stable for the rest of the time. Therefore, the control system is stable in a global sense, not in a local sense (i.e., around the origin only). For any given fuzzy system with p ~ 1, before utilizing the design method, one should use (6.29) to check the stability of the controller to be designed. If the controller is determined to be stable, then it should be designed. Otherwise, the desired perfect tracking is not achievable for the given fuzzy system because the stability condition stated in Theorem 6.8 is necessary and sufficient.
6.13.3. Numeric Examples In Example 6.10, we exhibit how to use the feedback linearization design method to design a stable controller for the unstable TS fuzzy system given in Example 6.9 to achieve perfect output tracking.
Section 6.13. •
Design of Perfect Tracking Controllers for General TS Fuzzy Models
203
EXAMPLE 6.10 Using the feedback linearization method, design a tracking controller for the TS fuzzy dynamic system in Example 6.9 so that output of the fuzzy system perfectly follows the following trajectory (Fig. 6.8): S(n) = { 0.8 sin(3nn/100), 0.4 ,
0::; n s 50, 51 s n .s 100.
Is the designed controller stable? Solution Before designing the controller, one should use (6.29) to determine whether the controller to be designed will be stable. According to the given trajectory, the final fixed position is: Sf = 0.4. Based on (6.29), the z-transform equation for the controller stability determination is (fJO(Sf)
+ (fJt(Sf)z-t = 0
whose root is
-'-_----=:-_--=:-_--:=-_--:':::--_-:::-_---::.
-1 l--_--L._ _...l.-_---l._ _
o
10
20
30
40
50 60 Time Indexn
70
80
90
Figure 6.8 Output of the unstable TS fuzzy dynamic system controlled by an output tracking controller in Example 6.10, which is designed using the feedback linearization technique . Sign 0 represents the desired output trajectory, whereas sign + represents the fuzzy system output. The figure shows that perfect tracking is achieved . Note that the final fixed position of the desired trajectory, Sf' is 0.4.
100
Chapter 6 •
204
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
It can be calculated easily from the given TS fuzzy system that (fJo(Sf) = 1.4641 and (fJl (Sf) = 1.2623, and hence the root is z = -0.8622. This indicates that the fuzzy system is a minimum-phase system when y(n) = Sf = 0.4, for n > 50. Thus, the tracking controller to be designed will be stable. The tracking controller is u(n)
= f/Jo~n»
(-
~ Bj(y(n»y(n -
i) - f/Jl(v(n»u(n - 1) + r(n
+
1)).
According to (6.30), the steady-state output of the designed controller at Sf is
From the given fuzzy system, we compute the values of (J;(Sf) and (fJ/(Sf) as (JO(Sf) = -3.9851, (Jl(Sf) = -5.5249, (J2(Sf) = -2.0732, (fJo(Sf) = 1.4641, and (fJl(Sf) = 1.2623. Consequently, uf = 1.8461. Figure 6.8 displays the system output along with the desired trajectory. The trajectory is always perfectly tracked. The corresponding controller output is exhibited in Fig. 6.9. The controller is stable, and indeed the steady-state output is 1.8461, as calculated. 50 r-----~---r----r---.,..---.,.__--__--....._--_--__--_..
40 30
-10
-20
-30---..I..---..a---""'----..a.---..a.---..a.---.......- -........--~-- ..... o 100 80 10 70 30 40 50 80 90 20 Tim. Index n Figure 6.9 Output of the output tracking controller designed using the feedback linearization technique in Example 6.10. The controller is stable, confirming the result of the analytical determination. The steady-state output of the controller is 1.8461, the same as the value computed using (6.30).
Section 6.13. • Design of Perfect Tracking Controllers for General TS Fuzzy Models
205
In the next example, we show that the controller designed in Example 6.10 becomes unstable for the same fuzzy system at a different value of Sf. EXAMPLE 6.11 In Example 6.10, if the final fixed position of the desired trajectory is 0.7 instead of 004, for 51 :::: n :::: 100, will the designed controller still be stable?
Solution
Now Sf = 0.7. One can calculate that CPO(Sf) = 1.2081 and CP!(Sf) = 1.4867, and hence the root is z = -1.2307 (outside the unit circle). Thus, the fuzzy system becomes a nonminimum-phase system when y(n) = Sf = 0.7, and consequently the designed controller becomes unstable for the new final trajectory position. Although the perfect tracking is still achieved, as shown in Fig. 6.10, the controller output grows without bound and the controller is unusable (Fig. 6.11), as predicted.
0.8
~ 'Iii
Ell Ell Ell
Ell
0,4
$
~
$
i
0.2
u..
e Ell
e
~
I
DE
r>.
'1)
0.6
Ell Ell
6)
$
Ell $ $
e Ell $
Ell Ell
8 -0.2 o
i-
O ,4
-0.6
(fl
Ell $
E!' Ell $ III III Ell
Ell,
-0.8 -1 L--_ _L-_---.JL-_---l_ _--.l._ _-..L_ _--L_ _- L_ _-'--_ _-'--_ _- ' 40 50 60 70 80 90 100 10 30 o 20 lime Index n
Figure 6.10 Output of the unstable TS fuzzy dynamic system controlled by an output tracking controller in Example 6.11, which is designed in Example 6.10 using the feedback linearization technique. Sign 0 represents the desired output trajectory, whereas sign + represents the system output. The figure shows that perfect tracking is achieved. Note that the final fixed position of the desired trajectory, Sf' is 0.7 instead of 0.4 as shown in Fig. 6.9 for Example 6.10.
Chapter 6 •
206
Stability Analysis and Design of Mamdani and TS Fuzzy Control Systems
2500 2000 1500 1000
i
500
~
I
0 -500
-1000 -1500 -2000
0
10
20
30
40
50 80 Time Indexn
70
80
90
100
Figure 6.11 Output of the tracking controller in Example 6.11. Because of the change of the final position of the desired trajectory from 0.4 in Example 6.10 to 0.7 in Example 6.11, the controller becomes unstable, as predicted by using (6.29).
6.14. SUMMARY Necessary and sufficient local stability conditions are derived for the Mamdani and TS fuzzy control systems. The conditions can be used not only for determining stability but also for designing (locally) stable general fuzzy systems. Only minimal system information is required (i.e., the system's linearizability and analytical structure around the equilibrium point). The conditions are sometimes usable even without system models. Bmo stability conditions for the Mamdani and TS fuzzy PI/PD control systems are also established. Based on the limit structure of the fuzzy controllers with linear fuzzy rules, a three-step design procedure and practical tuning guidelines are developed for designing nonlinear Mamdani fuzzy controllers with nonlinear rules to control nonlinear systems. General TS fuzzy models and filters are proved to be nonlinear ARX models and nonlinear FIR/IIR filters, respectively. A local stability criterion is established, and it can be used to invalidate a TS fuzzy model as a means of model quality test. Using feedback linearization technique, we can design stable controllers to achieve perfect output tracking control of the TS fuzzy models.
Exercises
207
6.15. NOTES AND REFERENCES Local stability of the Mamdani fuzzy control systems (Sections 6.3 and 6.4) was first studied in [254] and was then extended to cover the TS fuzzy PID control systems (Section 6.5) [269][270]. BIBO stability of fuzzy control systems was first investigated in [36] for the Mamdani fuzzy PI controller (Section 6.6). Then, it was studied in [55] for the simple TS fuzzy PI control systems (Section 6.7) and in [56] for more general TS fuzzy control systems. The design techniques in Sections 6.8 and 6.9 were developed respectively in [259] and [265]. The relationships in Sections 6.10 and 6.11 were established in [268][272]. The results in Sections 6.12 and 6.13 are from [272]. Stability analysis and design of fuzzy control systems are important subjects, and many investigators have made much effort with abundant results. The bibliography provides a partial list of the publications.
EXERCISES 1. Regardless of the type of controller involved, classical or fuzzy, what are the necessary conditions for global stability study? Can these conditions be satisfied in practice by fuzzy control systems? 2. What are the pros and cons of studying the local stability of (fuzzy) control systems, as opposed to global stability?
3. How do you determine whether a fuzzy controller is continuously differentiable (i.e., linearizable) at an equilibrium point? For the fuzzy controllers studied in Chapters 3 to 5, which fuzzy controllers are linearizable and which are not? 4. Perform the calculations in all the numeric examples in this chapter. The details and every step are required.
5. Use the design technique in Section 6.8 to design a Mamdani fuzzy control system that interests you. 6. Utilize the design method in Section 6.9 to build a TS fuzzy control system that is not only (locally) stable but also well-performing. 7. General TS fuzzy filters are nonlinear FIR/IIR filters. What are the possible benefits of such nonlinear filters?
8. Modify the parameters of the fuzzy model in Example 6.9 so that it becomes locally stable. 9. What are the pitfalls for a controller designed based on the feedback linearization method? To find out how robust the controller designed in Example 6.10 is, modify some of the model parameters in Example 6.9. Does the control performance deteriorate substantially?
10. In Section 6.13.3, design a controller to control the same TS fuzzy model but to achieve perfect output tracking of different reference trajectories.
Mamdani and TS Fuzzy Systems as Functional Approximators
7.1. INTRODUCTION A system capable of uniformly approximating any continuous function is called either a functional approximator or a universal approximator. In mathematics, the term functional approximator is widely used, whereas in the fields of fuzzy systems and neural networks, the convention is to use universal approximator. We use both terms interchangeably. In this chapter, we study fuzzy systems, including fuzzy controllers and fuzzy models, as universal approximators.
7.2. FUZZY CONTROLLER AND FUZZY MODEL AS FUNCTIONAL APPROXIMATORS Up to this chapter, we have studied a variety of Mamdani and TS fuzzy controllers and models. As far as system input-output relationship is concerned, the role that a controller or model plays is mathematically the same: It provides nonlinear functional mapping between input and output of the controller or model. This point can be understood by comparing (2.27) with (2.32) for Mamdani controllers/models and (2.30) with (2.34) for TS controllers/ models. The mathematical meaning of these paired systems is identical. In this chapter, we use a generic termfuzzy system to represent either a fuzzy controller or a fuzzy model and to investigate functional approximation capabilities of fuzzy systems. The issue of universal approximation is crucial to fuzzy systems. In the context of control, the question is whether a fuzzy controller can always be constructed to uniformly approximate any desired continuous, nonlinear control solution with enough accuracy. For modeling, the question is whether a fuzzy model can always be established which is capable of uniformly approximating any continuous, nonlinear physical system arbitrarily well. These 209
210
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximators
are qualitative questions. If the answers to them are yes, the more meaningful and quantitative issues are as follows. First, what are the conditions, necessary or sufficient, for the fuzzy systems, Mamdani type and TS type, to be functional approximators? Second, given a continuous function, how can a fuzzy system be designed to uniformly approximate it with a required approximation accuracy? More specifically, how should each component (e.g., input fuzzy sets, fuzzy logic operators and fuzzy rules) be selected? Third, what are the strengths and limitations of fuzzy systems as functional approximators? Last but not least, is Mamdani type better or worse than TS type as a functional approximator? The answers to these questions are of both theoretical and practical importance. Iffuzzy systems are proved to be universal approximators, then one may feel more comfortable in utilizing them as controllers and models. The answers can also lead to more effective design techniques for fuzzy controllers and more efficient selection of structure and parameters for fuzzy modeling. This chapter provides answers to all these questions.
7.3. POLYNOMIAL APPROXIMATION OF CONTINUOUS FUNCTIONS Functional approximation is a matured field in classical mathematics after longtime extensive studies (e.g., [41][174]). Well-known approximation techniques include the Taylor expansion, Fourier expansion, and polynomial approximation, to name a few. We now briefly review the polynomial approximation, as it will be used in this chapter. The foundation of polynomial approximation is the Weierstrass Approximation Theorem, which states as follows (e.g., [18]). To any function t/J(x), which has M independent variables X; E [a;,b;] and is continuous in [al,b 1 ] x ... x [aM,bM], and to any error bound 8 > 0, there exists a polynomial P(x) such that liP -
t/JII
= max IP(x) - t/J(x) I < X; E[a;
p;l
8.
The order of P(x) is related to t/J(x) as well as the magnitude of 8. For any given t/J(x) and 8, P(x) can be calculated precisely through various techniques (e.g., [41]). The Taylor expansion is one of these techniques and is a relatively simpler one. The other techniques are mathematically better but also more complicated. Throughout this chapter, we use the following notation for a polynomial: M
LA;
= d,
;=1
where d is the order of P(x). More concisely, M
Ld;~d. ;=1
(7.1)
Section 7.4. • Sufficient Approximation Conditions for General MISO Mamdani Fuzzy Systems
211
7.4. SUFFICIENT APPROXIMATION CONDITIONS FOR GENERAL MISO MAMDANI FUZZY SYSTEMS
7.4.1. Formulation of General Fuzzy Systems We now investigate whether the general Mamdani fuzzy system (4.16) is a universal approximator. For notational convenience, we drop all the scaling factors K!1u and a, in (4.13). We then replace the left side of (4.16) by F M(X) and obtain
(7.2)
Here F M{X) signifies, with the subscript, that the system is of Mamdani type and is a function of input variable vector x. Without loss of generality, assume that L = 1 and thus Xi E [-1, 1] for i = 1, ... , M. This means F M{X) is defined over eM[ -1, 1], M dimensional product of [-1,1]. Accordingly, P{x) is supposed to be any multivariate polynomial defined over eM[-1,1]. For better notation, we will use Xi and 'OJ to represent xi{n) and 1I1{n), respectively, and we will use n in the place of J. Be careful that n in this chapter represents an integer, not sampling time as in other chapters. The meanings of the rest of the notations stay the same as those given in Section 4.10.
7.4.2. Statement of Approximation Problems The following two issues are resolved in this section: 1. Given
IIFM
-
any
continuous
t/JllcM[-l,l]
function
.p{x)
and
8,
can
FM{x)
achieve
< 8?
2. If it can, how many fuzzy rules should be used and how should all the other system components be determined? We now develop a two-step approach to address the first issue. The key is to use polynomial as a "bridge" to connect two proof steps. In the first step, we prove FM(X) to be capable of uniformly approximating P{x) to any degree of accuracy. In the second step, the Weierstrass Approximation Theorem is utilized to prove that FM{X) can uniformly approximate t/J{x) with arbitrary precision.
7.4.3. Uniform Approximation of Polynomials by General Fuzzy Systems We first state the result as follows:
Theorem 7.1. F M{X) can uniformly approximate P{x).
212
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximators
We now constructively prove it. We use P(x) to construct fuzzy rules of F M(X). Specifically, letf(p) be a dth order polynomial with respect to Pi:
J(P) =
d~JL
d1" ' dM ·n
d
if{ ~t)
where L dt"'dM are integers calculated from Pdt ...dM of P(x): l
L dt"'dM = 10
X
Pdt ...dM
(7.3)
where A. is the smallest positive integer that makes all 10l x Pdt".dM integers. For instance, if P(x) = 1.2 + 0.23x1 + 1.542x2 + 0.07823x1X2, then Poo = 1.2, P10 = 0.23, POI = 1.542, and P11 = 0.07823. Thus, A. = 5. Consequently, L oo = 120,000, L 10 = 23,000, L 01 = 154,200, and L 11 = 7,823. Choosing such Ldt."dM is necessary because f(p) must be integer with respect to integer inputs Pi. Kin (4.14) can be computed as K = n
d
L
ILdt".dMI.
(7.4)
di~O
If one chooses (7.5) then
where
I!.. = n
(PI, ... ,PM).
\n
n
Recall that fuzzy rules are determined by f(P). For this reason, we call P(Pln) transformed fuzzy rules, where the transformation is realized via polynomial P(x) . The transformed rules can be derived directly from P(x) by replacing x with pin. The value of f(P) at p is always integer, but PepIn) does not have to be. Using the transformed fuzzy rules, we can neatly express FM(x) in (7.2) as follows:
FM(x) =
t ,u~(X,A).P(P + m=l
'UJ'
L
_
bm )
n
,u~(x,A)
m=l
and its calculation is simpler. At any time, the following is true: Pi -
n
Pi+ 1
~ Xi ~ - - ,
n
i = 1, ... , M
leading to
· Pi +1 1im -= 1·un Pi --=Xi'
n-+oo ni
n-+oo
n
(7.6)
Section 7.4. • Sufficient Approximation Conditions for General MISO Mamdani Fuzzy Systems
213
and hence · P 1un -=X.
n-+oo n
Therefore,
t
lim
Pr:,,(X,A).P(P + bm )
t ,u~(x,A)
m=l
n-+oo
n
= P(x).
m=l
This means that when the number of fuzzy sets or fuzzy rules is large, the general fuzzy systems will approach the polynomial, and, to the limit, will become the polynomial. We need to go a step further to prove the approximation to be uniform. To accomplish this, we will derive a formula that can calculate a positive integer n*, based on 8, such that for any n > n*,
t
m-l
max
-
x;E[-I,l]
Pr:,,(x,A).P(P + b m ) n ~
L
-P(x) <
8.
pr:,,(x,A)
(7.7)
m=l
For brevity, we will only prove M = 1 case; M > 1 cases can be treated similarly. WhenM= 1,
t ,u~(Xl,A)'P(PI + bl"')
max Xl
E[-l,l]
m-l
-
~ ""' L..." m=l
n
A) Pm Xl'
-P(Xl )
IX (
(7.8)
According to (7.6),
214
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximators
and we also note that
IXll .s 1 and (PI
+ II/n .s 1. Thus, for 1 s d l
~
d,
It :bl~rl_xfll ~ r- :bl~-X11IEtl :bl~rl-VX¥-ll 1
1
(7.9) Substituting (7.9) into (7.8), we get max XIE[-l,l]
IF(Xl) - P(xl)1 -s ! t (Ipd I·d
l) .
nd1=O
1
Therefore, if we choose
n* >
L~l (IPdJd
(7.10)
1) ,
F(Xl) will uniformly approximate P(Xl). Without showing the lengthy mathematical derivation, we provide the following formula for M > 1 cases: (7.11) Owing to different paths of derivation, (7.11) does not reduce to (7.10) when M = 1. In other words, (7.11) does not contain (7.10) as a special case.
7.4.4. General Fuzzy Systems as Universal Approximators So far, we have shown that the general Mamdani fuzzy systems can uniformly approximate any multivariate polynomial to any degree of accuracy. We are only halfway through and need to take the second step to prove that F M(X) can approximate any continuous function t/J(x). This part of the proof is easy. According to the Weierstrass Approximation Theorem, one can always find P(x) such that liP - t/J II < 81. Also, we have just proved that one can always find n* so that IIFM - PII < 82. Therefore, one can always find n*, 81 and 82' where 81 + 82 < 8, so that max IFM(X) - t/J(x) I = max IFM(X) - P(x)
x;E[-l,l]
x;E[-l,l]
:::: max IFM(X) - P(x)1 X;E[-l,l]
+ P(x) -
t/J(x)1
+ x;E[-l,l] max IP(x) -
t/J(x)1 <
8.
Thus, in a two-step, constructive approach, we have resolved the first approximation issue raised in Section 7.4.2 concerning the universal approximation capability of the general fuzzy systems. We state this result formally:
Theorem 7.2. F M(X) can uniformly approximate t/J(x).
Section 7.4. • Sufficient Approximation Conditions for General MISO Mamdani Fuzzy Systems
215
7.4.5. Sufficient Approximation Conditions We now address the second approximation issue in Section 7.4.2. Actually the result is already available in the process of dealing with the first issue; we have developed a way to construct fuzzy rules for approximating t/J(x) (i.e., the transformed fuzzy rules) and have established (7.10) and (7.11) to compute how many input fuzzy sets are necessary. (The number of fuzzy rules can be computed from n* as well.) All these constitute sufficient conditions for the general fuzzy systems to be universal approximators. Put them in theorem form:
Theorem 7.3. For any given uniformly approximate t/J(x):
8,
F M(X) constructed by the following procedure can
(1) Calculate P(x) according to t/J(x) and chosen 81' where Bl < 8, so that liP - t/JII < 81' (2) Calculate K and H using (7.4) and (7.5), respectively; the number of output fuzzy sets is then 2K + 1 and V = HIK. (3) Determine the transformed fuzzy rules from P(x) and then convert them to normal fuzzy rules throughf(P) = K·P(pln)/H. (4) Let 82 < 8 - Bl and compute n* using (7.10) for the SISO case or (7.11) for the MISO case. (5) Choose n to be the least integer larger than n*; then the number of input fuzzy sets for Xi is 2n + 1, the number of fuzzy rules is (2n + I)M, and S = lin. (6) Any fuzzy logic AND and OR operators and any fuzzy inference method may be used. From (7.10) and (7.11), it may seem desirable to use a large B2 and a small d in order to yield a smaller n*. Unfortunately, they cannot be achieved simultaneously. This is because, for a fixed 8, a larger B2 means a smaller Bl' which in turn results in a larger d. When B is very small, both 81 and 82 are very small, while d is very large, making n* very large. As an extreme, if B = 0, n* = 00. Using any integer larger than the number calculated by (7.10) or (7.11) to compute the number of fuzzy sets and fuzzy rules guarantees achievements of uniform approximation by the general fuzzy systems. Since an integer larger than n* is an upper bound, there exists an infinite number of them. But this is purely from a mathematics point of view. Practically, however, one should always use as few fuzzy sets and rules as possible. Thus, only the computed n* is the sensible upper bound because it is the smallest. We call this smallest upper bound the minimal upper bound. One should always use the computed n* (if it is an integer) or the integer just larger than the calculated n* (if n* is not an integer) to calculate the minimal upper bound. Depending on the function to be approximated, n* calculated by (7.10) or (7.11) could be conservative: a somewhat too large minimal upper bound. Overestimation is natural and inevitable as (7.10) and (7.11) are independent of membership functions, fuzzy logic AND and OR operators, fuzzy inference method and defuzzifier type. Formulas (7.10) and (7.11) represent sufficient conditions; they are neither necessary nor necessary and sufficient ones. Consequently, a smaller minimal upper bound could exist.
216
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximators
We show this point by deriving another formula that can compute a smaller (7.11). We start the derivation from (7.7),
t
m~ x;E[-I,l]
jjr:,,(X,A).P(P + b m )
m-l
-
w
L
n
];1 Jl~(x,A) w
_
than
-pw
,u~(x,A)
m=1
n*
(I
d'fo Pdl ...dM II
< max
M(p.'n* + D
w
- x;E[-I,l]
)d Il Mx/dI) i
b·
'PI
-
<
_
L
(7.12)
8.
jjr:,,(x,A)
m=1
According to (7.6),
L IPd} ...dMI di~O
~ ~
"
L...J
L
=
n (P' + b. M
i=1
IP
d, ...dM
I [nM .
,=1
r
(Pi
'n* lin
1
ae» di~1
Xi
+ (}i)/n, -
M
d
nX/ i=1
where 0 I
=L
di~O
~ (}i ~
1. Hence, M
IPd} ...dMI
1
n
i
(
Xi
i=1
+ b·lin -* (}.)d ' n
(1 + IbiPi - Oil)d -1] ~ " IP i
L...J
n*
d} ...dM
di~1
(}.I) ~ L (
Md·lb. L ""'* ' ( IPd} ...dMI i=1 n
di~1
I[nM . ,=1
(1 +
M
d
nX/ i=1
I
d.' n Ib i ",*- (}il) -
Md.)
IPd} ...dMI
L-1 . n
1]
(7.13)
i=1
Substituting this last expression into (7.12), we get 8
~
M d.) L ( IPd1...dMI ,=1 ~ n~ ,
di~1
and hence
To avoid possible confusion owing to the notations, we rewrite this expression as (7.14) Because of the minor approximation in the above derivations, n* calculated by (7.14) needs to be verified to make sure it is large enough. Expression (7.13) is the last step before the minor approximations are introduced, and we use it to derive the following inequality:
n
M ( Mx1 ~ L IPdl ...d) [M 1 )d ' L IPdl ...d) ,=1 Il xi + d·'Pln-* (}.)d Il ( 1 + n* -1, di?:.O ,=1 ,=1 i
1
which means
n*
i
i
]
I
d;~O
calculated by (7.14) can be checked against
L
~?:.O
IPd d 1
•••
MI[n(1
to ensure its magnitude is large enough.
~1
+~)di_l] < e n
(7.15)
Section 7.4. •
Sufficient Approximation Conditions for General MISO Mamdani Fuzzy Systems
217
In practice, fuzzy systems commonly use triangular, trapezoidal, or Gaussian input fuzzy sets, the Zadeh or product fuzzy logic AND operators, the Zadeh fuzzy logic OR operator, and the centroid defuzzifier. Under these specific constraints, how to numerically determine the smallest minimal upper bound or, ideally the exact number of fuzzy sets and fuzzy rules needed, is an interesting, important, but technically challenging research topic. A minimal upper bound found under these constraints is expected to be less conservative than that computed by (7.10) or (7.11).
7.4.6. Numeric Examples We now use two examples to illustrate Theorem 7.3 as well as the points made above. EXAMPLE 7.1 Design a fuzzy system of the general class by using the minimal upper bound to uniformly approximate the continuous function 1/J(z) = sin a/z defined on [-3,3], with error bound being (a) 8 = 0.2, and (b) 8 = 0.02.
Solution Let Xl = z/3 and consequently 1/J(XI) expansion, 1/J(XI)
= Sin3xI/3xI'
defined on [-1,1]. According to the Taylor
Sin3Xl2 = -3= I - 1.5X} + 0.675xI4 Xl
6
0.14464xI
+ 0.01808xI8 -
....
If we use the first three terms as a polynomial to approximate 1/J(XI)' the absolute value of the truncation error is less than 0.14464. We let 81 = 0.14464, and consequently 82
Obviously, d
= 0.2 -
81
= 0.05536.
= 4 (the truncated 1/J(XI) is fourth order) and P(XI) = 1 - 1.5~
Clearly, Po
= l,fJ2 = -1.5, n* =
1
82
and P4
+ 0.675x1.
= 0.675. Thus, A = 3. Using (7.10),
d ( ) 1 d~t IPdl I·dt = 0.05536 (1.5 x 2 + 0.675 x 4) = 102.96,
meaning the minimal upper bound should be chosen as 103. The transformed fuzzy rules are described by
pen
= 1 - 1.5(id3f + 0.675(id3t·
All the rest of the parameters can be calculated as follows: 2n + 1 = 207 input fuzzy sets and fuzzy rules; S = lin = 1/103, K = 1034 x 3175 = 3.573490472 x 1011 (note that the summation in (7.4) is 3175), H = 10-3 x 3175 = 3.175, V = HIK = 8.884870479 x 10- 12 , and the fuzzy rules are represented by .
I(pt) =
~P(P~) = nd.lO;'p(~t)
= 1.12550881 x 1011 - 1.59135 x 107p1
+ 675pj.
Any fuzzy logic AND and OR operators and any fuzzy inference method may be used.
218
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximators
In case (b) where 8 = 0.02 is desired, the following can be computed: d = 6,81 = 0.01808, and 82 = 0.00192, making n* = 3,421. Consequently, at least 6,843 fuzzy rules are needed. These upper bounds appear to be unreasonablely large. Since they represent sufficient conditions, not necessary ones, they can be conservative, and very conservative indeed in some circumstances. The numbers are large, but they hold regardless of shapes of fuzzy sets, fuzzy logic AND and OR operators, fuzzy inference method, and defuzzifier type. We will develop necessary conditions later. The results there indicate that a few input fuzzy sets and a dozen fuzzy rules may suffice for the approximation required in Example 7.1. Unfortunately, the exact numbers cannot be determined theoretically at present. When typical fuzzy system components are adopted, the number of fuzzy sets and rules actually needed could be (far) smaller than those computed by Theorem 7.3. EXAMPLE 7.2 Design a fuzzy system of the general class by using the minimal upper bound to uniformly approximate the following polynomial defined on C2 [ -1, 1] P(x)
with
6
= 0.52 + O.IXl + 0.38x2
- 0.06XlX2
= 0.1.
Solution Obviously, d = 2, {:Joo = 0.52, f:J1O = 0.1, POI thus 62 = 6 . Calculate n* based on (7.11):
Ldj
1
n* >
e d~O [
= 0.38, Pll = -0.06,
(
l.Bd1.. ·d)2i =M1
)
and A. = 2. Note that 61
=0
and
-1.Bo...ol ]
1 1 1 2 = QJ"(0.52 + 0.1 x 2 + 0.38 x 2 + 0.06 x 2 - 0.52) = 12. Thus, the minimal upper bound is 13, and the transformed fuzzy rules are described by
p(~) =
0.52 + 0.1
~~ + 0.38~~ -
0.06
;:;2.
P
The other parameters can be computed: 2n + 1 = 27 fuzzy sets for each input variable, 729 fuzzy rules, S = lin = 1/13, k = 132 x (52 + 10 + 38 + 6) = 17,914, H = 10-2 x 106 = 1.06, V = HIK = 5.9171 x 10-5 , and the fuzzy rules are represented by f(P) =
s-e
= 8788
+ 130p, + 494pz -
6p, ·pz.
Just as in the previous example, any fuzzy logic AND and OR operators and any fuzzy inference method may be used.
We now use an example to compare n* calculated by (7.14) with that by (7.11). EXAMPLE 7.3 For Example 7.2, calculate the minimal upper bound using (7.14) and compare the result with the one computed by (7.11).
219
Section 7.5. • Sufficent Approximation Conditions for General MISO TS Fuzzy Systems
Solution
n*
~ ~ L [(IPd1.. d) 1=1 tA) -IPo...ol] = 011• [0.52 + 0.1 x 1 + 0.38 (ldl~O
x 1 + 0.06(1 + 1) -
0.52]
= 6.
According to (7.15),
0.1 [(1 +~) - 1] +0.38[(1 +~) - 1] +0.06[(1 +~) (1 +~) - 1] = 0.10167 >
8
= 0.01.
So, we need to increase n* to 7, which makes B = 0.087. This minimal upper bound is much smaller than the one obtained in Example 7.2, which is 13. Consequently, all the other components of the fuzzy system are also more economic.
From this example, one sees that n* can be quite accurately estimated using (7.14) even when n* is as low as 7. The estimation accuracy improves as n* increases.
7.5. SUFFICENT APPROXIMATION CONDITIONS FOR GENERAL MISO TS FUZZY SYSTEMS 7.5.1. Sufficient Approximation Conditions We now extend the investigation to the general TS fuzzy systems described in (5.2): n _ j~ J1.j(x,A)(aoj
FTS(x) =
+ aljxl + ···+ aMjxM)
n
'
(7.16)
LJlJ(x,A) j=l
where the subscript TS stands for the TS type. For simplicity, Xi has replaced xi(n), and it is assumed that Xi E [-1,1] for i = 1, ... , M. Additional constraints are attached to the general TS fuzzy systems as follows. The interval [-1, 1] is partitioned into 2n equal intervals, each of which is [k/ n, (k + 1)/n] where k = -n, ... , n - 1. Over the 2n intervals, 2n + 1 fuzzy sets are defined for fuzzifying each variable. Membership functions of the fuzzy sets can be any continuous types, including, but not limited to, triangular, trapezoidal, Gaussian, and bell-shape types. Little restriction on the fuzzy sets is possible because, just as in Section 7.4, we will establish approximation conditions that are independent of the membership functions. Of the 2n + 1 fuzzy sets, one is defined over [-I,-(n - 1)/n], another over [(n - 1)/n,I], and each of the remaining 2n - 1 ones over [(k - 1)/n,(k + 1)/n], where -(n - 1) :::: k :::: n - 1. The fuzzy sets mayor may not be identical for different input variables or for the same input variable. To prove that the general TS fuzzy systems are universal approximators, we use the same two-step constructive approach developed in Section 7.4. The key is to use polynomial as a bridge to connect the two proof steps. We now accomplish the first step-proving that the general TS fuzzy systems can uniformly approximate any multivariate polynomial to any degree of accuracy.
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximators
220
For brevity and better presentation, we will prove the case of two variables (i.e., M = 2); the proof for more variables is similar. According to (7.1), a polynomial of two variables is
where d = Al + A2 is the degree of the polynomial. Supposing that P(XI, X2) is explicitly known, we use it to construct n = (2n + 1)2 fuzzy rules. The jth rule is
That is, we let the parameters in the jth rule be I I,j 12,j) ao·=P ( - , -
n
Y
alj
=
a2j =
n
IIJ
-PIO--
n
P0 1 12,j n
PIO POI·
Note that aij are still constants. Thus, F TS(XI ,X2) becomes
t
F TS(XI ,X2) =
1=1
2i) - PIO II,} - POI h} + PIOXI + POlX2)]
JlJ(x,A) [(p(IIJ ,I n
n
n
n LJlj(x,A)
n
·
(7.17)
j=1
Because at any time, L:
I... + 1
n
n
..!.d.. :::: Xi :::: _',_1__ ,
(7.18)
hence L . . Ii,j + 1 . II,j lim ..2L = lim - - = Xi' lim PIO n n-+oo n n-+oo n
n-+oo
= PIOXI
and
As a result, n (II. [,2 .) LJlj(x,A).P ~,~ .
.
Inn F TS(XI ,X2) = lim
n-+oo
n-+oo
j=I
n n LJlj(x,A)
n
= P(XI,X2)·
j=I
This means that when the number of fuzzy sets is large enough, the fuzzy systems will approach P(XI,X2) and, to the limit, will become it.
Section 7.5. • Sufficent Approximation Conditions for General MISO TS Fuzzy Systems
221
We now prove the approximation to be uniform. To accomplish this, we will derive a formula that can calculate a positive integer n", based on given 8, so that for any n > n*,
According to (7.17), this inequality is achieved when the following holds:
We are going to determine n* from it; note that
(7.19)
Due to (7.18),
t.,
0i,j
n
n
-=Xi--'
where 0
~ (Ji,j ~
fori= 1,2,
1, and
1"1
I(J··I < -. 1 x, - -!.!l.. = -!.L-
I' n n
n
Hence, for the second and third terms in the last part of (7.19), the following inequalities hold:
Ip (
/I,j)
10 XI - -
n
I < IPlol n
---
and
Ip01 (x2 -
/2,j) 1~ -nIPoII ·
--;:;
For the first part of (7.19), the following is true:
(7.20)
222
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximators
In the above derivation, the following relations are utilized:
Ix;I ~ 1, where 11 2:: 1, 1 1 ->n - n""
10i,jl
k _
L Cn k=O
k _ - (
n
2 where Cn
n
_
n! k)'k l • ..
Therefore, (7.20) becomes
LAl LA2 IPd d II( XI d =0 d =0 l
2
l 0 1 .)d ( X2 n
-!l...
I 2
-
02 n
.)d -xd1 d22I ~ -1 LAl LA2 IPd n d =0 d =0 2
1X
-!l...
l
2
d
1(2dl+d2 - 1).
I 2
Combining all these inequalities, we have
Hence, we have derived what we wanted: IPlol + IPoII
n*
~
Al
A2
+L L
IPdld21(2dl+d2 - 1) d - - - - - -l=Od2=0 --------s
(7.21)
By deriving this formula, we have actually completed the task of proving that the general TS fuzzy systems (7.16) can uniformly approximate any multivariate polynomials with arbitrarily high approximation accuracy.
Section 7.5. • Sufficent Approximation Conditions for General MISO TS Fuzzy Systems
223
The second step of the proof is straightforward and similar to what has been done with the general Mamdani fuzzy systems in Section 7.4:
max IFrs(x) - t/f(x)I = max IFrs(x) - P(x)
x;E[-I,l]
~
x;E[-I,l]
max IFrs(x) - P(x)1
X;E[-I,l]
+ x;E[-I,l] max IP(x) -
+ P(x)
- fjJ(x) I
fjJ(x)1 <
8.
This result also covers the general TS fuzzy systems with the simplified linear rule scheme because the new scheme is a special case of the original one (Section 5.6). That is, the general TS fuzzy systems using the simplified linear rule scheme are universal approximators as well [268]. Summarizing the results, we have
Theorem 7.4 For any given uniformly approximate fjJ(x):
8,
Frs(x) constructed by the following procedure can
(1) Find P(x) for the given t/f(x), and choose 81' where 81 < 8, so that liP - t/fll < 81. (2) Let 82 < 8 - 81 and compute n* using (7.21) (for M = 1 or 2 only). (3) Choose the least integer n larger than n*; the number of input fuzzy sets for Xi is 2n + 1, and the number of fuzzy rules is (2n + I)M, and (4) Any fuzzy logic AND operators may be used.
7.5.2. Numeric Example We now use a numeric example to illustrate the use of this theorem. EXAMPLE 7.4 What are the minimal upper bounds on the number of fuzzy sets and fuzzy rules for a TS fuzzy system of the general class to uniformly approximate
t/J(XbX2) = ~t+X2
where Xi
E
[-0.5,0.5],
with B < 0.2 or B < 0.1?
Solution The function t/J(x) =
ee on [-1, 1) can be approximated by the following polynomial: 191
13x2.x3
+"6 with a truncation error slightly less than 0.071. Hence, t/J(XI,X2) = eXt P(x)
= 192+x+
24
+X2
can be approximated uniformly
by the following third-order polynomial:
191 P(XI,X2) = 192 + Xl
13
13
13
1
1
1
1
+ X2 + 24 xi + 24 ~ + 12 xlx2 + 6xI + 6~ + 2xtx2 + 2XI~
with the same truncation error. We now use this polynomial to compute the minimal upper bounds on the number of fuzzy sets and fuzzy rules. Obviously, BI = 0.071. For B = 0.2, according to (7.21),
n* ::: 0.2 _10.071 [1
+ 1 + (1 + 1)(21 -
1) +
G~ + ~~ + ~~)(22 -
1) +
G+ ~ + 4+
4)(2
3 -
1)]
= 153.7. We choose n* = 154, and the minimal upper bounds on the number of fuzzy sets and fuzzy rules are 309 and 95,481 (i.e., 3092 ) , respectively.
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximators
224
For approximation accuracy 8 = 0.1, it is straightforward to compute n* ~ 683.9. We use n* = 684, and consequently the minimal upper bounds on the number of fuzzy sets and rules are 1,369 and 1,874,161, respectively. As expected, the higher the approximation accuracy, the larger the number of fuzzy sets and rules. One may wonder whether the minimal upper bounds computed will be different if a higher or lower order of polynomial is used to approximate the function. Indeed, they will be different, and we now continue the example to demonstrate this. t/!(Xl,X2) = e t +X2 can also be approximated by the following fourth-order polynomial:
with a truncation error slightly less than 0.024. That is, 81 = 0.024. It is easy to compute n* ~ 174.3 for 8 = 0.2 and n* ~ 403.6 for 8 = 0.1. The minimal upper bounds on the number of fuzzy sets are 351 and 809, respectively. The corresponding minimal upper bounds on the number of fuzzy rules are 123,201 and 654,481, respectively.
The reasons for the seemingly large minimal upper bounds are the same as those explained in Section 7.4 for the general Mamdani fuzzy systems.
7.6. NECESSARY APPROXIMATION CONDITIONS FOR GENERAL SISO MAMDANI FUZZY SYSTEMS
7.6.1. Problem Statement and Assumptions Accuracy of functional approximation by a fuzzy system depends not only on its system configuration-that is, selection of fuzzy sets, rules, logic operators, inference method and defuzzifier-but also on the characteristics of the function to be approximated. Given a continuous function, fuzzy approximation can always be achieved if the number of fuzzy sets and rules is allowed to be as large as needed, as shown in the last two sections. However, achieving higher approximation accuracy at the expense of a larger number of fuzzy sets and rules is desirable neither in theory nor in practice. One always wants to approximate a given function with as simple a system configuration as possible. Thus, the central and practical question is: What are the necessary conditions under which a fuzzy system can possibly be a universal approximator but with as minimal system configuration as possible? Unlike sufficient conditions, necessary conditions specify system component restrictions. For MISO fuzzy systems, the approximation problem can be stated as follows. Designate f as the family of M-input one-output continuous functions that have a finite number of extrema defined on the M-dimensional product space:
r
(7.22) Suppose that one is given the following: (1) an arbitrarily small approximation error bound B, and (2) a set of A distinctive extrema, (ml' ... ' m;), of an arbitrarily selected function t/J(x) E rf , taking place at x = H j = (h), ... , hf!) E (al,b 1) x ... x (aM,bM), j = 1, ... , A, and (3) values of t/J(x) at every "vertex" of 0. (There are a total of 2M such values.) Then,
Section 7.6. • Necessary Approximation Conditions for General SISO Mamdani Fuzzy Systems
225
the question is: What are the necessary conditions under which there always exists a MISO fuzzy system F(x), Mamdani type or TS type, that satisfies max IF(x) -1jJ(x)1 xeS
~
8?
(7.23)
As always, one needs to impose certain assumptions on 1jJ(x) before establishing necessary conditions for fuzzy systems, or any other types of functional approximators. Different assumptions require that different amounts of information be available. If too much information is required, a fuzzy system may not be necessary in the first place, since many other well-developed classical functional approximators, such as polynomial functions and spline functions, can be used to perform the approximation more efficiently. Bearing this point in mind, one would want assumptions to be as little restrictive as possible to achieve maximal practical applicability. In the rest of this chapter, we always only assume that a set of extrema of t/J(x) is known, which is probably the minimum amount of information necessary for characterizing the major features of a well-behaved continuous function. More importantly, such information can be gained in practice if the continuous function (i.e., system) is readily measurable. A related question of interest is the following: Given (1) all the extrema of a sequence of continuous functions t/Jk(x), which can have different numbers of extrema, and (2) a sequence of uniform approximation error bounds 8k' where 8k ~ 0 as k ~ 00, what are the necessary conditions under which there always exists a fuzzy system that satisfies max IF(x) -1jJk(x)1 :::; 8k' xeS
for all k?
(7.24)
Keeping these two questions in mind, we establish the necessary conditions first for general SISO Mamdani fuzzy systems and later for more complicated Mamdani and TS fuzzy systems.
7.6.2. Configuration of General Fuzzy Systems The general SISO Mamdani fuzzy systems are configured as follows. The interval [a,b], on which a continuous function t/J(XI) is defined, is divided into N subintervals:
a = Co < CI < C2 < ... < CN -
I
< CN = b.
The fuzzy systems have N + 1 continuous, convex, and normal fuzzy sets defined on the interval to fuzzify Xl. Each input fuzzy set is denoted as Ai whose membership function is J.li(XI). (For conciseness, we do not use J.lA.(XI).) J.li(XI) is nonzero only on [Ci- l, Ci+ l ]. Figure 7.1 shows the definitions of J.li(XI) graphically. Mathematically, J.li(xI) is 0 at Xl = Ci- l and increases monotonically on [Ci- l ,Ci- l + (1,i-I], where 0 < (1,i-1 ~ C, - Ci- l, and reaches 1 at Xl = Ci- l + (1,i-l; Jli(XI) is 1 on [Ci- l + (1,i-l, Ci+l - Pi+l], where 0 < Pi+l ~ Ci+l - C, , and decreases monotonically and becomes 0 at Xl = Ci+l. Jli(XI) is 0 when Xl is outside [Ci-I,Ci+I]. For the end points Co = a and eN = b, JlO(XI) is 1 on [CO,CI - PI], where o < PI ~ C I - Co, and then decreases monotonically to 0 at Xl = C I • CN is 0 at Xl = CN - I and then increases monotonically to 1 at Xl = CN - I + (1,N-I' where 0 < (1,N-I ~ CN - CN- I, and remains to be 1 until Xl = CN. Jli(XI) intersects once only with Jli-l (Xl) and Jli+l (Xl) and does not intersect with any other fuzzy sets. Q fuzzy rules are in the form of IF Xl is Ai THEN FM(XI) is Bg{i)'
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximators
226
Membership
o
Figure 7.1 Illustrative definition of input fuzzy sets for the general SISO Mamdani fuzzy systems.
where Bg(i) is a singleton fuzzy set whose membership value is 1 only at FM(Xl) = Vg(i). g is an arbitrary function relating the input fuzzy set to the output fuzzy set. As usual, the value of g at i must be integer. Because only one input variable is involved, the fuzzy logic AND operation is not needed. Using the centroid defuzzifier,
n
L FM(Xl) =
Jli(Xl)· Vg(i)
-i=-l-O----
L
(7.25)
Jli(Xl)
i=l
The SISO fuzzy systems defined here are general because (1) input fuzzy sets are quite arbitrary, (2) fuzzy rules are arbitrary, and (3) singleton output fuzzy sets are not equally spaced.
7.6.3. Lemmas for Establishing Necessary Conditions For clearer and more concise proof of the conditions, we first need to establish the following lemmas. Lemma 7.1. FM(Xl) is continuous on [a,b] if and only if fuzzy rules "IF Xl isA i THEN FM(Xl) is Bg(i)" and "IF Xl is A i+l THEN FM(Xl) is Bg(i+l)" are assigned to each subinterval [Ci,Ci+l] for i = 0, ... , N - 1. To prove this lemma, without losing generality, assume Xl E [Ci,Ci+I ] . Only fuzzy sets Ai and A i+ l are nonzero. Hence, only the following two fuzzy rules are activated: IF Xl is Ai THEN FM(Xl) is Bg(i) ,
(7.26)
IF Xl is A i+l THEN FM(Xl) is Bg(i+l). Consequently (7.27)
Section 7.6. • Necessary Approximation Conditions for General SISO Mamdani Fuzzy Systems
227
where
( )
lli(X,)
1
x, = lli(X,) + lli+'(X,) = 1 + lli+'(X,) '
(7.28)
Jli(XI)
which satisfies 0 ~ qJ(XI) ~ 1, for all Xl E [Ci,Ci+I]. Because Jli(XI) and Jli+I(XI) are continuous on [Ci,Ci+I],FM(XI) is continuous on [Ci,Ci+I].
Lemma 7.2. Suppose that [a,b] is divided into N subintervals, [Ci,Ci+I], where i = 0, ... , N - 1. FM(XI) is continuous on [a,b] if and only if two fuzzy rules in the form of (7.26) are assigned to each of the N subintervals. Thus, N + 1 distinct fuzzy rules are necessary (n = N + 1). This statement is obvious. If there exists one subinterval to which no more than one fuzzy rule is assigned, then Xl on the subinterval cannot be mapped to FM(XI)' Therefore, if FM(xI) is continuous, in order for FM(XI) to map every Xl E [a,b], it is necessary to have two fuzzy rules of (7.26) type to map Xl E [Ci,Ci+tl to FM(XI), for all i. That means that N + 1 distinct fuzzy rules are needed, that is, n = N + 1. On the other hand, once each subinterval is assigned two fuzzy rules, FM(XI) is guaranteed to be continuous according to Lemma 7.1.
Lemma 7.3. Assuming Vg(i) # Vg(i+l)' when the conditions set in Lemma 7.1 are met, FM(XI) is either monotonically increasing or decreasing on [Ci,Ci+l] for i = 0, ... ,N - 1. This should be easy to see. As Xl increases from C, to Ci+l, Jli(XI) decreases monotonically from 1 to 0 and Jli+I(XI) increases monotonically from 0 to 1, resulting in a monotonic increase of Jli+l(XI)/Jli(xI) in (7.28). Consequently, qJ(xI) monotonically decreases from 1 to O. According to (7.27), if Vg(i) > Vg(i+l) , FM(XI) decreases monotonically as Xl increases from C, to Ci+l. Otherwise, FM(XI) increases monotonically as Xl increases. We observe that FM(XI) is a continuous, convex function on [Ci,Ci+l] for all i. In Lemma 7.3, the assumption of Vg(i) # Vg(i+l) is necessary because when Yg(i) = Vg(i+l)' the two fuzzy rules in the form of (7.26) will have the same output fuzzy set Bj for two different input fuzzy sets, resulting in FM(XI) == Vg(i) instead of a monotonic function on [Ci,Ci+I]. This situation is avoided in Lemma 7.3, and "'(Xl) is not assumed to be a constant on [Ci,Ci+I]· Lemma 7.4. At Xl = Ci, FM(xI) = Vg(i) for i = 0, ... , N. This is true because when Xl = Ci, Jli+l(Xl) = 0, resulting in qJ(XI) = 1. As a result, FM(xI) = Vg(i)'
7.6.4. Necessary Approximation Conditions Having preparing these lemmas, we are now in a position to establish some necessary conditions for the general SISO fuzzy systems as universal approximators of the minimal system configuration.
Theorem 7.5. Given that A. distinct extrema of "'(Xl) are ml' ... , ml taking place at hI' ... , h1, the following necessary conditions must simultaneously be satisfied in order for the general SISO fuzzy systems (7.25) to achieve approximation (7.23) with minimal system configuration:
228
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximators
(1) [a,b] must be divided into at least A + 1 subintervals. That is, N :::: A + 1. (2) A + 1 of the N subintervals must be such that Co = a, C, = hi (1 :::: i :::: A) and Cl + I =b. (3) Two fuzzy rules in (7.26) must be assigned to each subinterval [Ci,Ci+ l ] for all i = 0, ... , A. That is, the number of fuzzy rules Q = A + 1. Also, Vg(i) must be so chosen that it satisfies
m, -
B :::: Vg(i) ::::
m, + B,
for i = 1, ... , A.
To prove this theorem we use contradiction argument to show that N :::: A + 1 (i.e., condition (1)) is necessary. Suppose that N < A + 1. Let the partition of [a,b] be
Then there must exist at least one subinterval, say [Dj,Dj+ I], on which t/!(XI) is nonmonotonic. That is, t/!(XI) has at least one extremum inside the subinterval but not at the two end points, Dj and Dj + l . Without losing generality, assume that there is one maximum, mh (1 :::: h :::: A), at Xl = D* E (Dj,Dj+ I). Suppose, for an arbitrarily small approximation error bound B, the following inequality holds:
This implies that the following three inequalities must hold simultaneously: IFM(Dj) - t/!(Dj) I .s IFM(D*) - mhl ::::
(7.29)
B,
(7.30)
B,
IFM(Dj+ l) - t/!(Dj+ l) I ::::
B.
(7.31)
However, that mh is a maximum means mh > t/!(Dj) and mh > t/!(Dj+ l). Hence, t/!(XI) increases monotonically on [Dj,D*] and decreases monotonically on [D* ,Dj+ l]. According to Lemma 7.3, FM(XI) is monotonic on [Dj,Dj + I]. If FM(XI) increases monotonically, then inequalities (7.29) and (7.30) may hold for any B, but inequality (7.31) cannot hold at the same time if B is small enough. Similarly, ifFM(XI) decreases monotonically, then inequalities (7.30) and (7.31) may hold for an arbitrarily small B, but inequality (7.29) cannot be true simultaneously for small enough B. In either case, inequalities (7.29), (7.30), and (7.31) cannot be true simultaneously. This analysis is also clear geometrically. The contradiction means that [a,b] must be divided into at least A + 1 subintervals. That is, N :::: A + 1, which is the necessary condition (1). Furthermore, according to the above analysis, when N = A + 1, the subintervals must be divided in such a way that t/!(XI) reaches its A extrema only at Xl = hi (i = 1, ... , A). That requires C, = hi to form A + 1 subintervals, [Ci,Ci+ I ] , for i = 0, ... ,A, which is necessary condition (2). Now let us analyze the necessity of condition (3). First, according to Lemma 7.2, it is necessary to assign two fuzzy rules in (7.26) to each subinterval [Ci,Ci+ l ] for i = 0, ... ,A so that F M(xI) is a continuous function. Moreover, to realize the approximation (7.23), the following inequality must be satisfied:
Section 7.6. • Necessary Approximation Conditions for General SISO Mamdani Fuzzy Systems
229
According to Lemma 7.4, this inequality can be rewritten as
IVg(i)
- mil
.s 8,
or m, -
8 ~
Vg(i) ~ mi. + 8,
for all i.
This completes the proof of Theorem 7.5. According to Theorem 7.5, selection of Vg(i) of fuzzy set Bg(i) directly depends on approximation error bound 8. The smaller the 8, the narrower the range of Vg(i) value. To a limit, Vg(i) = mi for all i when 8 = O.
7.6.5. Strength and Limitation of SISO Mamdani Fuzzy Systems as Functional Approximators Theorem 7.5 sheds some light on the strength and limitation of the general SISO Mamdani fuzzy systems as universal approximators. Note that N relates to A in a certain way. Specifically, the number of fuzzy rules N increases with the rise of the number of extrema of t/!(XI), A. Therefore, if A is a small number, N can be a small number. Better yet, N does not relate to 8. These observations suggest that, even if a given 8 is very small, a small number of fuzzy rules may suffice to uniformly approximate those continuous functions that have a complicated formulation but a relatively small number of extrema. This insightful analysis offers a possible explanation for the fact that the majority of practically successful fuzzy controllers and fuzzy models only had to use a small number of fuzzy rules to accomplish the objectives. On the other hand, the limitation of the fuzzy systems is also exposed by the fact that the number of fuzzy rules needed increases with the increase of A. A large number of fuzzy rules are necessary for uniform approximation of functions that are simple but have a lot of extrema. For instance, a simple function like t/!(XI) = Sin(nxl) has 21nl extrema on [O,2n]. If Inl is large, a large number of fuzzy rules are needed. Thus, the fuzzy systems are not ideal functional approximators for periodic or highly oscillatory functions. Although 8 and N in general are not related, there are some situations in which 8 and N can be tightly related. Use of the triangular input fuzzy sets, shown in Fig. 7.2 is one such special situation. When the triangular fuzzy sets are used, J.li(XI) + J.li+I(XI) = 1 on [Ci,Ci+ l] for all i. Hence, q>(XI) = J.li(XI), which is linearly decreasing on [Ci,Ci+I]. Thus, (7.27) becomes FM(XI) = Vg(i+l) + J.li(XI)(Vg(i) - Vg(i+l»)'
Xl E
[Ci,Ci+I].
Clearly, FM(XI) either increases linearly, if Vg(i+l) > Vg(i) , or decreases linearly, if Vg(i+l) < Vg(i) , on [Ci,Ci+I]. Therefore, if there is at least one subinterval, say [Cp,Cp+ I], on which t/!(XI) is not a linear function, the subinterval must be further divided into more and more smaller subintervals to satisfy smaller and smaller approximation error bounds 8k. It can be concluded that a necessary condition for the general SISO fuzzy systems to achieve the approximation (7.24) is N ~ 00 as 8k ~ 0 (when k ~ 00). This condition may seem intuitive and trivial when it is considered as a sufficient condition. It is also a necessary condition, however. This finding is meaningful as triangular membership functions are commonly used in many practical fuzzy systems. In light of this
230
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximators Membership
o
Figure 7.2 Illustrative definition of triangular input fuzzy sets used by the general SISO Mamdani fuzzy systems. Note that Jli(XI) + Jli+l (Xl) = 1 on [Ci, Ci+tl for all i.
condition, using triangular fuzzy sets may not be desirable in constructing the fuzzy systems as high-precision functional approximators.
7.7. NECESSARY APPROXIMATION CONDITIONS FOR GENERAL MISO MAMDANI FUZZY SYSTEMS 7.7.1. Configuration of General Fuzzy Systems We now extend the SISO results to the general MISO fuzzy systems. The approach and the results will be similar, but mathematical derivation will be more complicated and difficult. One major difference between the SISO and MISO fuzzy systems is the use of fuzzy logic AND operators in the MISO systems. M input variables are defined over El in (7.22). The interval [ai,bi] is divided into N, subintervals:
=
i
i
=
a·lCO < · .P · < CN b. i
for all i.
On Eli' N i + _1. fuzzy sets, denote~ asA;i (0 s ). ~ N i), are used to fuzzify Xi' The membership function of Ali' designated as ttli' is a~ost arbitrary: !t is continuous, convex, and normal: In the rest of this c~apter, we will use ttli to represent ttli(Xi) for mo~e co~cise pr~sentation. ttli is O. at Xi.= CJi-:- 1 and increases monotonically. on ~Cli-l ,CJi-1 + <Xli-I]' where o ~ <xji- l ~ eli -:- eli-l'i and reaches 1i at Xi.= Cli- 1 .+ <xji- 1· Then, ttli is 1 on [Cli- l + <Xji-1,CJi+ 1 - Pji+I.]' wh~re 0 < Pji+l ~ Cli+ I - Cli' .and ~ecreases monotonically ~d becomes ~ at Xi =.CJi+ I' ttj. i~ 0 .whe~ Xi is outside [iCli-I'~li+l]: For the end points Co = a, and CN. = bi' tto is 1 on [co'Cl - PI]' where 0 < PI ~ C1- Co' and then decreases monotonically to 0 at Xi = C{; ttk. is 0 at Xi = C1:.-1 and then increases monotonically to 1 at Xi = C1:.-1 + <xk.-l' where 0 < <xk.-l ~ C1:. - Ck.-I' and remains to be 1 until Xi = C1:.. And tt~ and ~~i are 0 elsewhere. tt;i intersects only P,)i- 1 and J,l)i+ 1' and only once with each of them. Illi does not intersect any other fuzzy sets. For each variable, the membership function definitions, illustrated in Fig. 7.3, are the same as those used for the SISO fuzzy systems. n Mamdani fuzzy rules in the following form are used: (7.32)
Section 7.7. • Necessary Approximation Conditions for General MISO Mamdani Fuzzy Systems
231
Membership
1
o
aCi-P{ , . c{
C~; C~;-l + a~J-l
C1;-1
Figure 7.3 Illustrative definition of input fuzzy sets for the general MISO Mamdani fuzzy systems.
where Bg(I}J ... ,IM) is a singleton output fuzzy set that is nonzero only at FM(x) = Vg(It, ... ,IM). The product fuzzy logic AND operator is employed to evaluate the ANDs in the fuzzy rules, and the combined membership for Bg(It, ... ,IM) is designated as n~l J.l}i. No fuzzy OR operation is employed. The fuzzy inference methods allowed are the Mamdani minimum inference, the Larsen product inference, the drastic product inference, and the bounded product inference. They produce the same inference result due to the use of the singleton output fuzzy sets. Using the generalized defuzzifier, we find that the output of the general MISO fuzzy systems is
(7.33)
This configuration is general but differs from the general MISO fuzzy systems in Section 7.4.1. The input fuzzy sets here are less restrictive. Nevertheless, there are some restrictions on the fuzzy logic operation (i.e., use of the product fuzzy AND operator only) and the fuzzy inference methods.
7.7.2. Lemmas for Developing Necessary Conditions The following three lemmas, Lemmas 7.5, 7.6, and 7.7 are parallel to Lemmas 7.1, 7.2, and 7.3, respectively. Lemma 7.5 deals with the continuity of FM(X) in relation to assignment of fuzzy rules. Lemma 7.5. FM(x) is continuous on entire e if and only if all the 2M fuzzy rules in the form of (7.32) are assigned to each of the N, x··· X N M different combinations of subintervals.
232
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximators
We first prove the sufficiency of the condition. Without losing generality, assume x E [C]l,C}l+l] x .. · x [Cft,Cft+I]' Because of the way the input fuzzy sets are defined, only
two nonzero memberships result for each input variable after fuzzification. They are and
Ilft
and
for
Ilft+l
Xl
for XM'
Consequently, 2 M fuzzy rules relating to these memberships are executed, resulting in
where (Il]l+i l · .. Ilft+iM)rJ. is a continuous function of x on e and Vg(il+il, ...,iM+iM) is constant. Thus, F M(X) is continuous on 8. We now prove the necessity of the condition. When at least one of the 2M rules is not used, say the following one is not executed: IF Xl is All AND ... AND XM is Aft THEN FM(x) is Bg(il, ...,iM)'
°
(7.34)
Then, ~t the point (C]l' ... ,Cft), all combinations of the M memberships are except n~l Ill;· However, this membership combination does not exist because fuzzy rule (7.34) is not used. As a result, both the numerator and denominator of(7.33) is 0, meaning FM(x) has no definition at (C]l ' ... , cft). So, F M(X) is not continuous on e. This indicates the necessity of the condition in Lemma 7.5. The next lemma also relates the continuity of F M(X) to assignment of fuzzy rules. Lemma 7.6. Suppose that 8 is divided into N I x .. · x N M cubes, each of which is [CJl,CJl+tlX ... x[Cj~,Cft+tl for jjM=O, ... ,Nj-l, where i=l, ... ,M. FM(x) is
ni=l
(N, + 1) fuzzy rules in the form of (7.32) are used. continuous on e if and only if n = Let us prove it. According to Lemma 7.5, for each cube [C]l,C}l+l] x ... x [Cft,Cft+I]' all 2M different combinations of the Mmemberships should be used to form 2M fuzzy rules in order to gain the continuity of F M(X) on the cube. This means that to ensure the continuity of F M(X) on e, all the possible combinations of the M memberships should be used. There are n~I(Ni + 1) such membership combinations, resulting in the same number of fuzzy rules. Lemma 7.7. At x = (C]l"." Cft) for ji = 0 ... , N, where i = 1, ... ,M,FM(x) = Vg(i!, ....lu)' The proof is easy. At x = (Cj~, ... , Cft), Il;; = 1 and ,uJ;+1 = 0, forji = 0, ... .N, - 1. Therefore, only the following one fuzzy rule is executed: IF Xl is A)l AND. · · AND xM is Aft THEN F M(X) is Bg(it, ...-lu)' After using the product fuzzy AND operator, Bg(il,...,iM) is assigned a membership value of 1 and consequently F M(X) = Vg(il, ...,iM)' At x = (C]l' ... ,Cft), it is straightforward to prove that FM(x) = Vg(il,...,iM)'
Section 7.7. • Necessary Approximation Conditions for General MISO Mamdani Fuzzy Systems
233
In the following lemma, we reveal a decomposition property of the general MISO Mamdani fuzzy systems. It will be important in establishing Lemma 7.9.
Lemma 7.8. A general MISO Mamdani fuzzy system can always be decomposed to the sum of M simpler fuzzy systems: The first system has one input variable, the second two input variables, and the last one M input variables. There exist a total of Ml such decompositions, but they are all equivalent. One of the decompositions is: FM(x) = R I (Xl) + QI (XI)<7'2(X2) + Q2(XI ,X2)<7'3(X3) + ... + QM-2(XI, ... , XM-2)CPM-I (XM-I) + QM-I(XI,··· ,XM-I)<7'M(XM) where
i= 1, ... ,M.
To prove it, we do the first-level decomposition as follows:
where
QM-I (Xl' .. · , XM-I)
=
x
We then carry out the second-level decomposition by decomposing RM- I (Xl' ... , XM-I) in a similar fashion:
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximators
234
where (
IX
M-I
n::«
)
x
~-2~1""'~-2!=~~~~~~~~~~~~~~~~~~~~~
CfJM(XM) and CfJM-I (XM-I) are identical except for the input variables involved. Combining the above two decompositions yields FM(X)
= RM- 2(XI , ... ,XM-2) + QM-2(XI, · · . ,XM-2)CfJM-I (XM-I) + QM-I(XI,··· ,XM-I)CfJM(XM)·
Continually decomposing to the Mth level will produce F M(X) = R I (Xl)
+ QI (XI)CfJ2(X2) + Q2(XI,X2)q>3(X3) + ... + QM-2(Xt, ... ,XM-2)q>M-I (XM-I)
+ QM-I(XI,··· ,XM-I)q>M(XM), where
(J.tJJ"Vg(h,h+1,h,ooo,jM) QI(Xt) =
+ (J.tJt+1)"'Vg(h+1,h+1,h,o..,jM) - (J.tj~)"'Vg(j"Oo.,jM) -(J.tJ[+l) IXVg(h+ 1,h,00.,jM)
----------..;..-~-----------
(J.tJt)'" + (J.tJt +1 )'" The decomposition is not unique inasmuch as there are different arrangements of the M input variables. For example, the following is another decomposition: FM(x) = TI (XM) + Sl (XM)CfJM-I (XM-I)
+ S2(XM-I ,XM)q>M-2(XM-2) + ...
+ SM-2(X3, .. · ,XM)CfJ2(X2) + SM-I (X2' · . · ,XM)q>1 (Xl)· Because there are in total Ml different arrangements of the input variables, there exist the same number of different decompositions. Importantly, however, all these decompositions have the same property: The general fuzzy system is decomposed to the sum of M simpler
Section 7.7. • Necessary Approximation Conditions for General MISO Mamdani Fuzzy Systems
235
fuzzy systems, with the first system having one input variable, the second two input variables, and the last one M input variables. This concludes the proof. Lemma 7.8 enables the development of the following lemma which establishes the general fuzzy systems to be monotonic in each cube configured by M subintervals. The monotonicity is the key to developing the necessary conditions stated in Theorem 7.6.
Lemma 7.9. When the conditions set in Lemma 7.5 are met, F M(X) is monotonic on [Cj~ ,C}l+l] x··· X [Cj~,CZ+I] for t. = 0, ... , M- 1, where i = 1, ... ,M. For better presentation, we will only prove the M = 2 case here. The results can be extended to a higher dimension. Without losing generality, assume Xl E [ClI,C}t+l] and X2 E [CJ;.,Cj~+I]' Using the decomposition property stated in Lemma 7.8, we find that
where
We now prove that F M (X I , X2) does not have any extrema on [Cll ,C}l+l] x [CJ;.,C~+I]' which means F M(XI ,X2) is monotonic. Note that
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximators
236
The necessary conditions for FM(Xl,X2) to have extrema are aF/ aXl = 0 and aF/ aX2 = o. Because on [C~,C~+ll, dJ-lh+l/dx2 ~ 0 and dJ-l];/dx2 ~ 0, and both cannot be 0 at the same time, we have
Thus, the only possibility for aF/aX2 and hence
= 0 is when
Q(Xl)
= 0,
which results in ~F/a~
=0
D=
Only when dQ/ dx, = 0 will D become o. When dQ/ dx, to Vg (h ,j2) = Vg (h +l ,j2)' which in turn means FM(Xl ,X2)
= 0, aF/ aXl = dR/ dx, = 0, leading
= Vg(h ,j2) = Vg (h +l ,j2)·
That is, FM(Xl ,X2) becomes a constant and does not have extrema. Thus, D < 0 on [Cj~,CJ}+ll x [C~,Ch+ll and consequently F M(xl,x2) has no extrema, or equivalently, is monotonic. Extending this analysis to more than two input variables, F M(X) should be monotonic one.
We have completed the proof of Lemma 7.9. 7.7.3. Necessary Approximation Conditions Recall that when formulating (7.23), it was assumed that A distinct extrema of t/J(x), taking place at x = H j = (hJ, ... , hj!), where j = 1, ... , A, are given. For x;, the A extrema occur at x, = h~, ... , h~. Without loss of generality, assume that hj are inside [a;,b;l but not at the two end points of the intervals. Although the extrema are distinct, hj mayor may not be distinct. We will only keep distinct hj and arrange them in ascending order to form the following set: 1j=(pi, ... ,pk), t
i= 1, ... ,M,
(7.35)
where pi < · .. < pk.. Here, we suppose that T; has K; (1 ~ K; ~ A) distinct points. Obviously, T; divides' [a;,b;l into K; + 1 subintervals. Now, extremum mh"",jM occurs at x = (pJ} , ... , p~). Using (7.35) and Lemmas 7.5 to 7.9, we now establish the following necessary conditions for the general MISO fuzzy systems to be universal approximators with minimal system configuration. Like the SISO cases in Section 7.6, the monotonicity of the MISO fuzzy systems in each of the cubes configured by M subintervals plays a key role in establishing these conditions.
Section 7.7. • Necessary Approximation Conditions for General MISO Mamdani Fuzzy Systems
237
Theorem 7.6. Given (7.35), the following necessary conditions must be satisfied simultaneously in order for the general MISO Mamdani fuzzy systems to achieve the approximation (7.23) with minimal system configuration: (1) For i = 1, ... , M, [ai,bi] must be divided into at least K,
+ 1 subintervals. That is,
Ni~Ki+l.
+ 1 ofthe N, subintervals must be so formed that Ch = a., C} = P] (1 ~i ~ K i ) , and Ck-;+1 = b.. (3) 2M fuzzy rule of (7.32) must be assigned to each of the M-dimensional cubes, [C}I ,C]I+l] x··· X [0~,0~+1] forii = 0, ... ,Ki . That is, the total number of fuzzy
(2) K,
rules is (4)
n = n~1 o; + 2).
Vg(h, ...-lu) must be so chosen that it satisfies
We will only prove the M = 2 case for condition (1), and the cases with more input variables can be proved in a similar fashion. Just as in the case of the SISO fuzzy systems, we use the contradiction argument again to show that N, ~ K, + 1 is necessary. Suppose that N, < K, + 1. Let the partition of [ai' bi] be a, = Ch < C~ < .. · < C1..-1 < C1.. = b.. Then there must exist at least one two-dimensional rectangle, say [011 ,C]I+l] ~ [C~,0~'+I]' on which t/J(x) is nonmonotonic. That is, t/J(x) has at least one extremum inside this rectangle but not at the four vertexes of the rectangle. Assume the maximum to be mh,j2 occurring at Xi = eJ; E (C};,C};+I)' where i = 1,2. Suppose, for an arbitrarily small approximation error bound B, the following inequality holds:
IFM(x) - t/J(x)1 ~
max
B.
X;E[C); ,c;;+I]
This implies that the following three inequalities must hold simultaneously:
IFM(Cl,Ck) - t/J(C]I,Ck)1 ~ IFM(e)t'
eh) -
mh,j2
1
(7.36)
B,
s B,
(7.37)
IFM(CJI+I,Ck+l) - t/J(C]I+l,Ck+l)1 ~
B.
(7.38)
However, that mh,j2 is a maximum means mjl,j2 > t/J(C}I ,C~) and mhi2 > t/J(C]I+l ,C~+I)· Hence, t/J(x) increases monotonically from (C}I'C];) to «()I' (h) and then decreases monotonically from «()1' (~) to (C]t+ 1,C];+I). According to Lemma 7.9, F M(X) is monotonic on [C}I ,Cj~+I] x [C~,C~+I]. Inequalities (7.36), (7.37), and (7.38) cannot all be true simultaneously. This contradiction means that [ai,bi] must be divided into at least K i + 1 subintervals; that is, N; ~ K, + 1, which is the necessary condition (1). Furthermore, according to the above analysis, when N, ~ K, + 1, the subintervals must be divided in such a way that t/J(x) reaches its A. extrema onl~ at x = .(pll' .: · ,pZ). This requir~s K, + 1 of the N; subintervals must be so formed that = a., Cj = pj (1 ~i ~ K i ) , and CK;+ 1 b., which is the necessary condition (2). Now analyze the necessity of condition (3). According to Lemma 7.6, it is necessary to assign 2M fuzzy rules in the form of (7.32) to each M-dimensional cube [Cit ,C~+I] x··· X [0~,C~+I]' forii = 0, ... , K i , where i = 1, ... , M, to ensure the conti-
=
Co
238
Chapter 7 •
Mamdani and TS Fuzzy Systems as Functional Approximators
nuity of FM(x) on each cube. Conse;juently, the total number of fuzzy rules needed to ensure the continuity of F M(X) on e is Di=l(K, + 2). Finally, let us look at the necessity of condition (4). To realize the approximation (7.23), the following inequality must be satisfied
IFM(C]I' ... , C;~)
-
"'(C]I' ... ,
cf:)1 = IFM(C]I' ... , C.t:) -
mj...... jM
I:: :
e
for all A. extrema. Using Lemma 7.7, we can rewrite the above inequality as IVg(jt, ...,jM) -
mh, ...,jM
1 ::: B,
or
We have completed the proof of the theorem.
7.7.4. Merits and Pitfalls of MISO Mamdani Fuzzy Systems as Functional Approximators According to Theorem 7.6, the selection of Vg(h, ,jM) directly depends on B. The smaller the B, the narrower the range of Vg(h, ,jM). As an extreme, when B = 0, Vg(h, ...,jM) = mh, ...,jM for t, = 1, ... .N, - 1. The general SISO fuzzy systems have exactly the same property. Theorem 7.6 exposes the strengths and limitations of the general MISO fuzzy systems as universal approximators; they are the same as those revealed by Theorem 7.5 for the general SISO fuzzy systems. N, somewhat relates to K, + 1. The minimal number of fuzzy rules, n, increases with the rise of K i • If K, is small, n can also be small. Because n and B are not related, even if B is very small, n can still be small. In other words, a small amount of fuzzy rules may be enough for a uniform approximation of complicated continuous functions with a small number of extrema. On the other hand, n increases with A.. Hence, many fuzzy rules must be used for a uniform approximation of those t/J(x) that are simple but have a lot of extrema, such as periodic or highly oscillatory functions. In short, fuzzy controllers and fuzzy models with a small number of fuzzy rules can be good enough to achieve satisfactory results for many control and modeling problems in practice. However, they are not efficient and economic solutions for problems where systems are periodic or highly oscillatory.
7.7.5. Numeric Example We now illustrate Theorem 7.6 by a numeric example. EXAMPLE 7.5. What is the minimal number of fuzzy rules and fuzzy sets needed by a MISO fuzzy system of the general class to uniformly approximate t/J(x} ,X2) = sin(mx}) COS(nx2) defined on [O,3n] x [O,3n]? Here, m and n are positive integers.
Section 7.7. • Necessary Approximation Conditions for General MISO Mamdani Fuzzy Systems
239
Solution For visualization, we plot "'(XI,X2) = sin(2x I ) cos(3x2) in Fig. 7.4. To determine how many extrema the function has, we do the following:
Ot/J = m cos(mxl) COS(nx2), ax l
a:;; = _m sin(mxl) COS(nx2), 2
I
::: = -n sin(mxl) sin(nx2)'
~=
_n 2 Sin(mxl) COS(nx2),
2
Consequently,
(jlljJ
D=
8xt8x2
= m2n2[sin2(mxt) COS2(nx2) - cos2(m.xt) Sin2(nx2)] '
Figure 7.4 Graphical illustration of a simple but highly oscillatory function !/J(x) sin(2x1)coS(3x2) on [0,311] x [0,311] which has 48 extrema on
=
(0,311) x (0,311).
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximatoi
240
Let at/!/ ax l =
°and af/J/ 8X2 = 0, Xl
=
2k 1n + n 2m '
kl
~n , n
k2 = 1, ... , 3n - 1
X2 = -
= 0, ... , 3m -
1,
at which D > 0, meaning t/J(x) has a total of3m(3n - 1) extrema on (O,3n) x (0,3n). Even i
m or/and n are moderate, a large number of fuzzy rules are needed for the approximation according to Theorem 7.6. For example, if m = 10 and n = 12, then f/J(XI,X2) has 1,05( extrema on (0,3n) x (O,3n). As a result, at least 32 and 37 fuzzy sets are necessary for Xl anc X2,
respectively, and 1,184 fuzzy rules are needed.
This example demonstrates that a large number of fuzzy rules must be employed ir order to approximate a simple but periodic function.
7.8. NECESSARY APPROXIMATION CONDITIONS FOR TYPICAL TS FUZZY SYSTEMS A logical step to take now is to derive necessary approximation conditions for TS fuzzy systems. In this section, we study typical TS fuzzy systems only. Necessary conditions for general TS fuzzy systems are technically more challenging to derive and remain an open issue. The differences between the typical and general fuzzy systems are restrictions on input fuzzy sets and defuzzifier.
7.8.1. Configuration of Typical Fuzzy Systems For simpler notation and derivation, the typical TS fuzzy systems use two input variables, Xl and X2, defined over E> = [al,b l] x [a2,b2 ] (see (7.22)). [ai,b;] is divided into N, subintervals: ai = cb < · . · <
Ck.-l ,
<
Ck., =
On [ai,b i], N; + 1 trapezoidal fuzzy sets, denoted as Aj (0 follows (Fig. 7.5): j
b..
::s ji ::s N;), are defined, and Jlj
j
is as
(7.39)
Section 7.8. • Necessary Approximation Conditions for Typical TS Fuzzy Systems
241
Membership P~, (Xi)
o
c~; - p5; C~, +a~,
c~
C~,+I - ,0;;+1
Figure 7.5 Graphical illustration of trapezoidal input fuzzy sets.
where CPJi > 0,
- R~
e~ = . li+~ p];+~ li C' _ p'. l _ C' _ h+l li+ h
.. (X'
~
The membership functions have the following two properties: (1) the trapezoids can be different in upper, lower, left, and/or right sides and (2) for any two adjacent membership functions, J-lJi + J-lJi+ 1 = 1. ~bviously, triangular membership functions are special cases of the trapezoidal ones when (X}i = 0 and Pji = o. The TS fuzzy systems use arbitrary fuzzy rules with linear rule consequent (7.40) where ah j2' bh j and cj1lz are constants. The product fuzzy logic AND operator is employed; ~e res.wt is for the rule consequent. Using the centroid defuzzifier and noting Jl}i + J-lji+ I = 1, we obtain
III Ilk
F TS (x" X2)
= =
"J-l~J-l~ ·x2 +c·Jll2.) L 71 72 (a.71h,xI +b· JI12
L J-lh' Jlj22
J-l~71J-l~72 (a71h . . Xl + b,JI12. X2 + C·JI12' .)
242
Chapter 7 •
Mamdani and TS Fuzzy Systems as Functional Approximators
7.8.2. Preparation for Setting up Necessary Conditions We are going to establish necessary conditions on the minimal system configuration requirement for the typical TS fuzzy systems as functional approximators. As preparation, we need to establish the following lemmas.
Lemma 7.10. F TS(XI ,X2) is continuous on are met:
e if and only if the following two conditions
(1) Four fuzzy rules in the form of (7.40) are assigned to each of the N I x N 2 combinations of subintervals, and (2) (NI + 1)(N2 + 1) fuzzy rules are used for the N I x N 2 combinations of subintervals. The proof is similar to what we have done with the MISO Mamdani fuzzy systems. Basically, for each cell [C]l ,C]l+l] x [C~,Ch+I]' two memberships result for Xl and another two for X2 after fuzzification. Hence, there are four different combinations of the four memberships, leading to activation of up to four fuzzy rules. Four rules must be used in order to gain the continuity of F TS (XI,X2) on [C]I,C]I+tl x [C~,C~+I]. There exist in total (NI + 1)(N2 + 1) different membership combinations, resulting in the need of the same number of fuzzy rules, if continuity of F TS (XI,X2) on [al,b l ] x [a2,b 2] is desired. The following lemma is very important.
Lemma 7.11. The following third-order polynomial function
where all the coefficients can be any real constants and Xl' X2 E (-00, (0), has at most one extremum. The proof is somewhat long. We assume that (xt ,x!) is one extreme point of P(XI ,X2), and we prove that there exists at most one extreme point on entire (-00,00) x (-00,00). We first shift the origin of the Xl - X2 coordinate system from (0,0) to (xt, X!) by letting Xl = Xl + xt, X2 = X2 + x!, resulting in a new third-order polynomial function
G(XI,X2) = P(XI
+ xt ,x2 + x!)
= a + b(XI
+ xt) + C(X2 + x!) + d(XI + xt)(X2 + x!) + e(xI + xt)2 + f(X2 + x!)2 + g(XI + xt)2(X2 + x!) + h(XI + xt)(X2 + x!)2 = a+ bXI + CX2 + dXIX2 + exT +l~ + gxT X2+ hxl~
Section 7.8. • Necessary Approximation Conditions for Typical TS Fuzzy Systems
243
where the new coefficients can be any constants, which are computed from a.b.c.d.e.f.g.b.xt, and x!. We now look for all possible extreme points of G(Xt,X2) by doing the following:
? = b + dX2 + za, + 2gXlX2 + ~, aO OCt
(7.41)
O ? = c+ dXl + 2jx2 + gxI + 2hxlX2' a OC2
(7.42)
filG filG d- 2-2L:: aOCt- a-OC2 = a-oc2a-OCt = + gXt + 'U2' (flG 2- 2-8~ = e+ gX2' t
(flG ,:-:2
aX2
D=
~G
~G
8~t
8Xt ai2
filG 8X28Xt
8~2
-
-
= 2f + 2hX t ,
= 4(e + gX2)(j + hx l )
cflG
-
(d + 2gXl + 2hx2i .
(7.43)
The sufficient condition for (Xt ,X2) = (0,0) (equivalently, (XI'X2) = (xT ,X!» to be an extreme point is --
-2
D=4ef-d > 0,
(7.44)
which means that if we properly choose the values of e,j, and d so that D > 0, then our assumption of (0,0) being an extreme point indeed holds. Now we show that except for (0,0), there are no other extreme points. Because (0,0) can 8 be an extreme point, we have = and a = 0, and hence b = in (7.41) aXl (01) OC2 (0.0) and c = in (7.42). As a result, any other possible extreme points must be the solutions of the following equation set:
o? I
°
{
°
°
?1
~~2 + 2~l + :~XIX2 ~_~ = 0
as; + 2fx2 + gxt + 2hXlX2 = °
which can be written either as
{
2~l ~_(d + ~~Xl_+ hx2~~2 = (d + gXl + 2hX2)xt + 2fx2 =
0
(7.45)
°
(7.46)
°
or as
(2e + 2gx2)Xl {
+ (d + hx2)X2 = (d + gXt)Xt + (21 + 2hx t)X2 =
0.
244
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximaton
The necessary and sufficient conditions for (7.45) and (7.46) to have nonzero solutions are respectively:
_ 1d
2e
_
+ gXI + 2m2
d + hx2 -+2gxI 1 =
°
(7.47)
2/
and
(7.48)
After some mathematical manipulations, we obtain, from (7.47),
and, from (7.48), (7.50) Replacing the two terms on the right side of the equation (7.43) by (7.49) and (7.50), respectively, we attain
+ gXI)(d + hx2) - (gxI + hx2)(d + 2hx2 + 2gxI) 2 = -2( (hx2) +(Kxli-hx2KXt) - (4el- d2) < O.
D = (d
-
4el + ghxlx2
In the last step, we used the well-known inequality
as well as inequality (7.44). The fact that D < on entire (-00,00) x (-00,00), excluding (0,0), means there are no other extreme points besides (0,0). This completes our proof of Lemma 7.11.
°
Lemma 7.12. The following second-order polynomial functions
= a+ bXI + cX2 + dxl X2 + exI Q(XI,X2) = a + bXI + CX2 + dxlX2 + e~, P(XI,X2)
where a.b.c.d, and e can be any real constants, are monotonic on (00,00) x (-00,00).
Section 7.8. • Necessary Approximation Conditions for Typical TS Fuzzy Systems
245
The proof is straightforward. First,
ap
ax. = b + dx2 + 2ex. , ap
-a = c+dx l , !X2
~p
~ =2e, I
cY-P
=
cY-P
ax l aX2 ax2ax i
= d,
~p
~=o,
D=
~p
~p
axt
aXl8x2
~p
~p
aX2aXI
a~
= _d2 •
P(XI,X2) does not have any extrema on (00,00) x (-00,00) because D = -d2 ~ o. Obviously, this conclusion also holds for Q(XI,X2). Having established these three lemmas, we are now ready to prove the following main result. Theorem 7.7. When Lemma 7.10 holds, the typical TS fuzzy systems have at most one extremum in each of N I x N 2 combinations of subintervals. The proof is rather lengthy. Assume Xl E [C}I,C]I+I] and X2 E [Ch,Ch+I]. After fuzzification, only two nonzero memberships result for each input variable, and they are and
for Xl
and Consequently, four rules relating to these memberships are activated. To investigate how many extrema exist, we need to divide [C}l ,C}I+l] x [C];,Ch+l] into nine regions, as shown in Fig. 7.6. In region 8 5 , where Xl E [C}l + ex}I,C]I+1 - P]l+l] and X2 E [Ch + a.k,C.h+1 - Ph+l]' the TS fuzzy systems, are third-order polynomial functions:
..
F",,'S(XI X2) = 1"'II! ,,~(aJI}2 Xl "'11 r» .I.j'
+ b· . X2 + c· }l}2
.)
JtJ2
=Po +Plxl +P2 x2 +P3 Xl x2 +p4xI +P5~ +p6xIx 2 +P7XI~
(7.51)
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximaton
246
c;2+)
2
IJ. j2+ 1
CJ2+I-Ii:.J2+1
S3
S6
S9
S2
Ss
Sg
Sl
S4
S7
C~ +a~ J2
J2
2 J.1 j 2
C~
J2
1 J.1 i]
1 J.1j]+l
c~
1]
Figure 7.6 Dividing [Cj~ ,c~ + 1] X [CJ;., C~+ 1] into nine regions for proving that the typical TS fuzzy systems have at most one extremum in [CJ~' CJ~ +d x 2
[Ch,~+d·
1
1
where coefficients Po to P7 are constants whose values are determined by the membership functions as well as by the parameters in the rule consequent. The explicit expressions of these coefficients are:
Section 7.8. • Necessary Approximation Conditions for Typical TS Fuzzy Systems
247
In regions 8 4 and 8 6
F TS(Xl ,X2) = Po + Plxl
+ P2x2 + P3xl x2 + P4xi,
(7.52)
+ P2x2 + P3xl x2 + P4~'
(7.53)
whereas in regions 8 2 and 8 8 F TS(Xl ,X2) = Po + PIxl
both of which are second-order polynomial functions. Finally, in regions 8 1,83 , 8 7 , and 8 9 , the fuzzy systems output is in the form of a plane (i.e., first-order polynomial function): F TS(Xl ,X2) = Po + PlXl
+ P2x2'
(7.54)
In different regions, the values of coefficients Po to P4 in (7.51), (7.52), (7.53), and (7.54) are
different. We provide the coefficients for some of the Xl E [C~,Cll +~)I] and x, E [C~,C~ +~h]' Po = CjJ2'
In region 8 1 ,
= ajJ2' and P2 = bjJ2· E [C~ + ij;,C~+l - P.h+l]'
+ ~}.J and X2 e~J2 c.JIJ2. + e~+lC' J2 JI(J2. +1)'
In region 8 2 , Xl E [Cll ,Cll
Po =
PI
regions.
.. +e~+Ia'('+l) PI =e~a J2 JIJ2 J2 JI J2 '
+ eh bjJ2 + Cl>h+l Ch(j2+l) + 8J2+l bh(j2+l)' CI>~J2 a,71J2. + CI>~+la. J2 JI(J2. +1)' CI>~J2 b,lIJ2 . + CI>~J2 +lb.1I(J2. +1)·
P2 = CI>];Citj2 P3 = P4 =
The coefficients for the remaining six regions can be derived similarly. According to Lemma 7.11, F TS(XI ,X2) has at most one extremum in region 8 5 , Because of Lemma 7.12, F TS(Xl ,X2) is monotonic in 82,84,86 , and 8 8 , Being planes, F TS(Xl ,X2) is also monotonic in 8 1,83,87 , and 8 9 , Moreover, F TS(Xl ,X2) is continuous in [Cll,C~+l] x [C~,C~+l]' when Lemma 7.10 holds. Therefore, F TS(Xl ,X2) has at most one extremum on [Cll ,ClI+ l] x [C~,C~+I]' We have completed the proof of Theorem 7.7.
7.8.3. Necessary Approximation Conditions Utilizing Lemmas 7.10,7.11, and 7.12, as well as Theorem 7.7, we now prove the necessary conditions for the TS fuzzy systems as universal approximators with minimal system configuration.
Theorem 7.8. To uniformly approximate .p(XI,X2) that has A distinct extrema with minimal system configuration, one must choose such V, andN2 that divide [al ,b l ] and [a2,b2] in a way that at most one extrema exists in each cell [C~,CJI+I] x [C];,Ch+I]' Accordingly, the minimal number of fuzzy rules needed is (N 1 + 1)(N2 + 1), and at least 3(N1 + 1)(N2 + 1) parameters are required in the consequent of the fuzzy rules. The proof is as follows. To uniformly approximate .p(XI,X2) arbitrarily well, one must first approximate all the A. extrema, (ml, ... , m;) at x = H j = (h) ,hJ) arbitrarily well. This means that the TS fuzzy systems must have equivalent extrema at H j • According to Theorem
248
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximators
7.7,. the TS fuzzy systems have at most one extremum in a cell, regardless of its size. Hence, one must divide [at,b t] and [a2,b2] in such a way that at most one extremum of t/!(Xt,X2) exists in each cell [G~ll ,C~+t] x [Ch,C~+t],Jt = 1, ... , N, and J2 = 1, ... , N 2. Based on Lemma 7.10, the TS fuzzy systems need (Nt + 1)(N2 + 1) fuzzy rules. Since there are three parameters in each rule consequent, in total 3(N, + 1)(N2 + 1) parameters are required for all the rules. This completes our proof.
7.8.4. Advantages and Disadvantages of TS Fuzzy Systems as Functional Approximators Theorem 7.8 shows that, as universal approximators, the TS fuzzy systems are subject to the same strengths and limitations possessed by the general Mamdani fuzzy systems. That is, only a handful of fuzzy rules may be needed to uniformly approximate functions that are complicated but have a few extrema. On the other hand, a large amount of fuzzy rules are required for approximating simple functions with many extrema. The number of fuzzy rules increases with the rise of the number of extrema.
7.9. COMPARISON OF MINIMAL APPROXIMATOR CONFIGURATION BETWEEN MAMDANI AND TS FUZZY SYSTEMS We now compare the necessary conditions between the general Mamdani fuzzy systems and the typical TS fuzzy systems. The objective is to determine whether one type is more economic than the other. Theoretical comparison is impossible because a countless number of situations are possible. Alternatively, we will use two simple, yet representative and conclusive, examples.
7.9.1. If TS Fuzzy Systems Use Trapezoidal or Triangular Input Fuzzy Sets In the first example, the function to be approximated is supposed to have two maximum points whose locations are marked by the symbol A, and two minimum points whose locations are marked by the symbol. as shown in Fig. 7.7a. (yVe will use the same symbols in Figs. 7.7b, 7.8a, and 7.8b). According to Theorem 7.8, N, = N 2 = 2, and as shown in Fig. 7.7a, we give one possible way to divide both [at,b t] and [a2,b2] into two intervals. Correspondingly, at least nine fuzzy rules with 27 rule consequent parameters are needed by the typical TS fuzzy systems. The system developer will have to determine 27 parameters. For the same function, however, we must divide [at ,btl and [a2,b2] into three intervals, as shown in Fig. 7.7b, according to Theorem 7.6. Hence, the general Mamdani fuzzy systems require only 16 fuzzy rules. Thus, the developer needs to determine only 16 parameters, each of which is a singleton output fuzzy set. Obviously, the TS fuzzy systems are less economic than the Mamdani fuzzy systems. Nevertheless, this is inconclusive. Figure 7.8a shows our second example function to be approximated that also has two maximum points and two minimum points. The locations of the minimum points are slightly different from those in Fig. 7.7. In this case, the divisions of [at,b t] and [a2,b2] can be the same as those in Fig. 7.7a and the minimal configuration requirement for the TS fuzzy systems remains the same, that is, 27 parameters. Nevertheless,
Section 7.9. • Comparison of Minimal Approximator Configuration Between Mamdani and TS Fuzzy 249
Cf
•
!
Ij
!
!
C~ -~ ..._...•._._._._......•.......
I
II i
I
i
j
i
-~ .•.•._...-·_·_·····t·················
I
i cl
•
I
i
+. ! ! !
I I
Cf -_ •
i
! I
i
•
!
a2(Cij) al(Cb)
:
cl
(a)
C~ (b)
Figure 7.7 Comparison of the minimal system configuration between the typical MISO TS fuzzy systems and the general MISO Mamdani fuzzy systems. The example function to be approximated has two maximum points, whose locations are marked by symbol., and two minimum points whose locations are marked by symbol e. Panel (a) gives one possible division of the input space for the TS fuzzy systems to be minimal, whereas panel (b) provides the necessary input space division for the Mamdani fuzzy systems to be minimal.
optimal divisions of [at ,btl and [a2,b 2] for the general Mamdani fuzzy systems now must be those shown in Fig. 7.8b where N, = N2 = 5. The corresponding number of fuzzy rules is 36. Hence, the minimal system configuration of the TS fuzzy systems is more economic. Through the examples, we can conclude that the minimal configuration of the TS and Mamdani fuzzy systems depends not only on the number of extrema but also on their locations. For some functions, the TS fuzzy systems are more economic whereas for others the Mamdani fuzzy systems are smaller in the number of design parameters. For all the functions as a whole, these two types of fuzzy systems are comparably economic and no one is better or worse than the other.
• C[
I I I
I I I I
b 2 (C~)
r___---r-_-----,.--,.--.-.,
C~
C1
- 1 - - ' . ' . ' •. _. _.-. _. _ .•. ~ .•.•.•. - .•. _ .•.•.
!
Ie I I
I
1 I
cl (a)
C~
ct
a2 (C5) ----Ir--t-----+-+----'
al(C~) clc~ (b)
Figure 7.8 Comparison of the minimal system configuration between the typical MISO TS fuzzy systems and the general MISO Mamdani fuzzy systems using another example function. The meanings of the symbols are the same as those in Fig. 7.7. This example function has the same number of extrema, but the locations of the minimum points are slightly different from those displayed in Fig. 7.7. Panel (a) gives one possible division of the input space for the TS fuzzy systems to be minimal, whereas panel (b) provides the necessary input space division for the Mamdani fuzzy systems to be minimal.
250
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximators
7.9.2. If TS Fuzzy Systems Use Other Types of Input Fuzzy sets In the minimal system configuration comparison thus far, we have limited the input fuzzy sets of the typical TS fuzzy systems to trapezoidal/triangular types because the
necessary conditions established in Section 7.8 are for this configuration only. An interesting question then arises: Would the comparison outcome be different if nontrapezoidal or nontriangular input fuzzy sets were used? The answer is yes. In what follows, we show that as far as minimal configuration is concerned, it is advantageous for the TS fuzzy systems to use nontrapezoidal or nontriangular input fuzzy sets. This is because they can make the TS fuzzy systems have more than one extremum in each cell [C~,S~+l] x [Ci,S~+l]' subsequently reducing the number of fuzzy rules needed. A general mathematical proof is difficult because there are countless different types of nontrapezoidal/nontriangular fuzzy sets and explicitly describing all is impossible. Alternatively, we rigorously prove the finding, using some typical SISO TS fuzzy systems. The notations are the same as those used in the last section. Input fuzzy sets of the SISO TS fuzzy systems are defined as
Il~71
=
0,
Xl E [CJ,C]l- l]
~~(Xl)'
Xl E [S~-l'S~]
D)l(Xl)'
Xl E [Sll'C}l+ l]
0,
Xl E [Sll+ l,C1.J
where 1j~ (Xl) is a monotonically increasing function, whereas D)l(Xl) is a monotonically decreasing function: 1 (Xl - C) -1 1j1(Xl) = 1 - C~ _ C~
)2
and
I
Dit(Xl) =
11- 1
11
(C~Xl - -slC~ )2 · 11+ 1
11
°
Comparing this definition with (7.39), one sees that a.)1 = P}1 = for jl = 1, ... .N, and the two linear functions are replaced by ~l(Xl) and D) (Xl). Unlike (7.39), p) + Il) +1 =1= 1. After 1 1 1 1 1 1 defuzzification, on [Sl,Sl+ l]'
_ Jl)l(ait Xl +Cj1) + Jl)l+l(ait+ lxl +Cj1+l)
F TS (Xl) -
1
Jlj1
1
+ Jlit +1
=!' =
•
(7.55)
= i,
=
Supposedly, the rule consequent parameters are: all Cj1 0, aj1+ l and Cj1+ l -1. Without losing generality, assume Cl1 = and C}l+ l = 1. Substituting the definition of Jl)l and the rule consequent parameters into (7.55), we obtain
°
F:rs(xI)
1
= 4xI -xi +xi.
XI
E [Cj~.CJI+tl·
=!
=!.
It is easy to prove that FTS(XI) reaches maximum at Xl and minimum at Xl Thus, there are two extrema in [Cl1,Sll+ l]' which is [0,1]. This SISO TS fuzzy system can have more than one extremum in [Cl1,C}1+ l] because the membership functions are no longer limited to trapezoidal or triangular shapes. When multiple extrema exist, the number of subintervals on [al,b l] can be small even when the number of extrema of the function to be
Section 7.11. •
Summary
251
approximated is large. Hence, the SISO TS fuzzy systems can be more economic in minimal system configuration than the general SISO Mamdani fuzzy systems because the output of the latter is always monotonic in [C~ ,C)l+l]' regardless of the shape of the membership functions.
7.9.3. Comparison Results The conclusions drawn from the above comparison analysis on the SISO TS and Mamdani fuzzy systems also hold for the TS and Mamdani fuzzy systems with more than one input variable. Comparisons can be summarized in the form of a theorem as follows. Theorem 7.9. The minimal approximator configurations of the typical MISO TS fuzzy systems and the general MISO Mamdani fuzzy systems depend on the number as well as the locations of the extrema of the function to be approximated. When trapezoidal or triangular input fuzzy sets are used, the TS and Mamdani fuzzy systems are comparable in minimal configuration. Use of nontrapezoidal or nontriangular input fuzzy sets can minimize configuration for the typical TS fuzzy systems, resulting in smaller configuration as compared to the general Mamdani fuzzy systems.
7.10. CONCLUSIONS ON MAMDANI AND TS FUZZY SYSTEMS AS FUNCTIONAL APPROXIMATORS The general fuzzy systems, Mamdani type and TS type, are universal approximators. Between the two, TS fuzzy systems can be more efficient in minimal system configuration for functional approximation, if nontrapezoidal/nontriangular input fuzzy sets are used. Otherwise, their minimal system configurations are comparable. These results lay a solid theoretical foundation for using fuzzy control and modeling in practice. Compared with traditional functional approximators, such as polynomial and spline functions, fuzzy systems are not ideal for approximating periodic or highly oscillatory functions. This does not matter much, because many control solutions and physical systems are not of these types of functions. The distinctive advantage of fuzzy approximators lies in their unique ability to directly utilize linguistic information as well as numerical data. Many practical applications, especially those in fuzzy control, have shown that rather small fuzzy systems are sufficient to yield satisfactory control and modeling solutions quickly and costeffectively.
7.11. SUMMARY Both Mamdani and TS fuzzy systems are universal approximators. Thus, fuzzy control can produce any continuous nonlinear control solution, whereas fuzzy modeling can model any continuous nonlinear physical system. Sufficient approximation conditions have been established to compute the components of a fuzzy system, Mamdani type or TS type, for uniform approximation of any given continuous function with desired accuracy. The calculated components may be conservative. Necessary approximation conditions have also been derived, which reveal the strengths and limitations offuzzy approximators. A small number of fuzzy rules may suffice to approximate those continuous functions that have a complicated formulation but a relatively small number of extrema. However, a large number of fuzzy rules are usually necessary for functions that are simple but have a lot of extrema (i.e., periodic or highly oscillatory functions).
252
Chapter 7 • Mamdani and TS Fuzzy Systems as Functional Approximators
The TS fuzzy systems with nontrapezoidal or nontriangular fuzzy sets can be more economical approximators than the Mamdani fuzzy systems. Otherwise, as a whole, the two types offuzzy systems are about the same. For any given function, whether the Mamdani type is better or worse than the TS type depends not only on the function's number of extrema but also on their locations.
7.12. NOTES AND REFERENCES The first results on Mamdani fuzzy systems as universal approximators were published in [22][111][220]. (See also [112][224].) These existence results were established only with the aid of the Stone-Weierstrass Theorem [179]. Fuzzy systems covered by the results are very limited: The fuzzy systems using Gaussian input fuzzy sets and the product fuzzy logic AND operator in [220], the additive fuzzy systems in [111], and the fuzzy systems using linear defuzzifier in [22]. More qualitative results have been obtained since ([31][32][52][109][119][122][126][156][164][224][225][241]) for other Mamdani fuzzy systems. The first quantitative results and sufficient approximation conditions (i.e., Section 7.4) were established in [260], which covered the general Mamdani fuzzy systems. The necessary conditions were first established in [264] and were then extended to cover more general Mamdani fuzzy systems in [53][57] (Sections 7.6 and 7.7). These are still the only sufficient and necessary conditions for Mamdani fuzzy systems in existence. Detailed analysis of approximation properties and accuracy can also be found in [288]-[291] and a few other papers from that research group. TS fuzzy systems as universal approximators were first investigated in [23] (an existence result for a fuzzy system using polynomials as rule consequent). In [266]-[268], quantitative and sufficient approximation conditions were derived for the general TS fuzzy systems with linear rule consequent (Section 7.5). Necessary conditions were established in [271] (Section 7.8), and so were the comparisons between the TS and Mamdani fuzzy systems (Section 7.9). At present, these are the only results in the literature that deal with TS fuzzy systems as universal approximators.
EXERCISES 1. Why is the issue of fuzzy systems as universal approximators important? What are the implications for fuzzy control and modeling?
2. What are the strengths of the fuzzy systems as universal approximators? The weaknesses? 3. The sufficient approximation conditions established in this chapter appear to be excessively conservative. Why? 4. Sufficient approximation conditions for more specific fuzzy systems should be less conservative. Can you configure such a fuzzy system and establish its sufficient approximation conditions? 5. Compare the Mamdani fuzzy systems and the TS fuzzy systems as universal approximators. Is one type of the fuzzy systems better than the other? 6. The necessary approximation conditions derived in Section 7.7 are for the fuzzy systems using the product AND fuzzy logic operator. Can you generalize the results to cover other AND fuzzy logic operators?
Exercises
253 7. The necessary conditions established in Section 7.8 are only for the fuzzy systems with two input variables. It is our postulation that the conditions hold for any number of input variables. The technical challenge lies in the difficult generalization of Lemma 7.11. Can you do it? 8. Is it possible to derive necessary and sufficient approximation conditions for a fuzzy system?
9. Using the methodology developed in this chapter, can you establish approximation conditions, necessary or sufficient, for fuzzy systems other than those that we have studied? 10. How can the approximation results in this chapter be used to design fuzzy controllers more efficiently and to develop fuzzy models more effectively?
Real-Time Fuzzy Control of Biomedical Systems
8.1. INTRODUCTION This chapter presents three real-world fuzzy control applications that we have accomplished. In the first application, the simplest Mamdani fuzzy PI controller in Section 3.7 is used for real-time control of mean arterial pressure in postsurgical cardiac patients at the Cardiac Surgical Intensive Care Unit (CICU). The system, successfully implemented clinically in the late 1980s, is the world's first real-time fuzzy control application in medicine. The other two applications were completed more recently. Both fuzzy systems use Mamdani fuzzy PD control. One system regulates the laser to control tissue temperature, whereas the other controls the dynamic progress of the thermal coagulative damage front in tissue during laser heating. The underlying principles of system design and parameter tuning shown in this chapter are applicable to industrial and engineering systems. From the system viewpoint, the biomedical systems under control are nothing but complex, nonlinear, and time-varying systems with time delay. Unlike engineering systems, however, precise system models are impossible to attain for most biomedical systems.
8.2. COMMON COMPLEXITY OF BIOMEDICAL SYSTEMS IDEAL FOR FUZZY CONTROL Biomedical systems are inherently complex, nonlinear, and time-varying, and many also involve time delay. Worse yet, they are different from subject to subject. Thus, they are the most complicated systems to model and control. In most circumstances, accurately modeling is impossible, primarily because of the complexity of human/animal physiology. On the other hand, even if such a system model is available, designing an appropriate controller to achieve desired performance is still challenging. For these kinds of systems, nonlinear controllers perform better than linear ones. Designing nonlinear controllers, however, is much more difficult owing to the lack of a general nonlinear system theory. 255
256
Chapter 8 • Real-Time Fuzzy Control of Biomedical Systems
In comparison with industrial and engineering systems, biomedical systems are more suitable for fuzzy control. Fuzzy controllers are inherently nonlinear and can be constructed empirically without explicit system models. A fuzzy controller is linguistic if-then rule-based and can thus be regarded as an expert system employing fuzzy logic for its reasoning. Vagueness, imprecision, and uncertainty are the norm in biomedicine (e.g., the way that a typical doctor describes diagnosis, treatment and prognosis of a disease). The fact that human operators like medical doctors and other clinical personnel can control various physiological parameters of the human body successfully by using their knowledge and experience suggests the high possibility of using fuzzy controllers in these situations. As we have demonstrated through theoretical analysis and computer simulation, even the simplest nonlinear fuzzy PI control can provide effective solution with superior performance for the systems involving nonlinearity and/or time delay.
8.3. MAMDANI FUZZY PI CONTROL OF MEAN ARTERIAL PRESSURE IN POSTSURGICAL CARDIAC PATIENTS As the first example application, we show how to develop a fuzzy drug delivery system for real-time control of mean arterial pressure (MAP) in patients. The reader who is not familiar with MAP may consider it as a weighted average of systolic pressure and diastolic pressure. Like the development of many medical control systems, computer simulation studies and animal experiments are usually the necessary steps prior to human trials. Using a patient model (see (8.1) below), we first developed an expert system-based fuzzy controller in computer simulation [248] and then applied it to real-time control of MAP in pigs [252]. The results were encouraging and indicated success of fuzzy control in patients to be achievable. For brevity in this book, we will only present fuzzy control of MAP in humans.
8.3.1. Hypertension after Cardiac Surgery We begin by describing the underlying medical problem and its significance. After undergoing heart coronary artery bypass surgery, patients are sent to the CICU for recovery, where, for certain medical reasons, some of them demonstrate elevated MAP (i.e., hypertension). This condition could be dangerous or even harmful to the heart. To lower the pressure, a fast-acting vasodilator drug called sodium nitroprusside (SNP) is routinely used in hospitals. The drug is administered intravenously by a digital drug pump whose infusion rate is set manually by the attending nurse. SNP is potent and can start to reduce MAP within a couple of minutes. SNP's powerful and rapid action requires that the nurse take on the task of frequent monitoring of MAP followed by adjustment of SNP infusion rate. Because the nurse has many other duties, inappropriate or infrequent control actions on SNP adjustment often occur, leading to poor MAP performance. To improve the quality of patient care, automatic control SNP delivery systems have been developed. The first system, developed in the mid-1970s [184], used a PI controller whose proportional-gain and integral-gain changed according to a gain table tied to the current state and trend of ~ Thus, the controller was a nonlinear PI controller with variable gains. However, unlike the fuzzy Pill controllers whose gain variation is inherent, the gain variation mechanism of this conventional PI controller was introduced by the gain table. Various other control algorithms, including nonlinear adaptive control, multiple-model adaptive control, and adaptive multivariable control, were later developed and tested at
Section 8.3. • Mamdani Fuzzy PI Control of Mean Arterial Pressure in Postsurgical Cardiac Patients 257
other clinics (e.g., [9][84][148][152][165][171][215]). Clinical study indicated that automatic control was superior to manual control [45].
8.3.2. Patient Model The success of developing these drug delivery control systems, especially the adaptive ones, depended heavily on mathematical models of the patients. It is rather rare in biomedicine in that they could utilize a well-established model describing the relationship between SNP infusion rate, SNP(s), and change in MAP in patients, ~P(s) [189]: AMAP(s) SNP(s)
K· e- 30S( 1
+ 0.4e- 50s )
=------40s + 1
(8.1)
K represented the sensitivity of patients to S~ K is -0.72 for normal (i.e., typical) patients, -0.18 for insensitive patients, and -2.88 for sensitive patients [190]. K is negative because increasing the SNP infusion rate causes a decrease of ~ The ratio between the oversensitive and insensitive patients is high-16: 1. Yet, it only covers about 95% of the patients; the remaining 5% are outliers, and their sensitivities can be extremely high or low [188]. Any clinically useful control system must be capable of coping with all the possible sensitivities and providing robust performance. The model, though very useful and extensively utilized, is still simplistic, as it cannot accurately reflect every aspect of the system characteristics. The real system is far more complicated and is nonlinear and time-varying.
8.3.3. Design of Fuzzy Control Drug Delivery System The fuzzy control system (Fig. 8.1) was developed to maintain desired MAP in patients in the CICU ofthe Carraway Methodist Medical Center in Birmingham, Alabama. A HewlettPackard 78534 Monitor/Terminal was used to collect, process, and display MAP, systolic pressure, diastolic pressure, left atrial pressure, right atrial pressure, heart rate, and the electrocardiogram. A Puritan-Bennett 7200a Microprocessor Ventilator was connected to the patients to maintain respiration. MAP values were fed from the Hewlett-Packard Monitor into an ffiM PS/2 Model 70 computer which ran the fuzzy controller encoded in C programing language. The program execution time for each input was only a fraction of a second. The
Simplest Mamdani fuzzy PI controller
Figure 8.1 Fuzzy SNP drug delivery control system for patients' MAP regulation.
MAP(n)
Chapter 8 •
258
Real-Time Fuzzy Control of Biomedical Systems
SNP infusion rate calculated by the fuzzy controller was sent to an Abbott/Shaw LifeCare™ Pump Model 4. The pump infused SNP intravenously to patients. The core of the system was a fuzzy controller, which was the simplest fuzzy PI controller (for its structure see Table 3.5). The computation ofr(n) was slightly different, and we used r(n) = (e(n) - e(n - 1))/T. There were six adjustable controller design parameters, namely, K e , K r , K d u , H, L, and T. In the literature, T = 10 was recommended, and thus this value was used in our study. To reduce the number of parameters, we let H = L. Designing the control system involved determining and tuning the rest of the four parameters. The nonlinearity of the fuzzy PI controller could be adjusted by changing the values of K e , K r , and L. (K d u does not affect the nonlinearity.) The nonlinearity had to be confined within an adequate range. This confinement was important in order to adapt to a wider range of the patient's dynamic parameters and to restrict the adverse effects possibly associated with the fuzzy controller. Most importantly,properly limiting the range of the nonlinearity and thus avoiding some possible unstable states of the fuzzy control system improved the safety of the patients, especially those who were extremely sensitive to SNE The controller structure was utilized to help determine and tune the parameters. For fixed L, the larger the K; and/or K; values were, the more nonlinear the controller was. We chose the same K; and K; values as those used in our animal experiments [252] for initial patient trials, that is, K; = 0.25 and K; = 8.0. We increased L from 10, used in the animal study, to 16 to avoid possibly excessive overshoot of MAP for the sensitive patients. Our computer simulation showed that the overshoot of MAP was lowered from 16.4% for L = 10 to 13.2% for L = 16, as shown in Fig. 8.2, when the sensitive patients (K = -2.88) were controlled. After the determination of T, Ke , K; and L values, the value of K d u was to be set. K d u was a negative number since the patient sensitivity, K, was negative. K d u affected the overall gain of the fuzzy controller. The larger the absolute value of K d u , the greater the proportional-
K e=O.25,Kr=8.0, K~u=-0.6, K=-2.88, T=10, MAP setpoint=l 00 mm Hg ISO
140
...... L=lO --L=16
130
iE g
~
~
120
110
100
90
80
-+---.....-----,~-r-
o
100
200
300
__- - - . - - -
400
SOO
-~-~-r_______r-___._-__,.I
600
700
800
900
1000
1100
1200
Time (second)
Figure 8.2 Computer simulation showing the effect of increasing the value of L from 10 to 16 on the performance of the fuzzy controller regulating MAP in the sensitive patients (K = -2.88).
Section 8.3. • Mamdani Fuzzy PI Control of Mean Arterial Pressure in Postsurgical Cardiac Patients 259 Ke=O.2S, Kr=8.0, L=16, K=-2.88, T=10, MAP setpoint-lOO mID Hg ISO
...... ... K l1u=.. O.8
140
- K AM=-O.6 130
i
I
~
120
110
..........
100
90 80 +---_-.,...--........--r__---.po-----.,.---,.-_-__- _ - _ -........
o
100
200
300
400
SOO
600
700
800
900
1000
1100
1200
Time (second)
Figure 8.3 Computer simulation showing the effect of K!1u changing from -0.8 to -0.6 on the performance of the fuzzy controller regulating MAP in the sensitive patients (K = -2.88).
gain and integral-gain. Too large an absolute value of K Au could cause the SNP control system to become unstable. This was especially true when patients were extremely sensitive to S~ The K Au value used in the pig experiments was -0.8. To attenuate a possibly large overshoot of MAP and improve the patients' safety, the K Au value used in the patient trials was -0.6. The effect of K Au = -0.8 and K Au = -0.6 on MAP performance for both the sensitive patients (K = -2.88) and the normal patients (K = -0.72) is shown in Figs. 8.3 and 8.4, respectively. According to the figures, reduction of the absolute value of K Au resulted in the decrease of overshoot of MAP from 18.6% to 13.2% for the sensitive patients at the expense ofprolonging the rise-time of MAP from 100 seconds to 120 seconds for the normal patients. This necessary compromise improved the stability of the fuzzy control system for the sensitive patients while losing little dynamic control performance for the normal patients. To improve the patients' safety, we limited the maximum increment of SNP infusion rate to 7.0mljhr for any sampling time. We also set the increment ofSNP infusion rate to zero when MAP was more than 20 mm Hg below the MAP setpoint and when calculated SNP infusion rate was less than zero. These measures were similar to those used in [184].
8.3.4. Clinical Implementation and Fine Tuning of Fuzzy Controller This designed fuzzy control system was applied to patients with the approval of the hospital and the consent of the patients. Twelve patients who exhibited elevated MAP following coronary artery bypass grafting procedures took part in the study. Typically, the trials began within one to two hours after the patients arrived in the CICU. The typical MAP
260
Chapter 8 •
Real-Time Fuzzy Control of Biomedical Systems
K e=O.2S, K r=8.0, L=16, K=-O.72, T=lO, MAP setpoint=lOO mmHg 1'0 ........- - - - - - - - - - - - - - - - - - - - - - - -.......
140
- - - KAu--O.8 - KAU= - O.6
130
\"" 100
· ··..···
:::..::-:..':": :'..':': :':':~------------I
90 80
+--....,.--...,...---r-----r--~----r----r--r---~-....---..,.--...,.,
o
100
200
300
400
SOO
600
700
800
900
1000
1100
1200
Time(second) Figure 8.4 Computer simulation showing the effect of changing K!1u from -0.8 to -0.6 on the performance of the fuzzy controller regulating MAP in the normal patients (K = -0.72).
setpoint, determined by the attending doctors or the nurses, was 80 mm Hg. The fuzzy control system was started by technical personnel when the attending nurses thought a patient needed S~ The fuzzy control system was always initiated at a SNP infusion rate of zero. The technical personnel constantly monitored the operation of the control system. During the operation of the fuzzy control system, the nurses gave the patient no special care. We soon found that the controller parameters needed to be improved. In the first two patient trials, it was found that the SNP infusion rate was not regulated satisfactorily to handle the rapid and large changes associated with ~ We analyzed the results and concluded that the fuzzy controller did not increase or decrease the SNP infusion rate fast enough when MAP was changing dramatically. The problem occurred owing to the fuzzy controller's inadequate nonlinearity and lack of sensitivity with respect to r(n) of MAE To achieve better results, the parameters of the fuzzy controller chosen before the clinical trials were modified. The patient model (8.1) was utilized to further tune the parameters of the fuzzy controller, especially K r , which scaled r(n) of ~ By varying the nonlinearity and sensitivity ofthe fuzzy controller with respect to r(n) of MAP for patients with different sensitivities, a larger K; value 13.5 was found, which resulted in better control performance. Figures 8.5 and 8.6 demonstrate the simulated results for the sensitive patients (K = -2.88) and the normal patients (K = -0.72) before and after K; was increased from 8.0 to 13.5. Obviously, the larger K; made the fuzzy control system considerably more robust. Consequently, the performance of the fuzzy controller was significantly improved, and better clinical results were obtained for the remaining 10 patients with the same parameter values.
Section 8.3. • Mamdani Fuzzy PI Control of Mean Arterial Pressure in Postsurgical Cardiac Patients 261
Ke=O.25, K.\U=-O.6, L=16,K=-2.88, T=10, MAP setpoint=l00 mm Hg 150 140
- - - K,==8.0 _.- K,==13.S
130 ~
~
·9
120
~
110
'-'
100
,
90
\
80
\ .....
-+--....,..--.....---....--.....--......---,r---...,...---,.---,-----,---,----rI
o
100
200
300
400
SOO
600
700
800
900
1000
1100
Time (second) Figure 8.5 Simulated comparison of MAP in the sensitive patients (K = -2.88) before and after increasing the value of K, from 8.0 to 13.5.
K e=O.25, K AU=-O.6, L=16, K=-O.72, T=IO, MAP setpoint-lOO mm Hg ISO. . . - - - - - - - - - - - - - - - - - - - - - - - - - - , 140
- - -Kr=8.0 -K,=13.5
130
:i .....
! ~
120
..
\
110
•..... ~~.iI'ft'ft
I
•••••••••••••••••••••••••• ;:-: •••::-: •••:':':' ••:::: ••• • •
100 90
10 +--..,..---,-.-...,..--...,....-...,....-...,....-..,.....-...,...-...,...--y--......-----rI
o
100
200
300
400
SOO
600
700
800
900
1000
1100
1200
Time (second)
Figure 8.6 Simulated comparison of MAP in the normal patients (K after increasing the value of K, from 8.0 to 13.5.
= -0.72) before and
1200
Chapter 8 •
262
Real- Time Fuzzy Control of Biomedical Systems
8.3.5. Clinical Results Figure 8.7 shows a typical trend plot of both MAP and the corresponding SNP infusion rate obtained from a fuzzy controller-controlled patient, after the larger K; was implemented. Figure 8.8 illustrates how the variable proportional-gain Kp(e,r) and integral-gain K;(e,r) of the fuzzy PI controller continuously changed with time to cope with the nonlinearities of the MAP response shown in Fig. 8.7, compared to the constant proportional-gain Kp(O,O) and the integral-gain K;(O,O) of the corresponding linear PI controller. During all 12 trials, the nurses performed all normal patient care duties. Their duties included sampling patient blood, suctioning the patient to clear his/her airway, bathing the patient, changing bed linen, injecting drugs other than S~ infusing blood, and so on. MAP in the patients frequently fluctuated considerably when the above-mentioned duties were being carried out. Sampling blood normally caused MAP to jump up to a high value (say, 150mmHg) or down to a low value (say, 20mmHg) within a very short period of time (a
Patient #6, MAP setpoint=80 nun Hg,
K~=O.25,
K,=13.5, KA U=-O.6, L=16, T=10
200 175
co
150
:x:
12S
,S
100
E
0..
< ~
75 50
2S 0
12:23
13:13
14:03
14:53
15:43
16:34
J7:24
18:14
19:04
19:54
16:34 Time (b)
17:24
18:14
19:04
19:54
(a)
150 125
~
!
100
~
e
a
:! .$ ~
Z
75 50
V,)
25
13:13
14:03
14:53
15:43
Figure 8.7 (a) MAP response for a patient obtained by using the fuzzy control SNP delivery system clinically; and (b) the corresponding SNP infusion rate. The patient had blood sampled at 12:57,13:42,15:18,15:56, and 17:50. Suctioning the patient began at 13:04, 17:00, and 19:17. The patient was bathed between 15:36 and 15:50. Changing bed linens started at 19:45 and lasted several minutes. Injection of Valium took place at 13:09, 14:41, and 17:57. The drugs Pavulon and Morphine were injected into the patient at 14:50 and 17:10, respectively.
Section 8.3. •
Mamdani Fuzzy PI Control of Mean Arterial Pressure in Postsurgical Cardiac Patients 263
Patient #6, MAP setpoint=80 rnm Hg, Ke=O.25, Kr13 .5, K6U=-0 .6, L=16, T=10 50
"""' :1? 0
40
'-'
S 0 'S: 30 ~
"""' """' 0
0
'-"
Q.
::.:: 20 ,-..
... I
cJ
'-'
Q.
~ 10
o .t-:Jo-~:P-ilU-+ 12:23
13:13
14:03
14:53
15:43
16:34
17:24
18:14
19:04
19:54
Time Figure 8.8 Comparison of the variable proportional-gain of the nonlinear PI controller realized by the fuzzy PI controller to the constant proportional-gain of the corresponding linear PI controller (i.e., Kp(e,r) - Kp(O ,O»/KP(O,O» showed change of Kp(e,r) over time corresponding to the nonlinearities in MAP for this patient. Change of K;(e,r) over time is the same as that of Kp(e,r) since (K;(e,r) - K;(O,O»/K;(O,O) = (Kp(e,r) - Kp(O ,O»/Kp(O,O).
couple of seconds). This temporary fluctuation of MAP signal can be filtered by a digital filter. Such a digital filter, however, was not used in our trials. The fuzzy controller was manually put into a hold mode right before blood was sampled. The hold mode of the fuzzy controller ignored the MAP signal and sent the previous SNP infusion rate as the current rate to the infusion pump. Fuzzy control resumed upon completion of sampling. The fuzzy controller was always in operation when the patients were being injected with other drugs or infused with blood. The fuzzy controller was generally in operation when the patients were being suctioned, bathed, or having bed linens changed. Suctioning, bathing, and changing bed linen usually caused large fluctuations of MAP, especially when such activities were prolonged. The fuzzy control was sometimes temporarily put into the hold mode if the fluctuation of MAP was too large, and it resumed immediately after the duties were performed . The patient whose MAP is shown in Fig. 8.7 had blood sampled at 12:57, 13:42, 15:18, 15:56, and 17:50. Those very sharp MAP spikes represent the event of sampling blood. Suctioning the patient began at 13:04, 17:00, and 19:17. The patient was bathed between 15:36 and 15:50. Changing bed linens started at 19:45 and lasted several minutes. Injection of
Chapter 8 •
264
Real- Time Fuzzy Control of Biomedical Systems
Valium, a drug, took place at 13:09, 14:41, and 17:57. The drugs Pavulon and Morphine were injected into the patient at 14:50 and 17:10, respectively. Besides the situations listed above, other factors also affected ~ Substantial fluctuation of MAP took place as the body temperature of the patients was rising or when the patients were in pain. Spontaneous fluctuation of MAP occurred as well. In addition, the patients' sensitivity to SNP changed with time in an unknown manner. The response delay to SNP varied with time and among the patients. Nevertheless, as Fig. 8.7 illustrates, the fuzzy control SNP delivery system regulated MAP satisfactorily even with the fluctuation of MAP caused by the various factors stated above. For this patient, the percentage of time in which MAP stayed within the band between 90% and 110% of the MAP setpoint was 86.5%. The trial lasted 7 hours and 49 minutes. The length of time that 12 patients were on the fuzzy control system ranged from 1 hour 45 minutes to 18 hours 7 minutes. Some patients needed the aid from the control system longer than the others. The total fuzzy-controller run time was 95 hours 13 minutes. This includes the time for the patient trials undertaken both before and after the further tuning of the controller parameters. The times for which the SNP infusion rate was zero and the patients' own system was regulating MAP were excluded. The time for which the fuzzy controller was put in the hold mode was also excluded. For the sampling period T = 10 seconds, 34,278 MAP samples were collected from the patients. The overall performance of the fuzzy control SNP delivery system in 12 patient trials is summarized in Table 8.1, which shows that MAP was tightly controlled around the desired MAP levels. A wide variation of patient sensitivity to SNP was experienced during the clinical trials. Even though different patient sensitivities resulted in different MAP responses, it was not estimated since the fuzzy controller did not need the sensitivies. The fuzzy controller could cope with different sensitivities by continuously adjusting its proportional-gain and integralgain. To evaluate the ability of the fuzzy control system handling the patients with different sensitivities, computer simulation was conducted by again using the patient mathematical model (8.1). The simulated results illustrated in Fig. 8.9 indicate that the clinically fine-tuned fuzzy control SNP system could adapt to a wide range of patient sensitivities, from the sensitive patients (K = -2.88) to the insensitive patients (K = -0.18), a ratio of 16: 1. This range of sensitivity covers that of most patients. The results of the clinical trials on 12 patients revealed that the performance of the fuzzy PI control SNP delivery system was clinically acceptable. Based on the clinical results and the simulated results, the fuzzy control SNP delivery system is expected to perform well for most patients. The successful implementation of the fuzzy PI control of MAP in patients shows effectiveness in a case involving nonlinearity, time delay, and time variance. This fuzzy controller as well as the other fuzzy PID controllers should also be effective in physiological or engineering systems involving these dynamic characteristics.
TABLE 8.1 Intervals.a
Mean Percent and Standard Deviation of Total Fuzzy Controller Run Time for Different MAP < 0.8
Mean percent Standard deviation
X
MAPd
1.00 1.09
(O.8--Q.9) X MAPd 3.92 2.72
(O.9-1.1)xMAPd 89.31 4.96
"The calculation is based on 12 patient trials. MAPd is the MAP setpoint.
(1.1-1.2)xMAPd 3.85 1.84
> 1.2
X
MAPd
1.92 1.14
Section 8.4. • Thermal Treatr-ent of Tissue Lesions
265
Ke=O.25, Kr=13.5, KAu=-O.6, L=16,T=10, MAP setpoint=100 mm Hg 150 -
140
130
'bO
=x:
120
~
110
!
-K--O.18
-K--O.72 •.... K-·2.88
100 90
80 0
200
400
600
800
1000
1200
1400
1600
1800
Time (second)
Figure 8.9 Simulated MAP for sensitive patients (K = -2.88), normal patients (K = -0.72), and insensitive patients (K = -0.18), using the clinically fine-tuned parameters of the fuzzy controller.
This application shows, in a convincing way, that even the simplest fuzzy controller can achieve excellent results. Its performance is superior to that of a linear Pill controller whose performance is known to be unsatisfactory according to prior investigations by other groups of researchers. The main reason is that the fuzzy controller is a nonlinear PI controller with variable gains. Thus, it can effectively handle nonlinearity, time variance, and time delay, all of which are present in the physiological system.
8.4. THERMAL TREATMENT OF TISSUE LESIONS 8.4.1. Different Kinds of Thermal Therapies Thermal therapies utilizing lasers, microwaves, radio frequency irradiation, highintensity focused ultrasound, and other thermal modalities have shown great promise and potential for minimally invasive surgery. At present, most treatments are manually administered. Regardless of heating modalities, there are four different types of thermal therapies. The first type is hyperthermia therapy in which temperature in diseased tissue, such as benign and malignant tumors, is maintained in the range of 43-46°C for an extended period of time (e.g., 20 minutes) to effectively destroy the lesion. Clinical studies have found several reasons responsible for failure of some hyperthermia therapies, one of which is the absence of tightly controlled temperature distributions in the treated tissue. It is clinically desirable that temperature in treated tissue rise quickly to a preferred level (e.g., 44°C) and stay at that level throughout the treatment to ensure the killing of the diseased tissue volume. To protect the surrounding normal tissues and make the treatment outcome more predictable, temperature in the treated tissue should fluctuate only slightly (e.g., 1°C) around the preferred temperature level.
Chapter 8 • Real-Time Fuzzy Control of Biomedical Systems
266
The second type of thermal therapy is coagulation therapy in which thermal energy causes tissue protein denaturation whose threshold temperature is around 55-65°C, depending on tissue type. The third type is tissue welding: Two pieces of tissue placed next to each other are connected when thermal energy is applied to heat the interface area. The welding quality depends on temperature. Strong tissue fusion may not be possible when temperature is below 70°C, but it can be accomplished between 80 and 100°C. The last type is ablation treatment in which tissue is removed through vaporization by thermal energy at temperatures above 100°C. Tissue charring may occur as well. One example that highlights the potential importance of various thermal therapies is laser photocoagulation of benign prostate hyperplasia. The disease is a significant health problem primarily for older men, many of whom have major preexisting medical problems. Based on autopsy studies, almost 60% of men have evidence of prostatic hyperplasia at the ages of 61-70, and about half of them present clinical signs and symptoms of benign prostate enlargement. Each year an estimated 400,000 men in the United States undergo some type of surgical procedure for treatment of the disease. Prostatectomy is the second most common procedure reimbursed by Medicare, with an estimated cost of $300 million per year in the early 1990s. Transurethral resection of the prostate is the primary method for treating benign prostate hyperplasia. It is the tenth most frequent operative procedure overall and one of the most common operations performed by urologists. Prostate cancer is another striking example. In the Western world, it is the second leading cause of cancer deaths among men. In 1991, roughly 122,000 cases of prostate cancer were diagnosed, and some 32,000 men died from this disease. To reduce the morbidity from surgical treatment and to offer better alternative treatments, laser treatment of benign prostate hyperplasia has been investigated. Other thermal modalities have also been tested for the same purpose. Preliminary clinical study results suggest that thermal treatment causes less patient trauma, less operation time, fewer complications, and a shorter hospital stay. Studies also indicate that prostate cancer patients may also benefit from thermal treatment.
8.4.2. Statement of Problems Thermal therapies have their shortcomings and limitations. At present, the most urgent and significant issue is how to completely destroy diseased tissue without producing thermal damage to the surrounding normal tissue. This issue becomes especially important for thermal treatment of many life-threateningdiseases, such as tumors, at a critical position (e.g., brain). In any thermal therapy, it is vital to know, quantitatively and in real time, the extent and geometry of tissue thermal damage. Unfortunately, a clinically viable method capable of generating such information is still unavailable. Consequently, thermal treatments are currently being performed under human monitoring without knowing the status of thermal damage deep within the tissue. This often results in undesirable treatment outcome and increased treatment cost. Tissue temperature control is important to any type of thermal therapy because the treatment outcome depends primarily on temporal and spatial temperature profiles. If temperature is controlled at a constant level, estimating the treatment result, though still difficult, becomes at least more reliable and consistent. Nevertheless, this is only an indirect approach to controlling thermal damage. The relationship between temperature history/ profile and damage status depends on many factors, such as treatment type, tissue properties (e.g., type, color and inhomogeneity), local blood perfusion and parameters of the heating
Section 8.4. •
Thermal Treatment of Tissue Lesions
267
modality. Furthermore, tissue properties change rapidly with heating time during coagulation, welding, and ablation treatment. For such reasons, accurate determination of the relationship has been difficult. To establish a constant temperature field, the temperature of the treatment volume should be raised to a setpoint level quickly and be maintained at that level thereafter. Because of the high sensitivity of the damage integral to small changes in temperature, feedback control of tissue temperature within a narrow margin is needed. In other words, real-time automatic control of thermal effect is important for ensuring adequate treatment, with minimal thermal damage to neighboring normal tissue.
8.4.3. Laser Thermal Therapies We now focus on laser treatment, but the difficulties and issues involved are applicable to other thermal modalities as well. It is technically challenging to achieve closed-loop control of tissue temperature at a constant level. Temporal and spatial profiles of tissue temperature depend not only on laser irradiation parameters (e.g., laser power and duration), but also on the optical and thermal properties of the tissue. These properties are not constant and can quickly and dramatically change owing to laser irradiation, especially during coagulation, welding, and ablation treatments. The tissue properties in different body locations can be significantly different, even if their appearances look very much the same. The differences are due to tissue heterogeneity, color, local vessels and blood circulation/perfusion, water content, fat, and so on. Some of them are unknown because they are determined by tissue conditions and physical properties not only on the surface but also in deeper layers beneath the surface, which cannot be seen or even qualitatively evaluated. All of these factors affect the laser-tissue interaction as light absorption of tissue depends on these factors. The effect is quantitatively unpredictable, and worse yet, it can be substantially different from subject to subject. For tissue used in in vitro study, all these factors remain except the presence of blood circulation. One additional uncertain factor, however, is tissue freshness, which directly determines the physical properties of tissue. Clearly, the biomedical system is nonlinear and time-varying. Moreover, it has a time-delay component as heat transportation takes time. Different control algorithms have been applied to laser hyperthermia (e.g., [47][49][158][214][234]), laser coagulation (e.g., [61][159][235][276]) and laser-tissue welding (e.g., [44][100][173][183][193][194]). The algorithms include on-off control, pulsed control, Pill control, adaptive control, and self-tuning control. Designing these control algorithms requires an accurate mathematical model relating thermal response of tissue to laser. As pointed out earlier, biomedical systems are inherently nonlinear and time-varying. Precisely modeling laser-tissue interaction and heat-tissue interaction is extremely difficult, if possible at all. The transport and deposition of heat in tissue is a complex process involving conduction, convection, radiation, metabolism, evaporation, and physical phase change. In addition, different selection of treatment parameters, such as heating rate and duration, dramatically influences the overall tissue response (e.g., [12][71][150][169][228]). As such, model imprecision is inevitable, which not only will degrade the performance of a designed controller but also could result in system instability. In the face of these practical constraints, fuzzy control is a logical and ideal solution to the problems.
268
Chapter 8 • Real-Time Fuzzy Control of Biomedical Systems
8.5. FUZZY PO CONTROL OF TISSUE TEMPERATURE DURING LASER HEATING
This section presents a Mamdani fuzzy PD laser control system for real-time tissue temperature control in hyperthermia, coagulation, and welding applications. The system was tested in the laboratory. 8.5.1. Experimental setup
The experimental setup of the laser control system is shown in Fig. 8.10. The system hardware consists of a Pentium 166 MHz computer with a l6-bit I/O board (AT-MIO-I6X, National Instruments, Inc.), a 8IO-nm diode laser (Diomed Ltd., UK) whose energy is delivered through a 600-llm diameter optical fiber, a type T, 30 gauge micro-thermocouple (Omega Engineering, Inc.), and a temperature scanner (ScannerPlus, Azonix Corporation). The size of the fresh pig liver sample, bought from a local grocery store, is about 80 x 50 x 20 mm". The thermocouple is for measuring tissue temperature as a feedback signal for the fuzzy controller. The temperature scanner reads the thermocouple every 100 ms. This amount of time is the minimal needed for completing one scan cycle because it takes 50 ms for the scanner to read one temperature channel and another 50 ms to read a reference channel in every cycle. It is well known that if a thermocouple is placed in tissue in the laser beam pathway, the temperature reading will be higher than the actual temperature because of the direct interaction between the laser and the thermocouple. We have experimentally deterPentium 166 MHz PC with measurement and control program
Laser ON-OFF signal sequence
IIMicrothermocouple
Diode laser
Water surface Pig liver sample - f - - - - - . Water tank -+
-, Laser beam
Optical fiber
Figure 8.10 Experimental setup for fuzzy laser control of tissue temperature.
Section 8.5. •
Fuzzy PD Control of Tissue Temperature During Laser Heating
269
mined that temperature measurement is precise if the laser is periodically turned off temporarily for 20 ms before measurement. The laser is automatically controlled in such a way that it is switched off for 100 ms before the scanner reads and transfers the temperature data to the PC via a RS232 series port. The length of data transfer time is a variable, ranging from dozens of milliseconds to a few seconds, depending on the on signal duration for the laser, which is computed by the fuzzy controller. The laser energy is delivered via the optical fiber fixed in such a way that it is perpendicular to the liver sample surface to be irradiated. For the hyperthermia and coagulation experiments, the distance between the liver sample surface and fiber tip is 5 mm. The diameter of the laser spot on the tissue surface is about 8 mm. In the tissue welding experiments, the distance is 3 mm and the diameter about 6 mm. An apparatus has been made, which contains a thin hollow needle for guiding the insertion of the thermocouple into the tissue to a desired position. Before laser irradiation, the needle is inserted into the tissue, and it stops when the needle tip is on the laser beam path. (That is, it is perpendicular to the fiber, and its tip is in the central area of the laser spot extended into the tissue.) The position of the needle tip is the place that the thermocouple tip should be. The thermocouple is then inserted through the needle until the tip of the thermocouple is positioned correctly. This apparatus also permits accurate control over the distance between the needle tip and the tissue surface. We let the distance be 5 mm and 1 mm in the hyperthermia and coagulation experiments, respectively. For the tissue welding experiments, the distance is set at 0.5 mID. The initial temperature of tank water is always about 32°C. Although real-time regulation of diode laser output power is achievable in theory by adjusting the laser's driving current, such a laser device is rarely commercially available and is unavailable to us. Thus, the output power of the diode laser in our study cannot be changed during experiments. Alternatively, we use the on-off signal sequence and manipulate on and off duration in real time to govern the average laser power delivered to the tissue. The on or off signal is sent to the laser device via a digital I/O port of the I/O board. The laser, operating in continuous mode, is turned on when the tissue temperature is below the temperature setpoint, and it is switched off when the temperature is above the setpoint. An invariant on-off sequence would fail to maintain a constant temperature, and a time-varying on-off sequence is necessary. This is because, from the system viewpoint, laser-tissue heating is a highly nonlinear and time-varying dynamic system, owing to the reasons stated above. In the experiments, laser output power is set at 15 W on the console, and optical fiber efficiency is measured to be about 75%. Thus, the maximum output power is about 11.25 W The hardware system is controlled by a user-friendly measurement and control program that we have developed using the LabVIEW™ software package. The temperature data and on-off duration are plotted on the computer screen during the experiments. All data are saved on the computer disk for later analysis.
8.5.2. Design of Mamdani Fuzzy PD Controller The core of the system is the fuzzy controller, which computes the time-varying duration of the on and off signals. We now describe its design in detail. Figure 8.11 provides a block diagram of the fuzzy control system. The input variables are the error and rate of tissue temperature: E(tk ) R(tk )
= K; . e(tk ) = Ke(S(tk ) = K; . r(t k ) = Kr(e(tk ) -
y(tk ) ) , e(tk -
1) ) ,
Chapter 8 • Real-Time Fuzzy Control of Biomedical Systems
270
Tissue __- - - -......temperature y(tk) Thermocouple
Mamdani Fuzzy PD controller
Figure 8.11 Block diagram of fuzzy temperature control system.
where tk is variable sampling time, S(tk) a referencejsetpoint temperature signal, and y(tk) measured tissue temperature. That t k is a variable implies that the length of sampling period is also a variable. This differs from all the other fuzzy controllers in this book because their sampling time intervals are always regular (i.e., equally spaced). In this application, we chose K; = 1 and K, = 1. Each variable is fuzzified by four fuzzy sets, namely, Positive (P), Positive Zero (Zp), Negative Zero (ZN)' and Negative (N). Their graphical definitions are shown in Fig. 8.12. Using x(t k) to represent e(tk) and r(tk), we find that the mathematical definitions are as follows (K represents or K r ) :
s,
1, Jlp(x) =
[L,oo)
Kx(tk) L
[O,L]
(-00,0],
0, 0, Jlzp(x) =
JlzN(x) =
[L,oo)
L - Kx(tk)
[O,L]
L
0,
(-00,0],
0,
[0,(0)
L
+ Kx(tk)
[-L,O]
L
0,
JlFl(x) =
(-00, - L],
0,
[0,(0)
Kx(tk) --L
[-L,O]
1,
(-00, - L],
where L is a design parameter. Note that
+ Jlzp(x) = 1, JlFl(x) + JlzN(x) = 1, Jlp(X)
X
E [O,L],
x E [-L,O].
Section 8.5. •
Fuzzy PD Control of Tissue Temperature During Laser Heating
271
Membership Positive
Negative
-L
o
L
Figure 8.12 Fuzzy sets for scaled input variable E(tk ) and R(t k ) of the fuzzy controller.
There are two output variables: (1) Ton(tk ) representing how long the laser will be on until the next sampling time tk+1, and (2) Toff(tk ) representing the duration of laser in the off mode until the next sampling moment. Eight singleton output fuzzy sets are used (Fig. 8.13). Four of them describe how long the laser will stay on; they are nonzero only at Ton(tk ) = 7:Ln, 7:M, 7:5P, and 't'VS, where the subscripts denote respectively a Long, Moderate, Short, and Very Shortjeriod oftime. The other four have nonzero membership values only at r« (t k ) = 7:1, 7:1, 7:~ ,and 7:~, and denote, respectively, that the laser will be turned off for Long, Moderate, Short and Very Short periods of time. The input and output variables are related by 16 fuzzy rules (Table 8.2), which are equally divided into two groups. The first group, containing rl to r8, is used to turn the laser off, and the second group, r9 to r16, is used to switch the laser on. At any time, only one rule group is activated. If the current temperature is above the setpoint, the first rule group is used. Otherwise, the second rule group will be involved. The table format is often more concise than the exhaustive rule listing approach, especially when the number of rules is large. The table format can easily be translated to rule listing. For example, r14 is
The Zadeh fuzzy logic AND operator is used to evaluate the individual fuzzy rules, and the Zadeh fuzzy logic OR operator is employed to evaluate the implied OR between the fuzzy rules with the same output fuzzy sets. Two centroid defuzzifiers are used: one for computing Ton(tk ) and the other for Toff(tk ) . At any time, only one defuzzifier is active.
8.5.3. Derivation of Fuzzy Controller Structure and Explicit Results To obtain the analytical structure of the fuzzy controller, the E(tk ) - R(tk ) plane must be divided into 28 ICs, as shown in Fig. 8.14. Only these divisions permit analytical derivation of the controller structure. We then derive the fuzzy controller structure in each of the 28 ICs. ICA i , ICB i , ICCi , and ICD;, where i = 1, ... , 7, are used, respectively, by rl to r4, r9 to r12,
Chapter 8 • Real-Time Fuzzy Control of Biomedical Systems
272
Membership -ron S 4.
1
Ton(tk) ...
0
~
(a)
Membership
1
.,.off YS 4~
0ff
-rS
4.
o
-rL0ff
.,.ojf M
4.
4.
(b)
Figure 8.13 Singleton output fuzzy sets of the fuzzy controller: (a) four fuzzy sets for Ton(tk), and (b) four fuzzy sets for TojJ(tk).
TABLE 8.2
Sixteen Fuzzy Rules."
r:1 (r6) r:1!f (r8)
r:j:J (rI4) r:Ln (rI6)
r:~ (r5) r:~
(r7) r: n (rI3) r:j:J (rI5)
s
r:~ (r2)
(r4) (rIO) r:j:J (r12) r:~
-r
r:1 (rl) r:: (r3) r:~
r:
(1'9)
s (rll) n
"The first group, r1 to r8, is used to turn the laser off, and the second group, 1'9 to r16, to switch the laser on.
Section 8.5. • Fuzzy PD Control of Tissue Temperature During Laser Heating
273
R(tk)
B6
B7
A6
L
B3 Bs
A3 B2
B4
A2
Bl -L
Cs
0
C2
C6
As
L
Dl
D2
C3 C7
A4 Al
Cl C4
A7
D4
E(tk)
Ds
D3 -L
D6
D7
Figure 8.14 Division of E(tk ) - R(t k ) plane into 28 ICs for analytically deriving the fuzzy controller structure.
r13 to r16, and r5 to r8. Table 8.3 gives the results of the Zadeh fuzzy logic AND and OR operations, together with resulting controller structure. According to the table, ICA l to ICA 7 and ICD l to ICD 7 produce Toff(tk), and the rest of the ICs generate Ton(tk). Both Toff(tk) and Ton(tk) are nonlinear PD controllers with variable gains and variable control offsets:
and
Ton(tk) = K;n(e(tk), r(t k))· e(tk), +Kdn(e(tk), r(tk))· r(tk) + eon(e(tk), r(t k)), ff where K;ff(e(tk), r(t k)) and K;n(e(tk), r(tk)) are variable proportional-gain, IG (e(tk) , r(t k)) ff and Kdn(e(tk), r(t k)) are variable derivative-gain, and eo (e(t k) , r(t k)) and eon(e(tk), r(t k)) are variable control offsets. Their expressions are different in different ICs and can be obtained directly from Table 8.3. The fuzzy controller outputs a sequence of Ton(tk) and Toff(tk) signals to regulate the laser output power. Assuming that there are M consecutive Ton(tk) signals and N consecutive Toff(tk) signals in one on-off cycle (see Fig. 8.15), the average laser power delivered to the tissue in this one cycle is: I
where P is the laser output power on console, " is the optical fiber efficiency, e is a vector representing (e(tk ) , ••. , e(t k+M +N - l ) ) , and r and is a vector containing (r(t k), ... ,
274
Chapter 8 •
Real-Time Fuzzy Control of Biomedical Systems
TABLE8.3a Results of Applying the Zadeh Fuzzy Logic AND and OR Operations as Well as the Final Structure of the Mamdani Fuzzy PD Controller," Note that E{t k) = e{tk) and R{tk) = r{tk) because K; = 1 and K; = 1. rl
r2
r3
r4
r2 OR r3
Al
J-lp{r)
IIp{e)
Jlp{r)
Ilzp{e)
J-lp{e)
A2
IIp{e)
IIp{e)
Jlp{r)
Ilzp{r)
IIp{r)
A3
J-lp{e)
J-lzp(r)
Jlzp (e)
J-lzp{r)
J-lzp{e)
IC No.
Toff(t k) ( tM off -
t soff) e(tk) + tLoffr (tk) + t soffL L + r{tk) tLoffe(tk) + (off t M - t soff) r (tk) + t soffL L + e{tk) ( t Loff - tM Off)etk ( ) -tsoffrt () tM +tsoff)L k + (off 2L - r{tk)
-tsoffe(tk) + (off tL - tMOff)r (tk) + (off t M + t Off)L s
A4
J-lp{r)
Ilzp(r)
Jlzp (e)
Ilzp(e)
Ilzp(r)
As
J-lp{r)
Ilzp(r)
0
0
Ilzp(r)
A6
J-lp{e)
0
Jlzp (e)
0
J-lzp(e)
) (tOLff - tOff)e{t M k off +tM L
0
0
0
0
t Loff
A7
2L - e{tk)
(tot - t~)r{tk) L
off +tM
alCs are shown in Fig. 8.14. Table 8.3a: in ICA I to ICA 7 •
TABLE 8.3b
in ICB l to ICB 7 • r9
rIO
rll
rl2
rIO OR rll
Bl
J-lp{r)
J-lzN{e)
Jlp{r)
1lF1{e)
IlzN{e)
B2
J-lp{r)
J-lzp(r)
JlF1{e)
1lF1{e)
Ilzp{r)
B3
J-lzN{e)
J-lzp(r)
JlzN(e)
Ilzp{r)
1lF1{e)
B4
J-lzN{e)
J-lzN{e)
Jlp{r)
Ilzp{r)
J-lp{r)
Bs
0
0
Jlp{r)
Ilzp(r)
J-lp{r)
B6
J-lzN{e)
0
JlF1{e)
0
1lF1{e)
B7
0
0
IC No.
0
Ton (tk)
(tsn -
tM)e{tk) + tV'sr{tk) + tsnL L + r{tk)
-tMe{tk) +
(tV's -
(tV's -
tsn)r{tk) + tsnL L - e{tk)
tsn)e{tk) - tMr{tk) + 2L - r{tk)
tV'se{tk) +
(tsn -
tM)r{tk) + 2L + e{tk)
(tsn
-
(tV's -
(tV's + tM)L (tV's + tM)L
tM)r{tk) on L +tM tsn)e{tk) on L +tvs
tsn
Section 8.5. •
Fuzzy PD Control of Tissue Temperature During Laser Heating
275
in ICC 1 to ICC 7 •
TABLE 8.3c
Ton(tk)
rI3
rI4
rI5
r16
r14 OR rI5
C1
JlzN(e)
JlF1(r)
JlF1(e)
JlF1(r)
JlF1(e)
C2
JlzN(r)
JlF1(r)
JlF1(e)
JlF1(e)
JlF1(r)
C3
JlzN(r)
JlzN(e)
JlzN(r)
JlF1(e)
J1zN(e)
C4
JlzN(e)
JlzN(e)
JlzN(r)
JlF1(r)
JlzN(r)
Cs
0
0
JlzN(r)
JlF1(r)
JlzN(r)
C6
0
JlzN(e)
0
Jlil(e)
J1zN(e)
7:/J)e(tk) - 7:Lnr(tk) + 7: nL L - r(t k) ne(t -7: L k) + (r n - 7:/J)r(tk) + 7: nL L - e(tk) n n)e(t nr(t (7:/J - 7:L k) + 7:S k) + (7: + 7:/J)L 2L + r(t k) 7: Sne(tk) + (r/J - 7:Ln)r(t k) + (7: n + 7:/J)L 2L + e(t k) (7:/J - 7:Ln)r(t k) on L +7:M (7:/J - 7:Ln)e(tk) on L +7:M
C7
0
0
0
0
0n 7:M
Toff(tk)
ICNo.
s
s
s
s
in ICD l to ICD 7 •
TABLE 8.3d r5
r6
r7
r8
r6 OR r7
D1
Jlp(e)
JlF1(r)
Jlzp (e)
J1il(r)
Jlip (e)
D2
J1p(e)
Jlp(e)
JlzN(r)
J1il(r)
JliN (r)
D3
JlzN(r)
Jlp(e)
J1zN (r)
Jlzp (e)
J1p(e)
D4
JlzN(r)
JlF1(r)
Jlzp (e)
Jlzp (e)
J1iir)
Ds
JlzN(r)
JlF1(r)
0
0
Jlil(r)
D6
0
Jlp(e)
0
J1zp (e)
J1p(e)
D7
0
0
0
ICNo.
s
(rsn -
( 7: off M
Off)e() 7:s tk
() offL - 7:off vsr tk + 7:s
L - r(t k) () (Off off tk + 7:soffL 7: M e tk + 7:s - 7: off) ys r () L + e(t k) () +7:off () + (off ( 7:off -7:Off)etk 7: M +7:off)L YS Mrtk s YS 2L + r(t k) () (off off) r () tk + (off 7: M -7: off YSe tk + 7: M - 7:s 2L - e(tk)
7:~ff)r(tk)
off +7:M
(If - 7:~)e(tk)
off +7: YS
(7:Tf -
L
L
off
7:s
+ 7:Off)L YS
Chapter 8 • Real-Time Fuzzy Control of Biomedical Systems
276
J
M ON signals
I" "I
!
I
r-
tk
N OFF signals
th l
I
I
tk+M th M+1 th M+N
One ON-OFF cycle
----I
L
Figure 8.15 M consecutive ran(tk) and N con secutive (tk) signals in one on-off cycle, It., tk+ M+ Nl.
r«
r(tk+M+N-l)) . Substituting the expressions of Ton(tk) and TojJ(tk) into this expression for all the M on and N off signals, we obtain the following : Ptk,lHM+/e,r) = P
M-l
L
;=0
(K;n(e(t k+;), r(tk+;))e(tk+;)
+ Kdn(e(tk+;), r(tk+;))r(tk+;)
+ eon(e(tk+;), r(tk+;))) where
which is the mean delivered laser power during one on-off cycle starting at tk and ending at tk+M+N. P t*, tk+ M+N (e,r) varies with the history of e(t k) and r(tk) (i.e., e and r). Performance of the fuzzy control system depends on the output fuzzy sets. Proper values shou ld be chosen to generate the desired nonlinear characteristics of the variable gains in TojJ(tk) and ron(tk). We first set L to be 1 and experimentally determined the rest of the parameter values for laser hyperthermia , coagulation, and tissue welding. The values are given in Table 8.4. For the same type of experiments (e.g., laser coagulation), the parameter values are fixed and are the same for all the experiments. This is a good way of testing the performance robustness of the fuzzy control system against the uncertain and unpredictable factors associated with tissue conditions and properties as well as substantial tissue differences between experiments. For a better understanding and visualization, three -dimensional plots of TojJ (tk) and Ton(tk) for laser hyperthermia are shown in Fig. 8.16. Because of the fuzzy rule structure, TojJ(tk) is nonzero only when e(tk) is in [0,(0), whereas Ton(tk) is nonzero only when r(t k) falls in (-00,0]. The nonlinear nature of the fuzzy control can clearly be seen. The fuzzy controller designed was implemented using LabVIEW™ software and integrated into the computer program.
TABLE 8.4
The Singleton Output Fuzzy Sets (in ms) for the Three Different Types of Laser-Tissue Heating. . off
. of! M
. of! S
. of!
. on
. on
. on S
. on
80 100 80
50 60 50
30 40 30
0 0 0
800 5000 3000
600 3000 2000
500 2000 1000
300 1000 500
L
Hyperthermia Coagulation Welding
vs
L
M
vs
Section 8.5. • Fuzzy PD Control of Tissue Temperature During Laser Heating
277
80
60
(40 20
o 2
2
-2
-2 (a)
r«
Figure 8.16 Three-dimensional plots of (tk ) and Ton(tk ) of the fuzzy controller for laser hyperthermia: (a) TofJ(tk ) where r,,! = 80ms, rf!{ = 50ms, rt = 30ms, riff = Oms, and L = 1.
8.5.4. Temperature Control Performance for Laser Hyperthermia, Coagulation, and Welding The fuzzy control system was used to control tissue temperature during in vitro laser heating for hyperthermia, coagulation, and welding. The temperature setpoint was 43°C for hyperthermia, 65°C for coagulation, and 85°C for tissue welding. Six hyperthermia experiments were carried out. Figure 8.17 shows one of the results. Tissue temperature reaches the target temperature in about six minutes . Thereafter, the temperature is tightly controlled within +0.11/ -0.21°C of the target value. Figure 8.18 demonstrates another experimental result achieved for a more complicated tissue sample. The performance is not as good as the previous one because the maximum positive and negative deviations are 0;310C and 0.94°C, respectively. After the experiment, we found that the pig liver tissue used in this particular experiment contained a rather large blood vessel near the thermocouple tip. The vessel seemed to present a temperature disturbance and caused tissue temperature to drop at time 480 sec and 1240 sec. Despite this adverse tissue condition, temperature was still tightly regulated around the setpoint, and system stability was well
Chapter 8 • Real-Time Fuzzy Control of Biomedical Systems
278
800
600 ::;;'400
e-:
'i-
200 0 -2
2
2
-2 (b)
Figure 8.16 (b) TOn(tk) where ,'in = 800ms, ,}J and L = 1.
= 600ms, ,'S" = 500ms, ,~= 300ms,
maintained. For the six experiments, the average maximum positive and negative derivation of controlled temperature was 0.25°C and 0.44°C, respectively. Three laser coagulation experiments were conducted. Control of tissue temperature during coagulation was more difficult because, unlike hyperthermia, the physical structure of the tissue being heated changed with time: proteins were denaturing, and water was being evaporated. Figure 8.19 presents one experimental result. Tissue temperature reached the setpoint in about three minutes. The rise-time was significantly shorter than that in the case of tissue hyperthermia because the average delivered laser power, regulated by the fuzzy controller, was markedly increased to reach the higher target temperatbre. The other reason was that the thermocouple was 1 mm away from the optical fiber tip, instead of 5 mm in the hyperthermia experiments. The maximum positive derivation of the controlled temperature was 0.78°C, and the maximum negative derivation was 0.30°C. The average maximum positive and negative derivations of temperature for the three experiments were 0.45°C and 0.32°C, respectively. Figure 8.20 depicts one of the three laser welding experimental results. It only took one minute and 18 seconds to reach the setpoint temperature. Tissue temperature rose so quickly because the diameter of the laser spot size was smaller (6 mm versus 8 mm in the coagulation
Section 8.5 . •
Fuzzy PD Control of Tissue Temperature During Laser Heating
279
50 i----r----,---,-----r----,---r;:::==:;::r:=====::c:===:::;l Controlled temperature • .•. Temperature selpoint
48 46 44
-w.------------- _
'.'.'. ' .'.'.' . ';1"
38
32 L.------=-~--_'_::_--_'_----'-----L...---L.------'----'------' o 200 400 600 800 1000 1400 1200 1600 1800 TIme (second)
Figure 8.17 Fuzzy control performance in a laser hyperthermia experiment with temperature setpoint being 43°C. The maximum positive and negative derivations of controlled temperature are 0.11°e and 0.21°e, respectively.
experiments), leading to a 78% increase in laser power density. The higher laser energy caused a faster temperature rise, especially in the area surrounding the fiber tip. Since the distance between the laser tip and the thermocouple was 0.5 mm, the thermocouple picked up temperature change faster. Once in the steady state, the maximum positive and negative derivations of temperature were 3.0°C and 2.2°C, respectively. Temperature fluctuations were considerably larger than those in the other two types of heating because the setpoint temperature was 85°C. At this high temperature, the physical properties of the heated tissue changed dynamically and rapidly. Tissue structure was being destroyed, with proteins being quickly denatured first and tissue being dried up swiftly. Furthermore, because the thermocouple was placed closer to the tissue surface being irradiated, water in the tank quickly and constantly removed part of the thermal energy in the heated tissue . Therefore, whenever the laser was suspended briefly for the purpose of accurate temperature measurement, temperature dropped abruptly. All these three factors caused larger temperature fluctuations , which posed a more difficult control problem than in the cases of the other two types of laser irradiation. For the three welding experiments, the average maximum positive and negative derivations of tissue temperature were 2.90 °C and 2.80°C, respectively.
280
Chapter 8 • Real-Time Fuzzy Control of Biomedical Systems
48 46 44
--
.
"
.
r
.....
38
36 34 32 '--_ _-'-_ _-l.-_ _-'--_ _--'-_ _-.L._ _---'-_ _----' 1400 a 200 400 600 800 1000 1200 Time (second)
'--_--J
1600
1800
Figure 8.18 Fuzzy control performance in another laser hyperthermia experiment with the temperature setpoint being 43°C. The maximum positive and negative derivations of controlled temperature are 0.31°C and 0.94°C, respectively.
Summarizing all the results, it is clear that this fuzzy PD control system performed well in hyperthermia, coagulation, and welding. The system was robust in the presence of various types of uncertainties associated with laser-tissue interactions, complicated thermal dynamics, and constantly changing tissue properties .
8.6. ULTRASOUNO-GUIOEO FUZZY PO CONTROL OF LASER-TISSUE COAGULATION Controlling tissue temperature, such as described in the last section, can only indirectly determine the outcome of tissue thermal damage. To achieve the ultimate goal of thermal damage control, a controller must be guided by a sensor capable of measuring thermal damage in real time. To be clinically useful, such a sensor should ideally be noninvasive. Below, we first briefly present an ultrasonic sensor that we have developed for real-time, noninvasive measurement of thermal damage front in tissue being coagulated. We then present a fuzzy controller that is guided by this sensor for closed-loop damage control. The ultrasound sensor material is not a prerequisite to understanding the ultrasound-guided fuzzy control system. It is, however, an important advancement in its own right in the field of medical ultrasound.
Section 8.6. •
281
Ultrasound-Guided Fuzzy PD Control of Laser-Tissue Coagulation
85 1 .'.'
80
Controlled temperature Temperature setpoint
I
75 70
~ Gl
65 ~,-,-,-,. 60
Iso I-
50
45 40 35 30
0
200
400
600
800
1000
1200
1400
1600
TIme(second)
Figure 8.19 Fuzzy control performance in a laser coagulation experiment with the temperature setpoint being 65°C. The maximum positive and negative derivations of controlled temperature are O.78°C and O.30°C, respectively.
8.6.1. Development of Noninvasive Ultrasonic Sensor Accurate mathematical prediction of tissue thermal damage or response is extremely difficult owing to the complicity of thermal energy transportation in tissue, tissue hetero geneity, blood perfusion, and heating power and duration. In more than a decade, extensive research has been conducted worldwide, and several noninvasive methods have been investigated for measuring tissue temperature and thermal damage. They include computed tomographic (CT) imaging, magnetic resonance (MR) imaging, and ultrasound imaging. The preliminary results with CT were discouraging (e.g., [6]). It was thought that density changes associated with coagulative necrosis might be insufficient to generate good CT image contrast . Experimental results indicated that MR imaging could produce good contrast images of thermal lesions (e.g., [7][30]). Nevertheless, MR imaging systems are not fast enough to provide real-time information for feedback control, and they are too expensive and bulky. The results of ultrasound monitoring were observational and qualitative. Most studies used commercial B-scan ultrasound equipment to observe change in amplitude of the echoes from the heated tissues (e.g., [72]). Ultrasound was found to be able to detect changes in tissue properties during and after laser irradiation, but the results were inconsistent. It was postulated that tissue ablation might be required to see substantial and consistent increases in
282
Chapter 8 • Real-Time Fuzzy Control of Biomedical Systems
110 Controlled temperature • .•. Temperature.setpoint
100
90
80
6
L-
~
R E
~
70
60
50
40
0
100
200
300
400 500 TIme (second)
600
700
800
900
Figure 8.20 Fuzzy control performance in a laser welding experiment with the temperature setpoint being 85°C. The maximum positive and negative derivations of controlled temperature are 3.0°C and 2.2°C, respectively.
echogenicity. We tried Doppler ultrasound, an approach different from previous work in this area, to detect laser-tissue interactions [86]. We have recently developed a noninvasive ultrasound technique that can measure, in real time, how temporal and spatial profiles of coagulation damage in tissue being heated change with time [201]. The principle is rather simple. When coagulation is taking place, the tissue structure changes significantly as a result of protein denaturation. If one repeatedly sends the same acoustic signal to the tissue, the change in tissue structure may be reflected by a noticeable change in waveform of echo signal returned from the tissue region being coagulated. By observing the degree of waveform change of the echo signals returned from different tissue regions, one may be able to monitor how coagulation is progressing inside the tissue during heating. Our technique consists offour steps: (1) repeatedly sending the same acoustic signal to the tissue being heated; (2) tracking echo signals scattered from many small tissue regions using a cross-correlation echo-tracking technique; (3) quantifying the waveform change of echo signal scattered from each small tissue region by means of the cross-correlation coefficient between the currently acquired signal and a reference signal; and (4) using the waveform-change information to determine the position of coagulation front through an automatic decision-making procedure. The interested reader is referred to [201] for detailed treatment of the technical development.
Section 8.6. • Ultrasound-Guided Fuzzy PD Control of Laser-Tissue Coagulation
283
To test the technique, we carried out 35 experiments in which we irradiated fresh canine liver samples with a Nd:YAG laser (1064-nrn wavelength, TRIMEDYNE OPTILASE™ 1000 Modified 90 W) at various power densities (62 to 167 W/ cnr') and exposure time (20 to 350 seconds). A 13-mm diameter 10-MHz broadband single-element spherical focused ultrasound transducer (panametrics, MA) was used to detect the thermal coagulation front. After laser irradiation, we could see a circular tissue surface area bleached by the laser heating. We cut the tissue sample into two parts along a vertical plane passing through the center of the bleached surface area, and we could see an area ofpallor caused by laser heating, surrounded by nonirradiated dark red tissue. The boundary of this pale area was regarded as the coagulation front. We measured the vertical distance from the center of the bleached circular tissue surface area to the front of the coagulated region. This distance was regarded as the coagulation depth in the tissue. The boundary between the coagulated and noncoagulated regions was not always distinct. This was particularly true when the tissue sample was irradiated at relatively low laser intensity and relatively short exposure time. In these cases, the coagulation front appeared to be a blurry passage between the coagulated and untreated tissue regions, which made the visual inspection of coagulation depth difficult and less accurate. Nevertheless, the accuracy was within 0.5 mm for the worst case. Pictures of these areas were taken for records. An attempt was made to determine the coagulation depth through histologic study. We cut off slices of tissues, about 2 mm thick, and fixed them in formalin. Our histopathologist used standard preparative techniques on more than 30 tissue samples. These techniques have been widely used for many years and therefore are well understood. These techniques included hematoxylin and eosin stain, which is the commonly used staining procedure in diagnostic pathology, as well as an immunohistochemical method to demonstrate CEA, the carcinoembryonic antigen, which is expressed on the surface of structures lining the bile canaliculi. The intention was to display loss of the ability to bind this reagent, which could be attributed to thermal coagulation of antigenic protein on cell surfaces. However, in our case, these procedures were not sensitive enough to differentiate the changes produced by thermocoagulation from those produced by excision and chemical fixation of the liver. Thus, microscopic assessment of the histology was no more accurate than simple gross assessment of the lesion. Consequently, we determined the final coagulation depth through gross assessment and compared it with the ultrasonic measurement. Figure 8.21 shows the comparison results for all 35 experiments. The root mean square difference between ultrasonically determined and visually seen coagulation depths was 0.77mm, and the mean absolute error was 0.6mm. The ultrasound technique can measure not only the final coagulation depth, but also the dynamic progress of coagulation front with time. Figure 8.22 illustrates such a profile ultrasonically measured in one of the 35 experiments. The coagulation depth increases approximately exponentially with time, which is consistent with the existing theoretical and experimental findings on the relationship between the advance of coagulation and heating duration in the literature (e.g., [229]). Given that only the final tissue coagulation is (visually) verifiable and that the process of coagulation front propagation cannot be verified, this qualitative and indirect confirmation is important in establishing the correctness of the ultrasonic technique. The technique can also measure in real time the spatial distribution and extent of thermal coagulation in tissue. Nevertheless, the fuzzy controller does not utilize this information because the final coagulation boundary is of the most clinical importance. The ultrasound sensor was used to guide a fuzzy laser control system. The goal was to achieve predetermined coagulation depths. The work was carried out in a laboratory environment.
284
Chapter 8 •
Real-Time Fuzzy Control of Biomedical Systems
12
I
lSI visual
• ultrasound
I
10
,......
!§
'-'
oSc..
..,
-
8
-e
§
.~
~0
6
o
;;j
.E .,
4
c-
~
2
o 3
5
7
9
11 13 15 17 19 21 23 25 27 29 31 33 35
Experiment number Figure 8.21 Comparison between visually and ultrasonically determined coagulation depths for 35 experiments.
10 9
8
7 6 5
3 2
•
1
o
-
•
4
o
20
•
.. --
40
....... .-
60
80
Heatingduration (second)
100
Figure 8.22 Progress of the coagulation front during laser heating in one of the 35 experiments, as determined by the ultrasound technique.
Section 8.6. • Ultrasound-Guided Fuzzy PD Control of Laser-Tissue Coagulation
285
8.6.2. Setup for Ultrasound-Guided Fuzzy Control Experiments Figure 8.23 shows the experimental setup for ultrasound-guided fuzzy control of laserinduced tissue coagulation. A fresh whole sheep liver, harvested immediately after animal sacrifice, is immersed in a 50 x 25 x 30 cm3 glass tank filled with 23°C tap water and placed on an 8-mm-thick Plexiglas plate over a 3-cm-diameter circular hole in the center. To prevent the tissue from floating, it is fixed on the plate with a rubber band on each of its four sides . The tissue is inadiated by the Nd:YAG laser whose energy was delivered via a 600-Jlm diameter optical fiber. The Panametrics 13-mm diameter 10-MHz broadband single-element spherical focused ultrasound transducer is used to detect a progressive coagulation front in the tissue being heated. The transducer and the Plexiglas plate are arranged in such a way that the transducer beam axis vertically passes through the center of the circular hole of the plate and the beam passes completely without being obscured by the plate. The optical fiber and the transducer are arranged to be coaxial. The transducer is connected to a Panametrics 5800PR pulser/receiver, where the ultrasound signals are amplified and filtered, and the processed signals are digitized at 250 MHz by a Tektronics TDS 520 digital oscilloscope. The digitized signals are then sent to a Pentium 166 MHz PC through an IEEE-488 GPffi board. The signal acquisition is controlled by a LabVIEW™ program that we developed. The exact sampling period at a particular time is a variable, ranging from 11 to 14 seconds, depending on the quality of the ultrasound signals. The better the quality, the shorter the period; 11 seconds is the smallest achievable by our equipment. A C program was developed to use the digitized ultrasound signals to compute in real time the latest coagulation front in the tissue. The computed result is sent to a fuzzy PD controller, also implemented in C, that outputs its control action to a
Laser control signal
Nd:YAG laser
Optic fiber
Tank
/
Laser beam
Water surface Tissue sample - ....- - - -
IEEE-488 GPIB
Plexiglas plate -+----"JIIII Ultrasound beam - + - - - - - - - / Focused ultrasound -+-------transducer
166 MHz PC with D/ A for measurement and I---~ fuzzy controller
Figure 8.23 Experimental setup for ultrasound-guide fuzzy control of laser-tissue coagulation.
286
Chapter 8 •
Real- Time Fuzzy Control of Biomedical Systems
National Instruments 12-bit D/A converter and adjusts the laser control signal. The full range of the converter is 0-5 V. The C programs are called by a main LabVIEW™ program with a graphical user interface that we created specifically for the measurement and control. The fuzzy controller is very fast and needs little computing time. The ultrasound sensor requires almost the entire sampling period for its computation. The laser control signal regulates the driving current, resulting in adjustment of laser output power. (Note: This laser device was unavailable at the time we carried out the temperature control project reported in Section 8.5.) The laser thermal effect on tissue is determined by laser intensity, / in W/mm2 , as it is involved with laser spot size on tissue surface nr'l, where r is the spot radius, as well as with the delivered laser power, P in W; which is the product of laser output power on the console multiplied by the efficiency of the optical fiber: P
(8.2)
/=-2· nr
In our experiments, r is 5 mtn. We found experimentally that the relationship between laser output power and the control signal, Q in ~ was nonlinear and had a threshold of 2.4615 ~ below which laser output power was zero. Experiments with the control signal up to 4.0 ~ corresponding to about 50 W laser output power, were conducted. The least-squares fitting of the experimental data reveals the following relationship: Q = -0.0002p2
+ 0.0392P + 2.4615,
Q E [2.4615,4].
(8.3)
Combining (8.2) and (8.3),
Q = -1.23245/2 + 3.0772/ + 2.4615.
(8.4)
The heart of the laser control system is a Mamdani fuzzy PD controller. It calculates new laser intensity, denoted as /(n), at every sampling time. /(n) is converted to Q(n), control signal at time n, using (8.4), and the result is sent to the D/A converter as the output of the fuzzy controller. We set Q(O) = 2.4615 ~ making /(0) = O.
8.6.3. Design of Mamdani Fuzzy PD Controller Two input variables, e(n) and r(n), are used, where e(n) is with respect to target coagulation depth. Unlike most applications, e(n) is always positive because whenever the coagulation front is beyond the setpoint, the laser will be turned off. Moreover, r(n) is also always positive; the coagulation front can only move forward and cannot go back because tissue coagulation causes irreversible damage. The input scaling factors are K; = 1 and K; = 1, making E(n) = e(n) and R(n) = r(n). Each variable is fuzzified by two fuzzy sets, namely, Small and Large, shown in Fig. 8.24. Only four fuzzy rules are used IF E(n) IF E(n) IF E(n) IF E(n)
is Large AND R(n) is Large AND R(n) is Small AND R(n) is Small AND R(n)
is Large THEN /(n) is Small THEN /(n) is Large THEN /(n) is Small THEN /(n)
is Large, is Medium, is Medium, is Small,
where Large, Medium, and Small are three singleton output fuzzy sets whose nonzero membership values are only at /(n) = 2, 1 and 0, respectively. The Zadeh fuzzy logic AND operator is used in the rules, and the centroid defuzzifier is employed.
287
Section 8.6. • Ultrasound-Guided Fuzzy PD Control of Laser-Tissue Coagulation Membership
Figure 8.24 Graphical definitions of the fuzzy sets Small and Large for E(n) and R(n).
E(n) or R(n)
o
5
10
This fuzzy PD controller is similar to the simplest Mamdani fuzzy PI controllers in Chapter 3, and its analytical structure can be derived in a similar fashion. The E(n) - R(n) plane must be divided into 12 ICs as shown in Fig. 8.25. The resulting structure is given in Table 8.5. As expected, this fuzzy controller is a nonlinear PD controller with variable gains. In IC2, IC3, IC5, and IC7, there are constant control offsets.
8.6.4. Control Results of Laser Tissue Coagulation The fuzzy control system was used to control thermal coagulation in tissue during laser heating. Twenty-one in vitro experiments were carried out. The coagulation depth setpoint was fixed and ranged from 4 to 14 mm with a 2-mm increment. In the experiments, the control system was turned off when the coagulation depth setpoint had been reached. We could see a circular tissue surface area bleached by the laser heating in most experiments. The liver was
1
R
IC?
IC6
IC2 IC3-~-
E(n)
•
IC1
IC5 - - - . .
(5,5) IC4 ICll
ICl2
E(n)
o
5
10
Figure 8.25 Division of the E(n) - R(n) plane into 12 ICs for analytical structure derivation of the Mamdani fuzzy PD controller. The input fuzzy sets are shown in the last figure.
288
Chapter 8 • Real-Time Fuzzy Control of Biomedical Systems TABLE 8.5 Analytical Structure of the Mamdani Fuzzy PD Controller Used for Coagulation Control.a lCNo.
2 3 4
5 6
7 8 9 10 11 12
I(n) e(n) + 3r(n) 20 + 4r(n) 20 - e(n) + r(n) 60 - 4e(n) 20 + e(n) - r(n) 60 - 4r(n) 3e(n) + r(n) 20 + 4e(n)
10 + r(n) 20 1 10 + e(n) 20 1 2 r(n) 20 0 e(n) 20 1 2
alCs are shown in Fig. 8.25.
then moved so that the laser could irradiate a new tissue area. This procedure was repeated between experiments. After several experiments, we cut every irradiated tissue spot into two parts and visually measured the final coagulation depth of each experiment in the same manner as stated in Section 8.6.1. Figure 8.26 illustrates how the fuzzy controller regulates the laser to reach the setpoint of 12 mm. The temporal profile of the corresponding laser intensity is also plotted. It takes about 7 minutes and 30 seconds (i.e., 450 seconds) to achieve the target coagulation depth. The fuzzy controller turned the laser off once it thought the target depth had been attained. There was no way to verify the accuracy of the intermediate coagulation depth, but it looked reasonable based on the way the coagulation progressed. In addition, the ultrasonically measured final coagulation position was confirmed by visual inspection after the experiment. Figure 8.27 shows the coagulation control results for all 21 experiments. The fuzzy control system performed quite well except for the setpoint of 4 mm. In three of the four 4-mm experiments, no coagulative tissue damage was visible to the naked eye, although coagulation was believed to have taken place. This was indicative of a need to improve the sensitivity ofthe ultrasonic detection technique for subtle coagulative damage. Had a sensitive histology examination been carried out, the coagulation depth could probably have been measured. However, as stated in Section 8.6.1, our expert histologist failed to find a suitable histology method after more than 30 histology examinations during the sensor development.
289
Section 8.6. • Ultrasound-Guided Fuzzy PD Control of Laser-Tissue Coagulation 16,-----------------------,- 3
I t
Cl
.gos
l
8 ~ ~
14 12
. ... ... .. ... ,
.
10 8
6
4 2
o
r· 'I \ ' I' I I o
_._._.-.- -
'-'-'- '-'-'-' Measureddepth , , , , " Target depth - " Laser intensity
0 40
80
120
160
200
240
280
320
360
400
440
Time (second) Figure 8.26 One experimental result of real-time fuzzy control of laser coagulation. The target coagulation depth is 12mm. Dynamic progress of coagulation depth, measured by the ultrasonic technique, and the corresponding laser intensity are shown . The fin~l coagulation position is confirmed by gross inspection.
16 14 ~ • Achieved Depth E 12 .Setpoint §. ~ 10 CII
0 c: 0
~
"3
Cl III
0
o
I -
8
6 4 2 0
.....
.,. .,. .,.
..... .....
.,. .,. M .....
Experiment Number
.,.
10
.....
..... N
Figure 8.27 The laser coagulation control results in a1121 experiments as compared with the corresponding setpoints ranging from 4mm to 14rnm with a 2-rnm increment.
The final coagulation depth in experiment 19 is about 4 mm less than the 14-mm setpoint. Most likely, 10 rom was the maximal coagulation depth achievable in that particular experiment no matter how long the tissue would be irradiated. This result is considered "outlier." The maximal achievable coagulation depth is unpredictable and depends on many factors, such as laser intensity, laser wavelength, tissue conditions and properties. Similarly, in the last two experiments, the final depths are also significantly less than the target, indicating that 13 mm is the maximum coagulation depth achievable for the given experimental conditions.
Chapter 8 • Real-Time Fuzzy Control of Biomedical Systems
290
TABLE 8.6 Results."
Statistics of the 16 Fuzzy Control Experimental
Coagulation Depth Achieved by Fuzzy Control (mm) Coagulation Depth Setpoint (mm)
Mean
Minimum
Maximum
6 8 10 12 14
5.33 6.67 9.77 11.5 12.5
5 6 9.5 11 12
6 7 10 11.5 13
"Results of the four 4-mm setpoint experiments and one 14-mm setpoint experiment have been excluded.
Excluding experiment 19 and all the 4-mm experiments, we tabulate the results in Table 8.6 to provide some statistical information regarding the control accuracy. According to the table, the maximum coagulation depth in each of the five groups is always below the corresponding setpoint. This is partially due to the error of the ultrasound detector. (As stated in Section 8.6.1, the mean absolute error between ultrasonically and visually determined coagulation depths is 0.6 mm.) Overall, the control results are satisfactory.
8.7. SUMMARY Three real-world applications of fuzzy control are demonstrated. All the applications are novel and the first of their kind in their respective medical fields. Clearly, the biomedical systems under control are nonlinear and time-varying with time delay. Their (accurate) mathematical models are unavailable. Despite these challenges, the fuzzy control systems can achieve satisfactory, robust performance even in the face of system uncertainties and disturbances. The fuzzy control performance is better than a linear PID controller could achieve, owing to the powerful gain variation. The development and design principle of these systems could be extended to a variety of engineering applications.
8.8. NOTES AND REFERENCES Sections 8.3, 8.5, and 8.6 derive, respectively, from our papers [253][54][137]. More medical applications of fuzzy logic can be found in [5], among other publications.
Bibliography
[1] G. M. Abdelnour, 1. Y. Cheung, C.-H. Chang, and G. Tinetti, "Application of describing functions in the transient response analysis of a three-term fuzzy controller," IEEE Transactions on Systems, Man and Cybernetics, 23, 603-606, 1993. [2] G. M. Abdelnour, 1. Y. Cheung, C.-H. Chang, and G. Tinetti, "Steady-state analysis of a threeterm fuzzy controller," IEEE Transactions on Systems, Man and Cybernetics, 23, 607-610, 1993. [3] G. M. Abdelnour, C. H. Chang, F. H. Huang, and 1. Y. Cheung, "Design of a fuzzy controller using input and output mapping factors," IEEE Transactions on Systems, Man and Cybernetics, 21, 952-960, 1992. [4] S. Abe and M.-S. Lan, "Fuzzy rules extraction directly from numerical data for function approximation," IEEE Transactions on Systems, Man, and Cybernetics, 25,119-129,1995. [5] M. Akay (ed.), Applications of Fuzzy Logic, IEEE Engineering in Medicine and Biology, 13(5), 1994. [6] z. Amin, 1. 1. Donald, A. Masters, R. Kant, A. C. Steger, S. G. Bown, and W. R. Lees, "Hepatic metastases: Interstitial laser photocoagulation with real-time US monitoring and dynamic CT evaluation of treatment," Radiology, 187, 339-347, 1993. [7] Y. Anzai, R. B. Lufkin, S. Hirschowitz, K. Farahani, and D. 1. Castro, "MR imaginghistopathologic correlation of thermal injuries induced with interstitial ND:YAG laser irradiation in the chronic model," Journal ofMagnetic Resonance Imaging, 2, 671-678, 1992. [8] 1. Aracil, A. Garcia-Cerezo, and A. Ollero, "Stability analysis of fuzzy control systems: A geometric approach," in Artificial Intelligence, Expert Systems and Languages in Modelling and Simulation (Kulikowski et al., eds.), North-Holland, Amsterdam, 323-330, 1988. [9] R. A. de Asla, A. M. Benis, R. A. Jurado, and R. S. Litwak, "Management of postcardiotomy hypertension by microcomputer-controlled administration of sodium nitroprusside," Journal of Thoracic Cardiovascular Surgery, 89, 115-120, 1985. [10] K. 1. Astrom and B. Wittenmark, Computer Controlled Systems: Theory and Design (3rd ed.), Prentice Hall, Englewood Cliffs, NJ, 1997. [11] K. 1. Astrom, C. C. Hang, ~ Persson, and W. K. Ho, "Towards intelligent PID control," Automatica, 28, 1-9, 1992. [12] C. M. Beacco, S. R. Mordon, and 1. M. Brunetaud, "Development and experimental in vivo validation of mathematical modeling of laser coagulation," Lasers in Surgery and Medicine, 14, 362-373, 1994.
291
292
Bibliography [13] M. R. Berthold and K.-~ Huber, "Automatic construction of fuzzy graphs for function approximation," Proceedings of 1996 Biennial Conference of the North American Fuzzy Information Processing Society, Berkeley, CA, 319-323, June 1996. [14] F. Bouslama and A. Ichikawa, "Fuzzy control rules and their natural control laws," Fuzzy Sets and Systems, 48, 65-86, 1992. [15] F. Bouslama and A. Ichikawa, "Application of limit fuzzy controllers to stability analysis," Fuzzy Sets and Systems, 49, 103-120, 1992. [16] M. Braae and D. A. Rutherford, "Theoretical and linguistic aspects of the fuzzy logic controller," Automatica, 15, 15-30, 1979. [17] M. Braae and D. A. Rutherford, "Selection of parameters for a fuzzy logic controller," Fuzzy Sets and Systems, 2, 185-199, 1979. [18] I. N. Bronshtein and K. A. Semendyayev, Handbook of Mathematics, Van Nostrand Reinhold Company, New York, 1985. [19] 1. 1. Buckley and H. Ying, "Fuzzy controller theory: limit theorems for linear fuzzy control rules," Automatica, 25, 469-472, 1989. [20] 1. 1. Buckley and H. Ying, "Linear fuzzy controller: it is a linear non-fuzzy controller," Information Sciences, 51, 183-192, 1990. [21] 1. 1. Buckley and H. Ying, "Expert fuzzy controller," Fuzzy Sets and Systems, 44, 373-390, 1991. [22] 1. 1. Buckley, "Universal fuzzy controllers," Automatica, 28, 1245-1248, 1992. [23] 1. 1. Buckley, "Sugeno type controllers are universal controllers," Fuzzy Sets and Systems, 53, 299-303, 1993. [24] G. Calcev, "Some remarks on the stability of Mamdani fuzzy control systems," IEEE Transactions on Fuzzy Systems, 6, 436-442, 1998. [25] S. G. Cao, N. W. Rees, and G. Feng, "Stability analysis of fuzzy control systems," IEEE Transactions on Systems, Man and Cybernetics, 26, 201-204, 1996. [26] S. G. Cao, N. W. Rees, and G. Feng, "Lyapunov-like stability theorems for discrete-time fuzzy control systems," International Journal of Systems Science, 28, 297-308, 1997. [27] S. G. Cao, N. W. Rees, and G. Feng, "Analysis and design for a class of complex control systems Part I: fuzzy modelling and identification," Automatica, 33, 1017-1028, 1997. [28] S. G. Cao, N. W. Rees, and G. Feng, "Analysis and design for a class of complex control systems Part II: fuzzy controller design," Automatica, 33, 1029-1039, 1997. [29] 1. Carvajal, G.-R. Chen, and H. Ogmen, "Fuzzy PID controller: design, performance evaluation, and stability analysis," Information Sciences, 123: 249-270, 2000. [30] D. 1. Castro, R. E. Saxton, L. 1. Layfield, et al., "Interstitial laser phototherapy assisted by magnetic resonance imaging: a new technique for monitoring laser-tissue interaction," Laryngoscope, 100, 541-547, 1990. [31] 1. L. Castro, "Fuzzy logic controllers are universal approximators," IEEE Transactions on Systems, Man and Cybernetics, 25, 629-635, 1995. [32] 1. L. Castro and M. Delgado, "Fuzzy systems with defuzzification are universal approximators," IEEE Transactions on Systems, Man and Cybernetics, 26, 149-152, 1996. [33] C.-L. Chen and F.-C. Kuo, "Design and analysis of a fuzzy controller," International Journal of Systems Science, 26, 1223-1248, 1995. [34] C -L. Chen, S.-N. Wang, C.-T. Hsieh, and F.-Y. Chang, "Theoretical analysis of crisp-type fuzzy logic controllers using various t-norm sum-gravity inference methods," IEEE Transactions on Fuzzy Systems, 6, 122-136, 1998. [35] G.-R. Chen, "Conventional and fuzzy PID controllers: an overview," International Journal of Intelligent Control and Systems, 1, 235-246, 1996.
Bibliography
293
[36] G.-R. Chen and H. Ying, "BffiO stability of nonlinear fuzzy PI control systems," Journal of Intelligent & Fuzzy Systems, 5, 245-256, 1997. Also appeared in Proceedings of the 3rd International Conference on Industrial Fuzzy Control and Intelligent Systems, 128-133, College Station, TX, 1993. [37] I-G. Chen and L.-I Chen, "Study on stability of fuzzy closed-loop control systems," Fuzzy Sets and Systems, 57, 159-168, 1993. [38] I-G. Chen, I-H. Lu, and L.-I Chen, "Analysis and synthesis of fuzzy closed-loop control systems," IEEE Transactions on Systems, Man and Cybernetics, 25, 881-888, 1995. [39] I Q. Chen, I H. Lu, and L. I Chen, "Analysis and synthesis of fuzzy closed-loop control systems," IEEE Transactions on Systems, Man, and Cybernetics, 25, 881-887, 1995. [40] Y. Y. Chen, "The Global Analysis of Fuzzy Dynamic Systems," Ph.D. Thesis, University of California, Berkeley, 1989. [41] E. W. Cheney, Introduction to Approximation Theory (2nd ed.), Chelsea Publishing Company, New York, 1982. [42] C. M. Cheng and N. W. Rees, "Stability analysis of fuzzy multivariable systems: vector Lyapunov function approach," lEE Proceedings Control Theory and Applications, 144, 403412, 1997. [43] S. Chiu, "Using fuzzy logic in control applications: beyond fuzzy PID control," IEEE Control Systems Magazine, 18, 100-104, 1998. [44] I. Cilesiz, T. Springer, S. Thomsen and A. 1. Welch, "Controlled temperature tissue fusion: argon laser welding of canine intestine in vitro," Laser in Surgery and Medicine, 18, 325-334, 1996. [45] D. M. Cosgrove Ill, I H. Petre, I L. Waller, I V. Roth, L. C. Shepherd, and L. H. Cohn, "Automated control of postoperative hypertension: a prospective, randomized multicenter study," Annals of Thoracic Surgery, 47, 678-683, 1989. [46] A. Cumani, "On a possibilistic approach to the analysis of fuzzy feedback system," IEEE Transactions on Systems, Man and Cybernetics, 12, 417-422, 1982. [47] N. Daikuzono, S. Suzuki, H. Tajiri, H. Tsunekawa, M. Ohyama, and S. N. Joffe, "Laserthermia: a new computer-controlled contact Nd:YAG system for interstitial local hyperthermia," Lasers in Surgery and Medicine, 8, 254-258, 1988. [48] R.I~ De Figueiredo and G.-R. Chen, Nonlinear Feedback Control Systems: An Operator Theory Approach, Academic Press, New York, 1993. [49] I A. Deford, C. F. Babbs, U. H. Patel, N. E. Fearnot, I A. Marchosk, and C. I Moran, "Design and evaluation of closed-loop feedback control of minimum temperatures in human intracranial tumours treated with interstitial hyperthermia," Medical & Biological Engineering & Computing, 29, 197-206, 1991. [50] M. DeGlas, "Invariance and stability offuzzy systems," J. Math. Anal. Appl., 199,299-319, 1984. [51] P B. Deshpande, "Improve quality control on-line with PID controllers," Chemical Engineering Progress, 71-76, 1991. [52] I A. Dickerson and B. Kosko, "Fuzzy function approximation with ellipsoidal rules," IEEE Transactions on Systems, Man and Cybernetics, 26, 542-560, 1996. [53] Y.-S. Ding, H. Ying, and S.-H. Shao, "Necessary conditions for general MISO fuzzy systems as universal approximators," Proceedings of 1997 IEEE International Conference on Systems, Man, and Cybernetics, 3176-3181, Orlando, FL, October 12-15,1997. [54] Y.-S. Ding, H. Ying, and S.-H. Shao, "Real-time fuzzy control of tissue temperature during laser heating," International Journal of Intelligent Control and Systems, 2,361-379, 1998. [55] Y.-S. Ding, H. Ying, and S.-H. Shao, "Structure and stability analysis of a Takagi-Sugeno fuzzy PI controller with application to tissue hyperthermia therapy," Soft Computing, 2, 183-190, 1999.
294
Bibliography [56] Y-S. Ding, H. Ying, and S.-H. Shao, "Typical Takagi-Sugeno fuzzy controllers: analytical structures, stability analysis and control of tissue temperature," submitted to journal. [57] Y-S. Ding, H. Ying, and S.-H. Shao, "Necessary conditions on minimal system configuration for general MISO fuzzy systems as universal approximators," IEEE Transactions on Systems, Man and Cybernetics, in press. [58] D. Driankov, H. Hellendoom, and M. Reinfrank, An Introduction to Fuzzy Control, SpringerVerlag, Berlin, 1993. [59] O. Eyal and A. Katzir, "Thermal feedback control techniques for transistor-transistor logic triggered C02 laser used for irradiation of biological tissue utilizing infrared fiber-optic radiometry," Applied Optics, 33, 1751-1754, 1994. [60] P Eykhoff System Identification-Parameter and State Estimation, John Wiley & Sons, New York, 1974. [61] R. Faiz, S. Mordon, M. Staroswiecki, and 1. M. Brunetaud, "Self-tuning control of Nd:YAG laser coagulation: principle," Proceedings of SPIE Laser-Tissue Interaction III, 76-87, 1992. [62] S. S. Farinwata and G. Vachtsevanos, "Stability analysis of the fuzzy logic controller designed by the phase portrait assignment algorithm," Proceedings of2nd IEEE International Conference on Fuzzy Systems, San Francisco, CA, 1377-1382, 1993. [63] G. Feng, S. G. Cao, N. W. Rees, and C. K. Chak, "Design of fuzzy control systems with guaranteed stability," Fuzzy Sets and Systems, 85, 1-10, 1997. [64] D. ~ Filev and R. R. Yager, "A generalized defuzzification method via BAD distributions," International Journal ofIntelligent Systems, 6, 687-697, 1991. [65] D. P Filev and R. R. Yager, "On the analysis offuzzy logic controllers," Fuzzy Sets and Systems, 68, 39-66, 1994. [66] G. F. Franklin, 1. D. Powell, and M. L. Workman, Digital Control ofDynamic Systems (2nd ed.), Addison-Wesley Publishing Co., Reading, MA, 1992. [67] B. Friedland, Advanced Control System Design, Prentice Hall, Englewood Cliffs, NJ, 1996. [68] C.-C. Fub and ~-C. Tung, "Robust stability analysis of fuzzy control systems," Fuzzy Sets and Systems, 88, 289-298, 1997. [69] E. Furutani, M. Saeki, and M. Araki, "Shifted Popov criterion and stability analysis of fuzzy control systems," Proceedings of the 31st Conference on Decision and Control, Tucson, AZ, 2790-2795, December 1992. [70] A. Garcia-Cerezo, A. Ollero, and 1. Aracil, "Stability of fuzzy control systems by using nonlinear system theory," Annual Review in Automatic Programming, 17, 121-126, 1993. [71] T. N. Glenn, S. Rastegar, and S. L. Jacques, "Finite element analysis of temperature controlled coagulation in laser irradiated tissue," IEEE Transactions on Biomedical Engineering, 43, 79-87, 1996. [72] G. Godlewski, 1. M. Bourgeois, ~ Sambuc, C. Gouze, H. Ould-Said, 1. 1. Eledjam, S. Rouy, and C. Pignodel, "Ultrasonic and histopathological correlations of deep focal hepatic lesions induced by stereotaxic Nd-YAG laser applications," Ultrasound Medicine & Biology, 14, 287291, 1988. [73] D. E. Goldberg, Genetic Algorithms in Search, Optimization and Machine Learning, AddisonWesley Publishing Co., Reading, MA, 1989. [74] ~ Gorrini, T. Salome, and H. Bersini, "Self-structuring fuzzy systems for function approximation," Proceedings of 1995 IEEE International Conference on Fuzzy Systems, Yokohama, Japan, 919-926, March 1995. [75] S. Gottwald and W. Pedrycz, "Analysis and synthesis of fuzzy controller," Problems of Control and Information Theory, 14, 33-45, 1985.
Bibliography
295
[76] A. Grauel and H. Mackenberg, "Mathematical analysis of the Sugeno controller leading to general design rules," Fuzzy Sets and Systems, 85, 165-175, 1997. [77] 1. W. Grizzle and E V. Kokotovic, "Feedback linearization of sampled-data systems," IEEE Transactions on Automatic Control, 33, 857-859, 1988. [78] M. M. Gupta, 1. B. Kiszka, and G. M. Trojan, "Multivariable structure offuzzy control systems," IEEE Transactions on Systems, Man and Cybernetics, 16, 638-656, 1986. [79] M. M. Gupta and 1. Qi, "Theory of T-norms and fuzzy inference methods," Fuzzy Sets and Systems, 40, 431-450, 1991. [80] M. M. Gupta and 1. Qi, "Design of fuzzy logic controllers based on generalized T-operators," Fuzzy Sets and Systems, 40, 473-489, 1991. [81] C. M. Haissig, "Tuning fuzzy feedback controllers using the circle criterion," Proceedings ofthe 1996 IEEE International Conference on Control Applications, 85-90, 1996. [82] A. E. Hajjaji and A. Rachid, "Explicit formulas for fuzzy controller," Fuzzy Sets and Systems, 62, 135-141, 1994. [83] C. Ham, Z.-H. Qu, and 1. Kaloust, "Design of globally stabilizing robust fuzzy control for a class of nonlinear systems," International Journal of Intelligent Control and Systems, 1, 261-271, 1996. [84] 1. 1. Hammond, W. M. Kirkendall, and R. V. Calfee, "Hypertensive crisis managed by computer controlled infusion of sodium nitroprusside: a model for the closed loop administration of short acting vasoactive agents," Computer Biomedical Research, 12, 97-108, 1979. [85] C. 1. Harris and C. G. Moore, "Phase plane analysis tools for a class of fuzzy control," Proceedings of 1st IEEE International Conference on Fuzzy Systems, 511-518, March 8-12, 1992. [86] C. 1. Hartley and H. Ying, "Ultrasonic Doppler detection of laser-tissue interaction," Ultrasound in Medicine and Biology, 20, 655-663, 1994. [87] C.-w. Hong, S.-H. Shao and H. Ying, "Real-time fuzzy control of speed and current of a D.C. Motor based on a microcomputer," Journal ofElectrical Automation (in Chinese), 42(6), 5-10, 1985. [88] G.-C. Hwang and S.-C. Lin, "A stability approach to fuzzy control design for nonlinear systems," Fuzzy Sets and Systems, 48, 279-287, 1992. [89] S. Isaka and A. V. Sebald, "An optimization approach for fuzzy controller design," IEEE Transactions on Systems, Man and Cybernetics, 22, 1469-1473, 1993. [90] A. Isidori, Nonlinear Control Systems (3rd ed.), Springer, Berlin, 1995. [91] M. Jamshidi, Large-Scale Systems: Modeling, Control and Fuzzy Logic, Prentice Hall PTR, Upper Saddle River, NJ, 1997. [92] M. Jamshidi, N. Vadiee, and T. 1. Ross, Fuzzy Logic and Control, Prentice Hall, Englewood Cliffs, NJ, 1993. [93] G. Ju and L.-1. Chen, "Linguistic stability analysis of fuzzy closed loop control systems," Fuzzy Sets and Systems, 82, 27-34, 1996. [94] A. Kandel and G. Langholz (ed.), Fuzzy Control Systems, CRC Press, Boca Raton, FL, 1994. [95] H. Kang, "Stability and control of fuzzy dynamic systems via cell-state transitions in fuzzy hypercubes," IEEE Transactions on Fuzzy Systems, 1, 267-279, 1993. [96] A. A. Kania, 1. B. Kiszka, M. B. Gorzalczany,1. R. Maj, and M. S. Stachowicz, "On stability of formal fuzziness systems," Information Sciences, 22, 51-68, 1980. [97] A. Katzir, Lasers and Optical Fibers in Medicine, Academic Press, New York, 1995. [98] H. K. Khalil, Nonlinear Systems (2nd ed.), Macmillan Publishing Co., New York, 1996.
296
Bibliography [99] W. 1. M. Kickert and E. H. Mamdani, "Analysis of a fuzzy logic controller," Fuzzy Sets and Systems, 1, 29--44, 1978. [100] S. D. Klioze, D. P Poppas, and C. T. Rooke, "Development and initial application of a real time thermal control system for laser tissue welding," Journal of Urology, 152(Pt. 2), 744-748, 1994. [101] G.1. Klir and T. A. Folger, Fuzzy Sets, Uncertainty, and Information, Prentice Hall, Englewood Cliffs, NJ, 1988. [102] G. 1. Klir and B. Yuan, Fuzzy Sets and Fuzzy Logic: Theory and Applications, Prentice Hall PTR, Englewood Cliffs, NJ, 1995. [103] H. Kiendle and 1. 1. Ruger, "Stability analysis of fuzzy control systems using facet functions," Fuzzy Sets and Systems, 70, 275-285, 1995. [104] W. C. Kim, S. C. Ahn, and W. H. Kwon, "Stability analysis and stabilization offuzzy state space models," Fuzzy Sets and Systems, 71, 131-142, 1995. [105] 1. B. Kiszka, M. M. Gupta, and P N. Nikiforuk, "Energetistic stability of fuzzy dynamic systems," IEEE Transactions on Systems, Man and Cybernetics, 15, 783-792, 1985. [106] 1. B. Kiszka, M. M. Gupta, and G. M. Trojan, "Multivariable fuzzy controller under Godel's implication," Fuzzy Sets and Systems, 34, 301-321, 1990. [107] 1. Kluska, "Stability analysis ofSISO, MISO and MIMO continuous fuzzy control systems based on theorems of Kudrewicz," Archives of Control Sciences, 5, 5-37, 1996. [108] L. T. Koczy and M. Sugeno, "Explicit function of fuzzy control systems," International Journal of Uncertainty, Fuzziness and Knowledge-Based Systems, 4, 515-535, 1996. [109] L. T. Koczy and A. Zorat, "Fuzzy systems and approximation," Fuzzy Sets and Systems, 85,203222, 1997. [110] B. Kosko, Neural Networks and Fuzzy Systems: A Dynamical Systems Approach to Machine Intelligence, Prentice-Hall, Englewood Cliffs, NJ, 1991. [111] B. Kosko, "Fuzzy systems as universal approximators," Proceedings of IEEE International Conference on Fuzzy Systems, 1153-1162, San Diego, CA, 1992. [112] B. Kosko, "Fuzzy systems as universal approximators," IEEE Transactions on Computers, 43, 1329-1333, 1994. [113] I. Kouatli and B. Jones, "A guide to the design of fuzzy control systems for manufacturing processes," Journal ofIntelligent Manufacturing, 1, 231-244, 1990. [114] M. Kurano, M. Yasuda, 1. Nakagami, and Y Yoshida, "A limit theorem in some dynamic fuzzy systems," Fuzzy Sets and Systems, 51, 83-88, 1992. [115] R. Langari, "A nonlinear formulation of a class of fuzzy linguistic control algorithms," Proceedings of 1992 American Control Conference, Chicago, IL, 1992. [116] R. Langari and M. Berenji, "Fuzzy logic in control engineering," In Handbook of Intelligent Control (eds. D. White and D. Sofge), Van Nostrand Reinhold, New York, 1992. [117] R. Langari and M. Tomizuka, "Analysis and design of fuzzy linguistic control systems," Proceedings ofASME WinterAnnual Meeting, 35-42, 1990. [118] R. Langari and M. Tomizuka, "Stability of fuzzy linguistic control systems," Proceedings of the 29th Conference on Decision and Control, 2185-2190, Honolulu, HA, December 1990. [119] E. G. Laukonen and K. M. Passino, "Fuzzy systems for function approximation with applications to failure estimation," Proceedings of the 1994 IEEE International Symposium on Intelligent Control, 184-189, Columbus, OH, August 1994. [120] C. C. Lee, "Fuzzy logic in control systems: fuzzy logic controller-Part I & IT," IEEE Transactions on Systems, Man and Cybernetics, 20, 404-435, 1990.
Bibliography
297
[121] 1. Lee, "On methods for improving performance of PI-type fuzzy logic controllers," IEEE Transactions on Fuzzy Systems, 1, 298-301, 1993. [122] 1. Lee and S. Chae, "Analysis on function duplicating capabilities of fuzzy controllers," Fuzzy Sets and Systems, 56, 127-143, 1993. [123] ~ G. Lee, R. N. Lea, ~ E. Turk, H. Ying, and 1. L. Whitson, "Denitrification in aquaculture systems: an example of a fuzzy logic control problem," Aquacultural Engineering, in press. [124] W S. Levine (ed.), The Control Handbook, CRC Press and IEEE Press, Boca Raton, FL, 1996. [125] F. L. Lewis and K. Liu, "Towards a paradigm for fuzzy logic control," Automatica, 32, 167-181, 1996. [126] F. L. Lewis, S.-Q. Zhu, and K. Liu, "Function approximation by fuzzy systems," Proceedings of the 1995 American Control Conference, 3760-3764, Seattle, WA, June 1995. [127] H.-X. Li, "A comparative design and tuning for conventional fuzzy control," IEEE Transactions on Systems, Man and Cybernetics, 27, 884-889, 1997. [128] H.-X. Li and H. B. Gatland, "A new methodology for designing a fuzzy logic controller," IEEE Transactions on Systems, Man and Cybernetics, 25, 505-512, 1995. [129] H.-X. Li and H. B. Gatland, "Conventional fuzzy control and its enhancement," IEEE Transactions on Systems, Man and Cybernetics, 26, 791-797, 1996. [130] W Li, "Design of a hybrid fuzzy logic proportional plus conventional integral-derivative controller," IEEE Transactions on Fuzzy Systems, 6, 449-463, 1998. [131] 1. T. Lim, "Absolute stability analysis of class of nonlinear plants with fuzzy logic controllers," Electronics Letters, 28, 1968-1970, 1992. [132] W-L. Lin, R. B. Roemer, and K. Hynynen, "Theoretical and experimental evaluation of a temperature controller for scanned focused ultrasound hyperthemia," Medical Physics, 17,615625, 1990. [133] D. A. Linkens, "Adaptive and intelligent control in anesthesia," IEEE Control Systems Magazine, 12, 6-11, 1992. [134] D. A. Linkens and M. F. Abbod, "Supervisory intelligent control using a fuzzy logic hierarchy," Transactions ofInstrument Measurement and Control, 15, 112-114, 1993. [135] L. Ljung, System Identification: Theory for the User, Prentice Hall, Englewood Cliffs, NJ, 1987. [136] L. Ljung and T. Glad, Modeling ofDynamic Systems, Prentice Hall PTR, Englewood Cliffs, NJ, 1994. [137] 1.-L. Lu, H. Ying, Z.-G. Sun, and G.-R. Chen, "Real-time ultrasound-guided fuzzy control of tissue coagulation during laser heating," Information Sciences, 123: 271-280, 2000. [138] M. Maeda and E. Fukumiya, "Stability analysis of fuzzy control system by 3D space display," JSME International Journal (Series C, Dynamics), 37, 685-691, 1994. [139] H. A. Malki, H. Li, and G.-R Chen, "New design and stability analysis of fuzzy proportionalderivative control systems," IEEE Transactions on Fuzzy Systems, 2, 245-254, 1994. [140] H. A. Malki, D. Misir, D. Feigenspan, and G.-R. Chen, "Fuzzy PID control of a flexible-joint robot arm with uncertainties from time-varying loads," IEEE Transactions on Control Systems Technology, 5, 371-378, 1997. [141] E. H. Mamdani, "Application offuzzy algorithms for simple dynamic plant," Proceedings oflEE, 121, 1585-1588, 1974. [142] E. H. Mamdani and S. Assilian, "An experiment in linguistic synthesis with a fuzzy logic controller," International Journal ofMan-Machine Studies, 7, 1-13, 1975. [143] D. M. Mandelbaum, "On cyclically time-varying autoregressive digital filters," Circuits, Systems, Signal Processing, 16, 91-106, 1997.
298
Bibliography [144] G. K. I. Mann, B.-G. Hu, and R. G. Gosine, "Analysis of direct action fuzzy PID controller structures," IEEE Transactions on Systems, Man and Cybernetics (Part B), 29, 371-388, 1999. [145] 1. P Marin and A. Titli, "Robust performances of closed-loop fuzzy systems: a global Lyapunov approach," Proceedings ofthe Fifth IEEE International Conference on Fuzzy Systems, 732-737, New Orleans, LA, September 1996. [146] R. 1. Marks II (ed.), Fuzzy Logic Technology and Applications, IEEE Press, Piscataway,NJ, 1993. [147] 1. E. Marshall, Control of Time-Delay Systems, Peter Peregrinus, Stevenage, UK, 1979. [148] 1. F. Martin, A. M. Schneider, and N. T. Smith, "Multiple-model adaptive control of blood pressure using sodium nitroprusside," IEEE Transactions in Biomedical Engineering, 34, 603611, 1987. [149] F. Matia, A. Jimenez, R. Galan, and R. Sanz, "Fuzzy controllers: lifting the linear-nonlinear frontier," Fuzzy Sets and Systems, 52, 113-128, 1992. [150] A. L. McKenzie, "Physics of thermal processes in laser-tissue interaction," Physics in Medicine and Biology, 35, 1175-1209, 1990. [151] D. McNeill and P Freiberger, Fuzzy Logic, Simon & Schuster, New York, 1993. [152] L. 1. Meline, D. R. Westenskow, N. L. Pace, and M. N. Bodily, "Computer-controlled regulation of sodium nitroprusside infusion," Anesthesia and Analgesia, 64, 38-42, 1985. [153] 1. M. Mendel, "Fuzzy logic systems for engineering: a tutorial," Proceedings of the IEEE, 83, 345-377, 1995. [154] K. Michels and R. Kruse, "Numerical stability analysis for fuzzy control," International Journal ofApproximate Reasoning, 16, 3-24, 1997. [155] D. Misir, H. A. Malki, and G.-R. Chen, "Design and analysis of a fuzzy proportional-integralderivative controller," Fuzzy Sets and Systems, 79, 297-314, 1996. [156] S. Mitaim and B. Kosko, "Fuzzy function approximation and the shape of fuzzy sets," Proceedings of the International Conference on Neural Information Processing, 210-215, Hong Kong, September 1996. [157] M. Mizumoto, "Fuzzy controls under various fuzzy reasoning methods," Information Sciences, 45, 129-151, 1988. [158] ~ H. Moller, L. Lindbreg, ~ H. Henriksson, B. R Persson, and K. G. Tranberg, "Temperature control and light penetration in a feedback interstitial laser thermal therapy system," International Journal ofHyperthermia, 12, 49-63, 1996. [159] S. Mordon, B. Buys, 1.-~ Sozanski, 1. M. Brunetaud, and Y: Moschetto, "Adaptive control of a medical Nd:YAG laser for tissue coagulation," Proceedings ofIEEE Engineering in Medicine & Biology Society 10th Annual International Conference, 1266-1268, 1998. [160] S. R. Mordon, A. H. Comil, B. Buys, 1. ~ Sozanski, 1. M. Brunetaud, and Y: Moschetto, "Development of controlled Nd:YAG laser for medical applications," Medical Instrumentation, 21, 222-225, 1987. [161] G. C. Mouzouris and 1. M. Mendel, "Nonsingleton fuzzy logic systems: theory and application," IEEE Transactions on Fuzzy Systems, 5, 56-71, 1997. [162] G. C. Mouzouris and 1. M. Mendel, "Dynamic non-singleton fuzzy logic systems for nonlinear modeling," IEEE Transactions on Fuzzy Systems, 5, 199-208, 1997. [163] H. Nakanishi, I. B. Turksen, and M. Sugeno, "A review and comparison of six reasoning methods," Fuzzy Sets and Systems, 57, 257-266, 1993. [164] H. T. Nguyen, ~ Kreinovich, and o. Sirisaengtaksin, "Fuzzy control as a universal control tool," Fuzzy Sets and Systems, 80, 71-86, 1996.
Bibliography
299
[165] 1. S. Packer, D. G. Mason, 1. F. Cade, and S. M. Mckinley, "An adaptive controller for closed-loop management of blood pressure in seriously ill patients," IEEE Transactions in Biomedical Engineering, 34, 612-616, 1987. [166] R. Palm, "Robust control by fuzzy sliding mode," Automatica, 30, 1429-1437, 1994. [167] R. Palm and U. Rehfuess, "Fuzzy controllers as gain scheduling approximators," Fuzzy Sets and Systems, 85, 233-246, 1997. [168] K. M. Passino and S. Yurkovich, Fuzzy Control, Addison-Wesley, Reading, MA, 1998. [169] 1. Pearce and S. Thomsen, "Rate process analysis of thermal damage," Optical-Thermal Response of Laser-Irradiated Tissue, A. 1. Welch and M. 1. C. van Gernert (eds.), Plenum, 561-606, 1995. [170] W. Pedrycz, Fuzzy Control and Fuzzy Systems, Research Studies Press Ltd., 1989. [171] 1. H. Petre, D. M. Cosgrove, and F. G. Estafanous, "Closed loop computerized control of sodium nitroprusside," Transactions of the American Society for Artificial Intern Organs, 39, 501-505, 1983. [172] Y. M. Pok and 1. X. Xu, "An analysis of fuzzy control systems using vector space," Proceedings of the Second IEEE International Conference on Fuzzy Systems, 363-368, San Francisco, CA, 1993. [173] D. ~ Poppas, R. B. Stewart, 1. M. Massicotte, A. E. Wolga, R. T. Kung, A. B. Retik, and M. R. Freeman, "Temperature-controlled laser photocoagulation of soft tissue: in vivo evaluation using a tissue welding model," Lasers in Surgery and Medicine, 18, 335-344, 1996. [174] M. 1. Powell, Approximation Theory and Methods, Cambridge University Press, Cambridge, 1981. [175] W. Z. Qiao and M. Mizumoto, "Pill type fuzzy controller and parameters adaptive method," Fuzzy Sets and Systems, 78, 23-35, 1996. [176] G. V. S. Raju and 1. Zhou, "Adaptive hierarchical fuzzy control," IEEE Transactions on Systems, Man and Cybernetics, 23, 973-980, 1993. [177] K. S. Ray, A. Ghosh, and D. D. Majumder, "L2-stability and related design concept for SISO linear system associated with fuzzy logic controller," IEEE Transactions on Systems, Man and Cybernetics, 14, 932-939, 1984. [178] K. S. Ray and D. D. Majumder, "Application of circle criteria for stability analysis of linear SISO and MIMO systems associated with fuzzy logic controller," IEEE Transactions on Systems, Man and Cybernetics, 14,345-349,1984. [179] W. Rudin, Principles of Mathematical Analysis (3rd ed.), McGraw-Hill, New York, 1976. [180] D. E. Rumelhart, 1. L. McClelland, and the PDP Research Group, Parallel Distributed Processing: Volume l Foundations, The MIT Press, Cambridge, MA, 1986. [181] M. Santos, S. Dormido, and 1. M. de la Cruz, "Fuzzy-Pill controllers vs. fuzzy-PI controllers," Proceedings of the Fifth IEEE International Conference on Fuzzy Systems, 1598-1604, New Orleans, LA, September 1996. [182] M. Santos, S. Dormido, and 1. M. de la Cruz, "Derivative action in Pill-fuzzy controllers," Cybernetics and Systems, 27, 413-424, 1996. [183] O. Shenfeld, E. Ophir, B. Goldwasser, and A. Katzir, "Silver halide fiber optic radiometric temperature measurement and control of C02 laser-irradiated tissues and application to tissue welding," Lasers in Surgery and Medicine, 14, 323-328, 1994. [184] L. C. Sheppard, "Computer control of the infusion of vasoactive drugs," Annals ofBiomedical Engineering, 8, 431--444, 1980. [185] F. G. Shinskey, Process Control Systems: Applications, Design, and Tuning (4th ed.), McGrawHill, New York, 1996.
300
Bibliography [186] W. Siler and H. Ying, "Fuzzy control theory: the linear case," Fuzzy Sets and Systems, 33, 275290, 1989. [187] I Sjoberg, Q. Zhang and L. Ljung, "Nonlinear black-box modeling in system identification: a unified overview," Automatica, 31, 1691-1724, 1995. [188] I B. Slate, "Model-based design of a controller for infusion sodium nitroprusside during postsurgical hypertension," Ph.D. Thesis, University of Wisconsin-Madison, 1980. [189] I B. Slate and L. C. Sheppard, "Automatic control of blood pressure by drug infusion," lEE Proceedings, Part A, 129(9), 1982. [190] I B. Slate, L. C. Sheppard, V C. Rideout, and E. H. Blackstone, "A model for design of a blood pressure controller for hypertensive patients," Proceedings of5th IFAC Symposium Identification and System Parameter Estimation, Darmstadt, F. R., Germany, September 1979. [191] J-IE. Slotine and W. Li, Applied Nonlinear Control, Prentice Hall, Englewood Cliffs, NJ, 1991. [192] P Sooraksa and G.-R. Chen, "Fuzzy (PI+D)2 control for flexible robot arms," Proceedings of the 1996 IEEE International Symposium on Intelligent Control, 536-541, New York, September 1996. [193] T. A. Springer and A. I Welch, "Temperature control during laser vessel welding," Applied Optics, 32, 517-525, 1993. [194] R. B. Stewart, A. Benbrahim, G. M. LaMuraglia, M. Rosenberg, G. I VItalien, W. M. Abbott, and R. T. Kung, "Laser assisted vascular welding with real time temperature control," Lasers in Surgery and Medicine, 19, 9-16, 1996. [195] M. Sugeno, "An introductory survey of fuzzy control," Information Sciences, 36(1), 59-83, 1985. [196] M. Sugeno (ed.), Industrial Applications ofFuzzy Control, Elsevier Science Publishers, NorthHolland, Amsterdam, 1985. [197] M. Sugeno, "Stability of fuzzy systems expressed by fuzzy rules with singleton consequents," IEEE Transactions on Fuzzy Systems, 7, 201-224, 1999. [198] M. Sugeno and K. T. Kang, "Structure identification of fuzzy model," Fuzzy Sets and Systems, 28, 1988. [199] M. Sugeno and T. Yasukawa, "A fuzzy-logic-based approach to qualitative modeling," IEEE Transactions on Fuzzy Systems, 1(1), 1993. [200] Z.-G. Sun and H. Ying, "A multi-gate time-of-flight technique for estimation of temperature distribution in heated tissue: theory and computer simulation," Ultrasonica, 37, 107-122, 1999. [201] Z.-G. Sun, H. Ying, I-L. Lu, B. Bell, and D. F. Cowan, "Automatic ultrasound determination of thermal coagulation front during tissue heating," IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control, 5, 1134-1146, 1999. [202] T. Takagi and M. Sugeno, "Fuzzy identification of system and its applications to modeling and control," IEEE Transactions on Systems, Man and Cybernetics, 15, 116-132, 1985. [203] S.-H. Tan, C.-C. Hang, and I-S. Chai, "Gain scheduling: from conventional to neuro-fuzzy," Automatica, 33, 411-419, 1997. [204] K. Tanaka, T. Ikeda, and H. o. Wang, "Robust stabilization of a class of uncertain nonlinear systems via fuzzy control: quadratic stabilizability, H infinity control theory, and linear matrix inequalities," IEEE Transactions on Fuzzy Systems, 4, 1-13, 1996. [205] K. Tanaka and M. Sano, "A robust stabilization problem of fuzzy control systems and its application to backing up control of a truck-trailer," IEEE Transactions on Fuzzy Systems, 2, 119-134, 1994. [206] K. Tanaka and M. Sugeno, "Stability analysis and design of fuzzy control systems," Fuzzy Sets and Systems, 45, 135-156, 1992.
Bibliography
301
[207] K. L. Tang and R. 1. Mulholland, "Comparing fuzzy logic with classical control designs," IEEE Transactions on Systems, Man and Cybernetics, 17, 1085-1087, 1987. [208] M.A.L. Thathachar and P Viswanath, "On the stability of fuzzy systems," IEEE Transactions on Fuzzy Systems, 5, 145-151, 1997. [209] C.-S. Ting, T.-H. S. Li, and F.-C. Kung, "An approach to systematic design of the fuzzy control system," Fuzzy Sets and Systems, 77, 151-166, 1996. [210] M. Togai and P P Wang, "Analysis of a fuzzy dynamic system and synthesis of its controller," International Journal ofMan-Machine Studies, 22, 355-363, 1985. [211] R. M. Tong, "A control engineering review of fuzzy systems," Automatica, 13, 1977. [212] R. M. Tong, "Some properties of fuzzy feedback systems," IEEE Transactions on Systems, Man and Cybernetics, 10, 327-330, 1980. [213] R. M. Tong, "An annotated bibliography of fuzzy control," Industrial Applications of Fuzzy Control, M. Sugeno (ed.), Elsevier Science Publishers, North-Holland, Amsterdam, 1985. [214] P VanBaren and E. S. Ebbini, "Multipoint temperature control during hyperthermia treatments: theory and simulation," IEEE Transactions on Biomedical Engineering, 42, 818827, 1995. [215] G. I. Voss, P G. Katona, and H. 1. Chizeck, "Adaptive multivariable drug delivery: control of arterial pressure and cardiac output in anesthetized dogs," IEEE Transactions in Biomedical Engineering, 34, 617-623, 1987. [216] H. O. Wang, K. Tanaka, and M. F. Griffin, "An approach to fuzzy control of nonlinear systems: stability and design issues," IEEE Transactions on Fuzzy Systems, 4, 14-23, 1996. [217] L. Wang and R. Langari, "Building Sugeno-type models using fuzzy discretization and orthogonal parameter estimation techniques," IEEE Transactions on Fuzzy Systems, 3, 454458, 1995. [218] L. Wang and R. Langari, "Complex systems modeling via fuzzy logic," IEEE Transactions on Systems, Man, and Cybernetics (part B), 26, 100-106, 1996. [219] L. Wang and R. Langari, "Identification of time-varying fuzzy systems," International Journal of General Systems, 25, 203-218, 1996. [220] L.-X. Wang, "Fuzzy systems are universal approximators," Proceedings of IEEE International Conference on Fuzzy Systems, 1163-1170, San Diego, CA, 1992. [221] L.-X. Wang, Adaptive Fuzzy Systems and Control: Design and Stability Analysis, Prentice Hall, Englewood Cliffs, NJ, 1994. [222] L.-X. Wang, A Course in Fuzzy Systems and Control, Prentice Hall PTR, Englewood Cliffs, NJ, 1997. [223] L.-X. Wang, "Universal approximation by hierarchical fuzzy systems," Fuzzy Sets and Systems, 93, 223-230, 1998. [224] L.-X. Wang, and 1. M. Mendel, "Fuzzy basis functions, universal approximation, and orthogonal least-squares learning," IEEE Transactions on Neural Networks, 3, 807-814, 1992. [225] ~-Z. Wang, S.-H. Tan, F.-M. Song, and P Liang, "Constructive theory for fuzzy systems," Fuzzy Sets and Systems, 88, 195-203, 1997. [226] ~-Z. Wang, H.-M. Zhang, and W. Xu, "Pad-analysis of fuzzy control stability," Fuzzy Sets and Systems, 38, 27-42, 1990. [227] X. Wang and T. Matsumoto, "New time-domain stability criterion for fuzzy control systems," IEICE Transactions on Fundamentals ofElectronics, Communications and Computer Sciences, E79-A(10), 1700-1706, 1996. [228] A. 1. Welch, "The thermal response of laser irradiated tissue," IEEE Journal of Quantum Electronics, 20, 1471-1481, 1984.
302
Bibliography [229] A. 1. Welch and M. 1. c. van Gemert (ed.), Optical-Thermal Response ofLaser-Irradiated Tissue, Plenum, 561-606, 1995. [230] C. C. Wong, C. H. Chou and D. L. Mon, "Studies on the output of fuzzy controller with multiple inputs," Fuzzy Sets and Systems, 57, 149-158, 1993. [231] L. K. Wong, F.H.F. Leung, and ~K.S. Tam, "Lyapunov function based design of heuristic fuzzy logic controllers," Proceedings of the Sixth IEEE International Conference on Fuzzy Systems, 281-285, Barcelona, Spain, July 1997. [232] L. K. Wong, F.H.F. Leung, and ~K.S. Tam, "Lyapunov-function-based design of fuzzy logic controllers and its application on combining controllers," IEEE Transactions on Industrial Electronics, 45, 502-509, 1998. [233] 1. C. Wu and T. S. Liu, "Fuzzy control stabilization with applications to motorcycle control," IEEE Transactions on Systems, Man and Cybernetics, Part B, 26, 836-847, 1996. [234] D. R. Wyman, C. L. Swift, R. A. Siwek, and B. C. Wilson, "A control method for a nonlinear multivariable system: application to interstitial laser hyperthermia," IEEE Transactions on Biomedical Engineering, 38, 891-898, 1991. [235] D. R. Wyman, B. C. Wilson, and D. E. Malone, "Medical imaging systems for feedback control of interstitial laser photocoagulation," Proceedings of the IEEE, 80, 890-902, 1992. [236] C. W. Xu and Y. Z. Lu, "Decoupling in fuzzy systems: a cascade compensation approach," Fuzzy Sets and Systems, 29,177-185,1989. [237] 1.-X. Xu, C. Liu and C. C. Hang, "Tuning of fuzzy PI controllers based on gain/phase margin specifications and ITAE index," ISA Transactions, 35, 79-91, 1996. [238] 1.-X. Xu, C. Liu and C.C. Hang, "Modified tuning of a fuzzy logic controller," Engineering Applications ofArtificial Intelligence, 9, 65-74, 1996. [239] 1.-X. Xu, C. Liu, and C. C. Hang, "Designing a stable fuzzy PI control system using extended circle criterion," International Journal ofIntelligent Control and Systems, 1, 355-366, 1996. [240] R. R. Yager and D. P Filev, Essentials ofFuzzy Modeling and Control, John Wiley & Sons, New York, 1994. [241] Y: Yam, "Fuzzy approximation via grid point sampling and singular value decomposition," IEEE Transactions on Systems, Man and Cybernetics, 27, 933-951, 1997. [242] 1. Yen and R. Langari, Fuzzy Logic: Intelligence, Control, and Information, Prentice Hall, Englewood Cliffs, NJ, 1999. [243] 1. Yen, R. Langari, and L. A. Zadeh (eds.), Industrial Applications ofFuzzy Logic and Intelligent Systems, IEEE Press, Piscataway, NJ, 1995. [244] 1. Yen and L. Wang, "Application of statistical information criteria for optimal fuzzy model construction, IEEE Transactions on Fuzzy Systems, 6, 362-372, 1998. [245] S. Y: Yi and M. 1. Chung, "Systematic design and stability analysis of a fuzzy logic controller," Fuzzy Sets and Systems, 72, 271-298, 1995. [246] H. Ying, "Analytical relationship between the fuzzy PID controllers and the linear Pill controller," Technical Report, Department of Biomedical Engineering, The University of Alabama at Birmingham, December 8, 1987. [247] H. Ying, W. Siler and D. Tucker, "An expert-system-based fuzzy controller," Proceedings ofArtificial Intelligence in Minerals and Materials Technology, Tuscaloosa, AL, October 1987. [248] H. Ying, L. C. Sheppard and D. Tucker, "Expert-system-based fuzzy control ofarterial pressure by drug infusion," Medical Progress Through Technology, 13, 203-215, 1988. [249] H. Ying, W. Siler and 1. 1. Buckley, "Fuzzy control theory: a nonlinear case," Proceeding of 1988 NASA Conference on Artificial Neural Systems and Fuzzy Logic, Houston, TX, May 1988.
Bibliography
303
[250] H. Ying, W. Siler and D. Tucker, "A new type of fuzzy controller based upon a fuzzy expert system shell FLOPS," Proceeding ofIEEE International Workshop on Artificial Intelligence for Industrial Applications, Hitachi City, Japan, May 1988. [251] H. Ying, W. Siler, and 1. 1. Buckley, "Fuzzy control theory: a nonlinear case," Automatica, 26, 513-520, 1990. [252] H. Ying and L. C. Sheppard, "Real-time expert-system-based fuzzy control of mean arterial pressure in pigs with sodium nitroprusside infusion," Medical Progress Through Technology, 16, 69-76, 1990. [253] H. Ying, M. McEachern, D. Eddleman, and L. C. Sheppard, "Fuzzy control of mean arterial pressure in postsurgical patients with sodium nitroprusside infusion," IEEE Transactions on Biomedical Engineering, 39, 1060-1070, 1992. [254] H. Ying, "The simplest fuzzy controllers using different inference methods are different nonlinear proportional-integral controllers with variable gains," Automatica, 29, 1579-1589, 1993. [255] H. Ying, "General analytical structure of typical fuzzy controllers and their limiting structure theorems," Automatica, 29, 1139-1143, 1993. [256] H. Ying, "A fuzzy controller with linear control rules is the sum of a global two-dimensional multilevel relay and a local nonlinear proportional-integral controller," Automatica, 29, 499-505, 1993. [257] H. Ying, "A two-input two-output fuzzy controller is the sum of two nonlinear PI controllers with variable gains," Proceedings ofSecond IEEE International Conference on Fuzzy Systems, pp. 3537, San Francisco, CA, March, 1993. [258] H. Ying and L. C. Sheppard, "Regulating mean arterial pressure in postsurgical cardiac patients," IEEE Engineering in Medicine and Biology, 13, 671-677, 1994. [259] H. Ying, "Practical design of nonlinear fuzzy controllers with stability analysis for regulating processes with unknown mathematical models," Automatica, 30, 1185-1195, 1994. [260] H. Ying, "Sufficient conditions on general fuzzy systems as function approximators," Automatica, 30, 521-525, 1994. [261] H. Ying, "Analytical structures of fuzzy controllers with linear control rules," Information Sciences, 81, 213-227, 1994. [262] H. Ying, "Analytical structure of a two-input two-output fuzzy controller and its relation to PI and multilevel relay controllers," Fuzzy Sets and Systems, 63, 21-33, 1994. [263] H. Ying, "Structure decomposition of the general MIMO fuzzy systems," Journal ofIntelligent Control and Systems, 1, 327-337, 1996. [264] H. Ying and G.-R. Chen, "Necessary conditions for some typical fuzzy systems as universal approximators," Automatica, 33, 1333-1338, 1997. [265] H. Ying, "An analytical study on structure, stability and design of general Takagi-Sugeno fuzzy control systems," Automatica, 34, 1617-1623,1998. [266] H. Ying, "General SISO Takagi-Sugeno fuzzy systems with linear rule consequent are universal approximators," IEEE Transactions on Fuzzy Systems, 6, 582-587, 1998. [267] H. Ying, "Sufficient conditions on uniform approximation of multivariate functions by general Takagi-Sugeno fuzzy systems with linear rule consequent," IEEE Transactions on Systems, Man, and Cybernetics, 28, 515-520, 1998. [268] H. Ying, "General Takagi-Sugeno fuzzy systems with simplified linear rule consequent are universal controllers, models and filters," Information Sciences, 108, 91-107, 1998. [269] H. Ying, "The Takagi-Sugeno fuzzy controllers using the simplified linear control rules are nonlinear variable gain controllers," Automatica, 34, 157-167, 1998. [270] H. Ying, "Constructing nonlinear variable gain controllers via the Takagi-Sugeno fuzzy control," IEEE Transactions on Fuzzy Systems, 6, 226-234, 1998.
304
Bibliography [271] H. Ying, Y-S. Ding, S.-K. Li, and S.-H. Shao, "Comparison of necessary conditions for typical Takagi-Sugeno and Mamdani fuzzy systems as universal approximators," IEEE Transactions on Man, Systems and Cybernetics, 29, 508-514, 1999. [272] H. Ying, "Analytical analysis and feedback linearization tracking control of the general TakagiSugeno fuzzy dynamic systems," IEEE Transactions on Systems, Man, and Cybernetics, 29, 290298, 1999. [273] H. Ying, "Analytical structure of the typical fuzzy controllers employing trapezoidal input fuzzy sets and nonlinear control rules," Information Sciences, 116, 177-203, 1999. [274] H. Ying, "Theory and application of a novel Takagi-Sugeno fuzzy PID controller," Information Sciences, 123, 281-292, 2000. [275] H. Ying, "Analytical analysis of structure of a Mamdani fuzzy controller with three input variables," Fuzzy Control: Synthesis and Analysis, S. S. Faimwata, D. Filev and R. Langari (eds.), John Wiley and Sons, New York, 2000. [276] G. Yoon, S. Mordon, J. M. Brunetaud, R. Faiz, R. Straight, ~ Y Bugnon, M. Staroswiecki, and 1. Leroux, "On-off time control of laser pulses for pseudo-constant temperature coagulation in tissue," Proceedings of SPIE Laser-Tissue Interaction, 236-245, 1990. [277] L. A. Zadeh, "Fuzzy sets," Information and Control, 8, 338-353, 1965. [278] L. A. Zadeh, "Fuzzy algorithm," Information and Control, 12, 94-102, 1968. [279] L. A. Zadeh, "Toward a theory of fuzzy systems," Aspects ofNetwork and System Theory, R. E. Kalman and N. Dellaris (eds.), Rinehart and Winston, New York, 469-490, 1971. [280] L. A. Zadeh, "A rationale for fuzzy control," Journal of Dynamic Systems, Measurement, and Control, 94: 3-4, 1972. [281]L. A. Zadeh, "Outline of a new approach to the analysis of complex systems and decision processes," IEEE Transactions on Systems, Man and Cybernetics, 3, 28-44, 1973. [282] L. A. Zadeh, "The concept of a linguistic variable and its application to approximate reasoning-I, II, III," Information Sciences, 8, 199-249, 301-357; 9, 43-80, 1975. [283] L. A. Zadeh, "Fuzzy logic, neural networks, and soft computing," Communications ofthe ACM, 37, 77-84, 1994. [284] L. A. Zadeh, "Soft computing and fuzzy logic," IEEE Software, 11, 48-56, 1994. [285] L. A. Zadeh, "Fuzzy logic = computingwith words," IEEE Transactions on Fuzzy Systems, 4, 1996. [286] L. A. Zadeh, "The evolution of systems analysis and control: a personal perspective," IEEE Control Systems Magazine, 16, 95-98, 1996. [287] L. A. Zadeh, "From computing with numbers to computing with words. From manipulation of measurement to manipulation of perceptions," IEEE Transactions on Circuits and Systems I: Fundamental Theory and Applications, 46, 105-119, 1999. [288] X.-J. Zeng and M. G. Singh, "Approximation theory of fuzzy systems-MIMO case," IEEE Transactions on Fuzzy Systems, 3, 219-235, 1995. [289] X.-J. Zeng and M. G. Singh, "A relationship between membership functions and approximation accuracy in fuzzy systems," IEEE Transactions on Systems, Man and Cybernetics, 26, 176-180, 1996. [290] X.-J. Zeng and M. G. Singh, "Approximation properties of fuzzy systems generated by the min inference," IEEE Transactions on Systems, Man and Cybernetics, 26, 187-193, 1996. [291] X.-J. Zeng and M. G. Singh, "Approximation accuracy analysis of fuzzy systems as function approximators," IEEE Transactions on Fuzzy Systems, 4, 44-63, 1996. [292] J. Zhao, V. Wertz, and R. Gorez, "Linear TS fuzzy model based robust stabilizing control design," Proceedings of the 34th Conference on Decision and Control, 255-260, New Orleans, LA, December 1995. [293] H.-J. Zimmermann, Fuzzy Set Theory and Its Applications (2nd ed.), Kluwer Academic Publishers, Boston, 1991.
Index
A adaptive control, 256, 267 AI,29 application fuzzy control of mean arterial pressure, 256-265 fuzzy control of tissue coagulation during laser heating, 280-290 fuzzy control of tissue temperature during laser heating, 268-280 approximate reasoning. See fuzzy inference Auto Regressive model. See black-box model Auto Regressive Moving Average model. See black-box model Auto Regressive with eXtra input model. See black-box model B
basin, 166, 168 benign prostate hyperplasia, 266 black-box controller, 30 black-box model AR,16 ARMA,16 ARX, 16 bounded-input bounded-output stability. See stability, Bmo
c Cprognun, 257, 286 Cardiac Surgical Intensive Care Unit. See CICU CICU, 255, 256 circle stability criteria, 33
classical set, 1 coronary artery bypass grafting procedure, 256 D
defuzzification, 11 defuzzifier centroid, 12 generalized, 12 linear, 12, 13 mean of maximum, 12 derivative-gain. See PID controller describing function technique, 33 dynamic integral-gain, 52 dynamic proportional-gain, 52
E expert system, 15, 256 F
feedback linearization, 199 finite impulse response filter. See FIR filter FIR filter, 165 forced pendulum, 171 Fourier expansion, 210 functional approximator, 209. See also universal approximator functional parameter, 180 fuzzification, 7 fuzzy controller analytical issues, 34 applicability, 32 continuous-time, 18 corresponding linear controller, 52 degree of nonlinearity, 113 305
306
Index discrete-time, 18 first, 15 linear, 43 Mamdani, 17 nonlinear, 43 relationship with fuzzy model, 36 TS, 17 fuzzy controller of non-PID type, 43 fuzzy controller of PID type, 43 fuzzy dynamic model. See fuzzy model fuzzy filter, 195 fuzzy inference, 10 fuzzy inference method bounded product, 10 drastic product, 10 Godelian logic, 73 Gougen,73 Larsen product, 10 Mamdani minimum, 10,23 standard sequence, 73 fuzzy logic AND operator product operator, 7 Zadeh operator, 7 fuzzy logic OR operator Lukasiewicz operator, 7 Zadeh operator, 7 fuzzy model analytical issues, 37 applicability, 36 limitation, 36 Mamdani, 17,35 quality check, 195 relationship with fuzzy controller, 36 TS, 17,36 fuzzy PD controller. See fuzzy Pill controller fuzzy PI controller. See fuzzy Pill controller fuzzy Pill controller, 43 fuzzy reasoning. See fuzzy inference fuzzy rule antecedent, 8 consequent, 8 indexing system, 19 linear, 83 Mamdani type, 8 for control, 8 for modeling, 8 singleton fuzzy set as consequent, 9 nonlinear, 83 simplified TS type, 145 linear, 147 nonlinear, 149 transformed, 212 TS type, 9 disadvantages, 145 for control, 9
for modeling, 9 linear consequent, 9 nonlinear consequent, 9 fuzzy set, 1 bell-shaped, 6 center, 4 common types, 6 continuous, 4 convex, 5 definition, 2 discrete, 5 Gaussian, 6 height, 4 input, 8 membership function, 2 normal, 4 output, 8 singleton, 4 subnormal, 4 support, 4 trapezoidal, 6 triangular, 6 fuzzy system development software, 30
G gain surface, 123, 126, 127, 143, 154 genetic algorithm, 36, 192 global controller, 90
H histology, 283 hypertension, 256 I
IC,47 IIR filter, 165 in vitro, 267 infinite impulse response filter. See IIR filter Input Combination. See IC integral-gain. See Pill controller intelligent control, 29 invariance principle, 33 L
L2-stability, 33 LabVIE~ 269, 276, 286 lasers diode, 268, 269 Nd:YAG, 283 limit structure, 81, 114, 115, 180 linearizability, 167, 168, 170, 171, 195 local controller, 90 Lyapunov function, 166, 167 Lyapunov's linearization method, 167
Index
307
M
Mamdani, E. H., 15 Mamdani fuzzy rule. See fuzzy rule ~ 159,256 MATLAB Fuzzy Logic Toolbox, 30, 57 Simulink, 57 maxO,7 Maximum Modulus Theorem, 174, 177 mean arterial pressure. See MAP medical imaging B-scan ultrasound, 281 computer tomographic (CT), 281 Doppler ultrasound, 282 magnetic resonance (MR), 281 MIMO,30 minO,7 minimal upper bound, 215 minimum phase system, 202 MISO, 15 model dynamic system, 35 hyperthermia temperature, 133 patient MAP model, 257 static or algebraic system, 35 multilevel relay control, 33, 81 one-dimensional, 81 two-dimensional, 82 multiple-input multiple-output. See MIMO multiple-input single-output. See MISO N
neural network, 17 nonminimum phase system, 202 norm, 174
o on-off control, 267
position form, 42 piecewise linear controller, 47 polynomial, 119, 171, 210 polynomial approximation, 210 proportional-gain. See Pill controller proportional-integral-derivative. See Pill
R Runge-Kutta method, 57
s scaling factor input, 18 output, 24 sector bound nonlinearity, 33 self-tuning control, 267 simplified TS fuzzy rule. See fuzzy rule single-input single-output. See SISO SISO, 15 Small Gain Theorem, 173 S~256
sodium nitroprusside. See SNP spline function, 225 stability mao, 165 global, 166 local, 166 marginal, 167 static integral-gain, 52 static proportional-gain, 52 Stone-Weierstrass Theorem, 252 structural parameter, 181 structure decomposition fuzzy controller, 105, 111 fuzzy model, 116 structure duality, 105
T p
Pade approximation, 177 PD controller, 42 relationship with PI controller, 42 perfect tracking control, 199 phase plane analysis, 33 PI controller, 42 relationship with PD controller, 42 Pill, 16 Pill controller, 31, 42 anti-windup, 42 incremental form, 42 nonlinear, 42
Takagi-Sugeno. See TS Taylor expansion, 210 thermal modality high-intensity focused ultrasound, 265 lasers, 265 microwaves, 265 radio frequency irradiation, 265 thermal therapy ablation, 266 coagulation, 266 hyperthermia, 265 lasers, 267 welding, 266 time-varying filter, 195
308
Index time-varying trajectories, 199 TITO,73 TS, 8 TS fuzzy rule. See fuzzy rule two-input two-output. See TITO
u unit circle, 173, 193, 198, 201, 202, 205 universal approximation, 37 universal approximator, 209 universe of discourse, 2
v variable gain, 44 variable structure control, 29
w Weierstrass Approximation Theorem, 210
z Zadeh, L. A., 2, 15 z-transform, 173, 198, 201, 203
About the Author
Hao Ying is currently an associate professor in the Department of Electrical and Computer Engineering at Wayne State University, Detroit, Michigan. Prof. Ying also holds an appointment of advisory professor with Dong Hua University (formerly China Textile University) in Shanghai, China. Prof. Ying was born on December 11, 1958 in Shanghai, China. He graduated from the Department of Electrical Engineering at Dong Hua University, with a B.S. degree in 1982 and an M.S. degree in 1984. He worked as an instructor in the department for a year and a half before departing for the United States. Between February 1986 and August 1987, he was a Ph.D. student in the Department of Biomathematics and Biostatistics at the University of Alabama at Birmingham. He then transferred to UAB's Department of Biomedical Engineering and graduated with a Ph.D. degree in June 1990, with the specialty in biomedical control and bioinstrumentation. During these years, he also worked as a research fellow at KempCarraway Heart Institute, Carraway Methodist Medical Center, Birmingham, and as an instructor at UAB's Department of Mathematics. Upon graduation, Prof. Ying was employed by the Biomedical Engineering Center of The University of Texas Medical Branch, Galveston, first as a Biomedical/Clinical Engineering Specialist and then as a Scientist. He became an assistant professor at UTMB's Department of Physiology and Biophysics in 1992 and was promoted to associate professor in 1998. He was an adjunct associate professor of the Biomedical Engineering Program at the University of Texas at Austin. He left UTMB for Wayne State University in August 2000. Prof. Ying started to conduct fuzzy control research in 1981 during his graduation project. His master's thesis presented the development of a real-time self-organizing fuzzy system for speed and current control of a large DC motor, which is one of the world's earliest learning fuzzy control systems. A fundamental problem in the field of fuzzy control system then was the lack of an analytical theory, making rigorous analysis and design impossible. Developing a fuzzy controller/system was a black-box art involving inefficient trial-and-error effort and tedious computer simulations. Prof. Ying is the first to develop such an analytical theory, with the ultimate goal of establishing the analytical foundations for fuzzy control and systems with respect to their conventional counterparts. In 1987 he proved that (1) the fuzzy 309
310
About the Author
PID controllers were inherently nonlinear, variable-gain PID controllers, and (2) the nonlinear and time-varying gains empowered the fuzzy PID controllers to outperform their linear counterparts, especially when controlling nonlinear systems and systems with time delay. These results represented a breakthrough because they revealed, for the first time in the field, the explicit structure of a class of fuzzy controllers and their relationship with and advantages over a conventional controller. Since then, he has made systematic contributions to solving a variety of theoretical issues fundamental to the understanding, analysis, and design of fuzzy control and systems. In the late 1980s, Prof. Ying successfully applied his own theoretical results to the development and implementation of a drug delivery system for regulating blood pressure in postsurgical patients at the Cardiac Surgical Intensive Care Unit at Carraway Methodist Medical Center, which is the world's first clinical application of fuzzy control. More recently, he has developed various innovative fuzzy systems for real-time laser control of tissue temperature, biological treatment of toxic chemicals in aquaculture, two-dimensional tissue segmentation and three-dimensional structure recognition of brain magnetic resonance images, and intelligent processing of noisy ultrasound signals. His other accomplished research projects include neural network classification of breast cancer data, real-time control of resuscitation of severe bum injury, mathematical modeling of neurons, fuzzy expert systems, and noninvasive, real-time ultrasonic measurement of temperature distribution and thermal damage profile in heated tissue. His research has been supported by funding from federal and state governments, foundations, and industries, including the National Institute of Health, U.S. Department of Commerce, Texas Higher Education Coordinating Board, the Whitaker Foundation, and C.R. Bard, Inc., etc. Prof. Ying is a senior member of the IEEE (Institute of Electrical and Electronics Engineers), and holds one patent. He has published 44 peer-reviewed journal papers and 72 conference papers. He is a guest editor for Information Sciences, International Journal of Intelligent Control and Systems, and Acta Automatica Sinaca. In 1994 he served as the program chair for the First International Joint Conference of North American Fuzzy Information Processing Society Conference, Industrial Fuzzy Control and Intelligent Systems Conference, and NASA Joint Technology Workshop on Neural Networks and Fuzzy Logic. He was the program chair for the Third International Workshop on Intelligent Control Systems in 2000. He acted as the publication chair for the 2000 IEEE International Conference on Fuzzy Systems held in San Antonio, Texas. He has served as a program committee member for many international conferences, including the 1999 International Fuzzy Systems Association World Congress. He has been invited to review papers for 23 international journals, including Automatica, and six IEEE Transactions, as well as for some major conferences such as the IEEE Conference on Decision and Control, American Control Conference, and IEEE International Conference on Fuzzy Systems. Prot: Ying can be reached via email at [email protected].