SYSTEMATIC METHODOLOGY OF FUZZY- MODELING AND CONTROL AND APPLICATION TO ROBOTICS

MOHAMMAD REZA EMAMl

A thesis submitted in conformity with the requirements for the degree of Doctor of Graduate Department of Mechanical and Industrial University of Toronto

O Copyright by Mohammad R. Emami 1997 National Library Bibliothéque nationale 1+1 of Canada du Canada Acquisitions and Acquisitions et Bibliographie Senrices sewices bibliographiques 395 Wellington Street 395. rue Wellington Ottawa ON KIA ON4 Ottawa ON KiA ON4 Canada Canada Your hle Voire reference

Our hk Noire reldfence

The author has granted a non- L'auteur a accordé une licence non exclusive licence allowing the exclusive permettant à la National Library of Canada to Bibliothèque nationale du Canada de reproduce, loan, distribute or sell reproduire, prêter, distribuer ou copies of this thesis in rnicroform, vendre des copies de cette thèse sous paper or elec~onicformats. la forme de mÏcrofiche/k, de reproduction sur papier ou sur format électronique.

The author retains ownership of the L'auteur conserve la propriété du copyright in this thesis. Neither the droit d'auteur qui protège cette thèse. thesis nor substantial extracts fiom it Ni la thèse ni des extraits substantiels may be printed or otherwise de celle-ci ne doivent être imprimés reproduced without the author's ou autrement reproduits sans son permission. autorisation. TO Zohreh, Ali, Zahra, and my parents SYSTEMATIC METHODOLOGY OF FUZZY-LOGIC MODELING AND CONTROL AND APPLICATION 70 ROBOTICS Doctor of Philosophy Mohammad Reza Emami Department of Mechanical and Industrial Engineering University of Toronto

II ABSTRACT (1

This thesis presents a systematic approach to füzzy-logic modeling and control of complex systerns. In the proposed methodology, the füzzy mode1 of the system and control rules are obtained from input-output data with no need of a priori information. The proposed fuzzy modeling methodology has three significant features: (i) a unified parametenzed reasoning formulation; (ii) an improved algorithm. and (iii) an efficient strategy of selecting significant system inputs and their membership functions. The proposed fuzzy control stmcture consists of a fuzzy mode1 of the system and robust hzzy rules in order to ensure stability and satisfactory system performance. We develop a generalized formulation of sliding mode control for a class of nonlinear muti-input multi-output systems. This formulation has two distinguish features: (i) it is applicable to "black box" systems with no need to identify interna1 parameters or to assume specific propenies; (ii) it is possible to design the robust controt command for each system state independently while the stabiIity and robustness of the entire system is guaranteed. We apply the generalized formulation to andysis of the stability and robustness of the proposed fuzzy-logic control system. We also derive guidelines for designing the robust fuuy control niles. We apply the methodology to rnodeling and trajectory control of a four degree-of-freedom robot rnanipulator. Results of the proposed fuuy-logic methodology are cornpared with those of a complete analytical simulation and a heunstic fuuy rnodeling technique. A supenor rnodeling performance in tems of accuracy and simplicity is obtained. The control performance is also compared with high-gain servo controllers for different trajectories. and a higher performance is achieved.

iii I wish to thank my CO-supervisorProfessor Andrew A. Goldenberg for providinp me the best environment for study, , and training. Without his invaluable guidance and advice. this work could never have been completed at this level. 1 am particularly gratehil for his moral support and encourasement in ail aspects of my life. What 1 learnt frorn him is far beyond the technical context.

1 would like to extend my sincere gratitude to my other CO-supervisor. Professor 1. Burhan Turksen for giving me a deeper understanding of theoiy and fuzzy logic. 1 always enjoyed discussing absuact concepts and theories with him.

During my association with the Robotics and Automation Laboratory. 1 gained a lot of experience from many scientists and experts. iMy thanks are due to dl of them: specially to Professor Nenad M. Kircansky who inuoduced the IRIS facility to me. and was always there when 1 needed help. and to engineers Jacek Wiercienski. Pawei Kuzan. and Rafi Barakat for their technical help in design and implementation. Thanks to al1 my colleagues in RUfor providing a peaceful and friendly environment.

1 would dso like to thank The Minisvy of Culture and Higher Education of the Islamic Republic of Iran for its financiai support during rny snidy. My special thanks are due to Professor Reza Hosseini. the Higher Education Advisor. for his endless cffons to facilitate Our study in Canada.

Last but not least. I owe thanks to my family. to whorn this thesis is dedicated. my wife Zohreh for her greatest moral support in ail moments of this research. and my parents for their everlasting patience and encouragement. ABSTRACT iii

ACKNOWLEDGMENTS iv

TABLE OF CONTENTS v

LlST OF FlGURES viii

LlST OF TABLES xii

NOTATION xiii

CHAPTER 1 : INTRQDUCTW...... 1

1.1 : Motivation...... 1.2 : Notion of Fuuy-Logic Modeling and Control ...... 1.2.1 : Fuzzy Sets and Fuzzy Logic ...... 1.2.2 : Fuzzy-Logic Modeling...... 1.2.3 : Fuuy-Logic Control ...... 1.3 : Background and Outline of the Thesis ...... 1.3.1 : Fuzzy-Logic Modeling...... 1.3.2 : Fuzzy-Logic Control ...... 1.3.3 : Application of FLC to Robotics...... 1.4 : Contributions ......

CHAPTER 2 : WSONING PmCFSS IN MODM......

2.1 : Introduction...... 2.2 : Fuuy Connectives...... 2.2.1 : Fuzzy Cornplernent...... 2.2.2 : Fuzzy Set Intersection and Union...... 2.2.3 : Extension of Triangular Nom and Conorm Functions...... 2.3 : Implication of Individual Rules...... 2.4 : Aggregation of the Rules...... 2.5 : lnference of the Rule Set...... 2.5.1 : Reasoning Based on Mamdani's Approximation ...... 2.5.2 : Reasoning Based on Fomal Logical Approach ...... 2.5.3 : Unified Pararneterized Fuzzy Reasoning Method...... 2.6 : Defuztification of the Output ...... 2.7 : A Simplified Parameterized Reasoning Formulation...... 2.8 : Conclusion ...... 50 CHAPTER 3 : CLUSTWG fl FmMW ...... 51

3.1 : Introduction...... 51 3.2 : A Brief Background...... 53 3.3 : Funy c-Means Clustering Algorithm ...... 54 3.4 : Cluster Validity: Specification of the Number of Clusters ...... 56 3.5 : Selection of Weighting Exponent (m) in Fuuy Clustering...... 62 3.6 : Initial Guess and Local Optimality in FCM Algorithms...... 68 3.7 : Formation of Membership Functions...... 71 3.8 : Conclusion...... 74

CHAPTER 4 : ~-LOGICMRlTTHM...... 76

4.1 : Introduction...... 4.2 : Input Selection in Fuuy Modeling...... 4.2.1 : Background...... 4.2.2 : The Proposed Method...... 4.3 : Assignment of Input mernberships...... 4.4 : Fuuy Parameter Identification...... 4.4.1 : Fu- Parameter Optimization ...... 4.4.2 : Membership Parameter Tuning ...... 4.5 : Fuzzy Modeling Algorithm ...... 4.6 : Case Study ...... 4.7 : Conclusion......

CHAPTER 5 : SYSTWTIC, D- AND AuYSIS_QF Ta ...... **...... *...... 94

5.1 : Introduction...... 94 5.2 : Robust Model-Based Fuuy-Logic Control : Design and Analysis ..... 95 5.2.1 : The proposed Fuuy-Logic Control Structure...... 95 5.2.2 : Fundamental and Theorems ...... 98 5.2.3 : A Generalized Formulation of Sliding Mode Control ...... 102 5.2.4 : Design of the Robust Fuuy Control Rules ...... 110 5.3 : Case Study ...... 116 5.4 : Conclusion...... 121

CHAPTER 6 : EPPLIWTION TO ROBOTICS;

...... *.*...... m...... *.*...... m...... 122

6.1 : Introduction...... 122 6.2 : Experimental Setup...... 123 6.3 : Simulation...... 126 6.3.1 : Desirable Configuration for experiments ...... 6.3.2 : Kinematic and Dynamic Parameter Estimation...... 6.3.3 : Dynamics Model of the IRIS Am...... 6.4 : Fuuy-Logic Modeling and System Identification...... 6.4.1 : Experiment. Data Acquisition and Analysis ...... 6.4.1.1 : Setup Preparation...... 6.4.1.2 :Test Plan...... 6.4.1.3 : Data Selection and Processing...... 6.4.2 : System Identification Procedure...... 6.4.3 : Fuzzy Model Validation ...... 6.5 : Fuuy-Logic Control ...... 6.5.1 : Design and Analysis ...... 6.5.2 : Experimenta! Results...... 6.5.3 : Comparison Study of the Results......

CHAPTER 7 : CON~SlO~Aw FUTU-RCY ...... - ...... m...... 165

7.1 : Conclusions...... 165 7.2 : Future Research...... 167

vii L/ST OF FIGURES

A general vierv ofji4,- set theos...... 4 Membership firnction of the lingriistic "error"...... 5 The principal stnictrire of fic~z-logiccontrol ...... 8 Flow chart offiru7 -stem modeling ...... 11 Parameteraized t-nom (lefr)and t-conorm f right)for p=.0001 (top). p=l (middle). p= 100 (bonorn)...... 25 The algorithm of calciilating t-conorm...... 28 The nlgorithm of caicrdating t-nom...... 28 The@- mode1 of a nonlinenr ?stem ...... Fti;~otirprlt of the nonlinear ?stem for input set [I.X. 3.0. 4.21...... Defil~ifiedoirrput of the nonlinear ?stem for input set [Z.Zj. 3.0, 4.21

Approximate ( 7' J and exact f y' ) dejçzified orrtpprrrjor irtpiplrt set [1.25. 3.0. 4-21......

Yager's ( 7; . ) and proposed sinzplijïedji~nctionf 7' )for e.rnmpie 2.1 ..

Sugeno 's ( 7;) and proposed simpiified firnction f 7' )for e-mrnple 2 .I The algorithm ofjr? c-means clustering ......

Trace of fi^^ total scatter rnatrik as n fiinction of rnfor Normal4 data set...... Cluster validity index ....sa fitnction of c for Normal-4 data S...... Trace off ri;^ total scatter rnatrk as n fimction of rn for the data of example 3.2...... Clusfer validi~index s,, as n firnction of c for the data of e-ample 3.2

viii LIST OF FIGURES

î7te MCalgorithm for assigning the initial cluster centers...... Index scs for rhe data in Eromple 3.2 rvitli AHC algorithm for choosing ,.... VO (m=3)...... ,.... The k-NNfuq classification algorithm...... Membership frinctions for the the system output in Erainple 3.2 wit/zo~it classification...... Membership functions for the the -rem outpitt in Erornple 3.2 rvith classification...... Q~ialitativeillitsrration of the effect of input variable .r, ou the i" nde... "Peak" points should be the sarne for input and orltp~irclrtsters ...... nte algorithin of significnnt input selectioiz ...... One oicrpur cluster with nvo corresponding inpl<[clrtsters ...... The algorithm of input membership function assigimen...... nealgorithni for riiting irzput-oiirplrt ~nembersliipparariteters ...... niejt:~-iogic modeling algoritlim ...... Initial fi<;? mode1 of the iiortlinear syïtern afer strtictiire

Identification of ln for gas frintace process ...... Specifscation of c for gns fitniace process ...... Final Jtuy mode1 of sas funlace process afer pararae fer iden tijica tion...... Cornparison offii- rnodel and real oittplit of gas fiintace process ...... The striccture of the proposed /ii:~-logic control systein......

The specified domain for robiist control tenn ud ...... Membership functions of the generalized error si for robitst control rules...... 5.4 The robrtst fual control cl~aructenstrcs...... 5.5 A planar two degree-of$reetiarn rnaniptilator...... LIST OF FIGURES

me robitst control characteristics offay and sliding mode control.... Membership fiinctions for robustfirzzy control rules...... Comparison of the pegormance of robustftrxy control rriles and boundary layer sliding mode control for the 2 D.O. F robot...... The IRIS robotic facility ...... Control architectrire of the IRIS facility ...... The desirable configuration of the lRlS am...... The desirable configuration of the IRIS amrvith link coordinate frames ...... nte bhkdiagram of the Ttemciosed loop for identification experrments ...... Some random rrajectoriezfor the identtfcation tests...... Some sirirtsoidal trajectoriesfor the identification tests...... Sorne rmdom trajectories for the identificntion tests...... Porver ON/OFF eflect on the torqile sensor orrtpt...... Poiver spectrurn estimate of joint #I measrrred torqile for rnndom trqectoq...... Measured torqrie and calcuhtted accelemtion for joint #4 for simsoidnl trajecton...... Power spectnrm esti~nntionof nieasured torqrre atid calcrrlnted acceleratiorl of joinr #4 for simrdoidal trnjectop...... Filtered crccelerntion data ...... Training oirtpitt rorqrre data forjoint #I ...... The fzrziness and clrtster validiiy indices for IRIS joints ...... Fiicuy-logic mode1 of the 4 D.O.F IRIS am...... Comparison of the IRIS amexperimental data and different modeling approaches for a random trajectoy...... Comparison of the MIS arni experimental daru and different rnodeling upproaclies for a sin irsoidol trajectory...... LIST OF FIGURES

6.19 Cornparison of the IRIS amexperimental data and diflerent rnodeling approaches for a step trajectory...... 6.20 Error nom of AF for some of the validating data ...... 6.21 The inertia ~raluefl for sorne of the experimental data ...... 6.22 Robitst fuay control characterisrics and rnembershipfnnctions ......

6.23 Cornparison of the proposed flr;? c?rntrol and PID control of the IRIS amfor randorn trajecton...... 6.24 Cornparison of fhe proposedfic;s control and PID conrrol of the IRIS amfor sinrisoidal trajecran......

6.25 Comparison of the proposed fil- control and PID control of the IRIS amfor step trajecto- ...... LIST OF TABLES

6.1 Torqlie and speed characteristics of IRIS joints ...... 124 6.2 Kinematic and Dynarnic parameters of the IRIS amfor rhe desired configiiration...... 128 6 -3 Joint parameters rised inthesim~~lation...... 128 6 -4 Fii~7-logicmodel specificotions of the IRIS am...... 141 6.5 Design parameters for the IRIS am...... 154

xii membership hnction of A. B. C. ... ( fuzzy) set upper bound of the gain rnatrix lower bound of the gain matrix harmonic drive viscous coefficient rnotor viscous coefficient fuzzy set for the jthinput variable in the ith mle motor Coulomb friction coefficient (positive rotation) motor Coulomb friction coefficient (negative rotation) nurnber of clusters the complement of a fuzzy set noise function fuzzy set for the jthoutput variable in the ith rule the negation of fuzzy set D the output fuzzy set from the unified reasoning nonlinear term of robot dynamics the output fuzzy set from Mamdani's reasoning the output fuzzy set from formal logical reasoning gravity terni of robot dynamics dimension of feature space robust control gain Back-ElMF constant harmonic drive stiffness amplifier gain motor torque constant simplified reasoning parameter motor current Back-EMF current

xiii NOTATION

motor current limit hizzy clustenng objective function, motor inertia fuzzy line clustenng objective funcrion simplified reasoning pararneter simplified reasoning parameter simplified reasoning parameter weighting exponent upper bound of the robot inertia rnatrix lower bound of the robot inertia rnatrix inertia rnatrix of robot dynamics estimated inertia matrix of robot dynamics inertia value number of rules, order of the systern. number of degrees of freedom number of data fuuy rule implication parameter hzzy antecedent aggregation parameter. system state system state velocity systern state acceleration simplified reasoning parameter sirnplified reasoning parameter number of significant input variables number of input candidates motor resistance fuzzy reIation feature space generaiized error proposed cluster validity index Sugeno' s cluster validity index hard scatter matrix partition coefficient cluster validity index partition entropy cluster validity index t-conorm operator fuzzy between cluster scatter matrix hard between cluster scatter matrix xiv NOTA TION

fuuy total scatter mauix hard totai scatter matrix fuuy within cluster scatter mauix hard within cluster scatter matrix time hzzy term set. t-nom operator control input membership grade of datum j in cluster i motor voltage input linguistic variable steady-state motor winding voltage Back-EMF voltage cluster center fuzzy mean value hard mean value output linguistic variable input variable the input universe of discourse for input variables x output variable defuzzified output based on COA method

defuzzified output based on 1MOM method

defuzzified output based on Heights method defuzzified output based on B ADD method defuzzified output of the simplified reasoning formulation the output universe of discourse for output variables y defuzzification pararneter inference comprornisation pararneter robust control boundary layer robust control design pararneter robust control design parameter significance index upper bound of system NOTA TlON

the degree of finng of rule i. the control torque of joint i maximum un-modeled time delay sampling rate Yager's (Sugeno's) rule antecedent aggreegation conjunction operator disjunction operator Min conjunction operator Max conjunction operator aigebraic producc conjunction operator algebraic sum disjunction operator drastic product conjunction operator drastic sum disjunction operator fuzzy composition operator inner product nom of a vector

xvi INTRODUCTION

1.1 MOTIVATION

The traditional approach to formal modeling. reasoning and computing is mostly deterministic. precise. and yes-or-no type nther than more-or-less tvpe. in conventional logic, for instance. a statement can be me or false and nothing in between. In set theoiy. an element cm either belong to a set or not. and in optimization. a solution is either feasible or not.

Real situations. on the other hand. are very often uncenain or vague in a number of ways. One familiar type of uncenainn, is that. due to lack of information. the future stnte of the system might not be known completely. This category is called srocliasric ~inceriains.and has long been treated appropriately by theo. and statisrics. Despite the ambiguity of the system srate. in stochastic uncenainty it is assumed that the meaning of statements and events is clrarly defined. There is another type of vapeness conceming the description of the semantic meaning of events. phenornena or statements themselves. which can be cai1edfic;-iness. Fuzziness is found in many areas of daily life. particu1arIy those in which human judgment. evaluation and decision are relevant. For example. there are terms which are well known in science and engineering such as linear approximation, small neighborhood, and ill-conditioned mauix. Al1 of them convey a semantic meaning, significant to a certain community: however. the concept of membership to such classes is not obvious. INTRODUCTION

Application of formal methods to describe real world phenomena may be limited to simple systems or at Ieast viewed as an approximation of more complex situations. In andytical modeling, for instance, based on classical set theory, we corne across two inconveniences: (i) the first rnay be caused by the excessive complexity of the situation being rnodeled and may lead to two consequences: either we are not able to formulate the . or the model is too complicated to be implemented in practice: and (ii) the second inconvenience consists of the indeterminacy caused by our inability to differentiate events in real situations exactly and hence, to define system behavior in precise form. Real situations are very often not "crisp" and they cm not be described precisely .

An underlying philosophy of the theory of fwy sets is to provide a strict mathematical framework, where imprecise conceptual phenomena in modeling, decision making, and control rnay be precisely and rigorously studied. Essentially. such a framework provides a natural way of dealing with problerns in which the source of imprecision is the absence of sharply defined critena of class membership rather than the presence of random variables. It provides for a gradua1 transition from the redm of ngorous, quantitative and precise phenomena to that of vague, qualitative and imprecise conceptions.

As a particular field of application, in systern modeling and control. there are many difficulties which are comrnonly experienced by practicing engineers. For instance. it is generally difficult to accurately rnodel a complex process by a mathematical model. Even when the rnodel iüelf is tractable, controlling the systern or process using an andytical conuol aigorithm rnight not provide satisfactory performance. Funhermore, it is cornrnonly known ihat the performance of some processes can be considerably irnproved through control actions (tuning actions in pmicular) provided by an experienced and skilled operator (Miller, 1995). Although some of these actions have been recently formulated by conventional control aigorithms (Chang, 1995), it seems that the key elements in human thinking are not numbers, but labels of not crisp but fuzzy sets. that is. classes of objects in which the transition from memberstup to non-rnembership is pdual rather than abrupt.

The methodology of the frmy-logic modeling and conrrol, based on fuuy set theory and fuuy logic, appears promising when the phenomena are too complex for analysis by conventional quantitative techniques, when the available sources of information are interpreted qualitatively, inexactly or uncertainly. ancilor when qualitative and often conflicting performance objectives are considered. Thus. Fuzzy-logic modeling and control may be viewed as a step toward a rapprochement between conventional and precise anaiyticai approach and human-Iike decision making.

1.2 NOTION OF FUZZY-LOGIC MODELING AND CONTROL

1.2.1 Fuzzy Sets and Fuuy Logic

The main idea of fuzzy theory is simple and natural: as we are not able to determine the exact boundaries of the class defined by a vague notion. let us replace the decision whether or not an element belongs to it. by a measure of some scaie. Every element will be evaluated by a measure expressing its place and role in the class. If the scale is ordered, then a smaller measure will express that the given element is sornewhat closer to the edge of the class. The key idea in fuzzy set theory is that an element has a degree of membership to a fuzzy set. Thus, a proposition need not be simply uue or false. but may be partly tme to some degree. It is usually rissumed that this degree is a in the interval [O. 11. This generalization of two-valued logic is called fi~z.7logic. Fuzzy set theory based on fuzzy logic is a generalization of abstract set theory based on two- valued logic and the membership function is a generalization of charactenstic function. Because of this generalization, fuzzy set theory has a wider scope of applicability than abstract set theory in solving problems that involve, to some degree. subjective evaiuation. Figure 1.1 illustrates the general concept of fuzzy set theory. / CRISPSET F'UZZY SET

Figure 1.1 : A general \lieu- offil;,?: set theoc

Let X be a collection of objects denoted ~enericailyby (x}. which could br discrete or continuous. X is cdled the uniiperse of discowse and x represents the generic element of X.

Definition 1.1 : FLQ Ser : A fuuy set A in universe of discourse X is characterized by a membership Function A(x)si which takes values in the interval [O. 1 ] namriy.

A fuzzy set may be viewed as a generalization of the concept of an ordin- set whose rnembership Function only cakes two values (0.1 ). Thus a fuzzy set A in X may be represented as a set of ordered pairs of a generic element x and its grade of rnembership function a:

Definition 1.2 : Linguistic Variable : A linguistic variable is charactenzed by a set of (x, T(x),X, M) in which x is the name of variable. T(x) is the tenn set of K. that is. the set of names of linguistic values defined on X (universe of discourse) that x cm take. and M is a semantic function which gives the meaning of a linguistic value in terms of the quantitative elernents of X. For example. if "error" is interpreted as a linpistic variable. then its term set T(error) could be:

T(error) = ( Negative Big (NB). Negative Medium(NM), Negative Smaall (NS). Alrnost Zero(AZ). Positive Small(PS). Positive Medilm (PhQ. Positive Big (PB) }

where each term in T(error) is characterized by a hzzy set in a universe of discourse X=[-6.61, whose rnembership functions can be assigned as in Figure 1.2.

Definition 1.3 : Fri~? Proposition : A huyproposition is an expression whose degree of is defined by a rnembership function. Hence. each fuzzy proposition is represented by a fuuy set. For example. die fuqproposition "error is ivegative Big" is represented by fuzzy set NB with a specific membership function.

Definition 1.4 : Fi13Relation: An n-ary hiuy relation R is a fuzq set in the product space Xp... xX . and is expressed by its membership function:

R(x,,x, ,..., x,): X,xX 2x...xX, +[O. 11 :

~={((x,,x?,..., x,), ~(x,,x,,..., xn))( (x,.x2,..., X~)EX[XX:X ...XX.)

Figure 1.2 : Membership frmction of the linguistic variable "error" CHAPTER INTRODUCTION

Definition 1.5 : Approximate reasoning: In fuzzy logic, inference is in sharp contrast to the inference in . Inference in approximate reasoning is computation with Fuzzy sets that represent the meaning of a certain set of fuzzy propositions. For example. given the fuzzy IF-THEN de:

"IF error is Negative Big, THEN control signal is Positive Medium". and an observation: "error is Negative Medium", by appropriate inference mechanisms we can deduce the proposition "control signal is Negative Rather Big" with a new fuzzy set NRB as its representative. Therefore. unlike classical logic. in approximate reasoning. neither the observation nor the conclusion is necessarily the sarne as the elements of the IF-THEN rules. The above method of reasoning is called the Generdired Modus Ponem (GMP).

1.2.2 Fuzzy-Logic Modeling

Fuzzy modeling is an approach to forming the system mode1 by using a descriptive language based on fuzzy logic with fuzzy propositions. This linguistic approach of system modeling can be formulated by three distinct features:

1) the use of linguistic variables in place of. or. in addition to numencal variables: 2) the characterization of simple relations between variables by IF-THEN fuzzy mles: 3) the formulation of complex relations by fuzzy reasoning algorithms.

Therefore, the central characteristic of fuzzy systems is that they are based on the concept of fuzzy partitioning of the information. The decision-making ability of the fuzzy mode1 depends on the existence of a set of niles and a fuuy reasoning mechanism. In the most general form. the encoded knowledge of a Multi-Input Multi-Output (MIMOI system cm be interpreted by fuuy models consisting of IF-THEN rules with rnulti- antecedent and multi-consequent variables (with r antecedents. s consequents. and n rules): ------I IF Utis BIIANDUz is B12AND... AM) U,is BI, THEN VIisDII ANDV2 is DI2ATYD ... ANDV,isD,, I ALSO

*.*... ALSO IF Ut is BnI AND U2is Bnt AND ... AND Ur is B, THEN VIis D,,IAMI V2 is Dnr AM) ... AND V, is D,,

where. Ui, U?, .... Ur are input variables, and VI, Vz, ..., V, are output variables, B, (i=l,. ..,n, j=l.. ...r) and Dik (i=l,. ...n, k=l,. ...s) are fuzzy sets of the universes of discourse Xi, X?,.. .,Xr and Y ,, Y:,. ..,Y, of Ul, U?,...,Ur and VI, VI,. .., V,, respectively. The set of desopenting with linguistic values of input-output variables appears to be in analogy to the system of equations used for presentation of linear and nonlinear systems. The fuzzy sets Bo and Dir are parameters of the fuzzy model, the number of the rules determines its structure, analogous to the order of the anaiytical models.

Conceptualiy, a system with multiple independent output variables cm be considered as severai groups of single output systems, separately. Consequently. the general rule structure of a MIMO fuzzy system cm also be presented as a collection of Multi-Input Single-Output (MISO) fuzzy systems such that for a system with s outputs. each multi- consequent rule is broken into s single-consequent rules. Although the number of rules in the new fuzzy system will be increased, modeling and inference would be more straightforward for MISO fuzzy systems. That is the reason why the literature concentrates on multi-input single-output rules as a generic presentation of fuzzy systems. In this research we also concentrate on MISO fuzzy systerns.

1.2.3 Fuzzy-Logic Control

Fuzzy-logic control systems are featured as a particular type of knowledge-base systems in which control characteristics are encapsulated in the fom of fuzzy IF-THEN rules in place of analytical formulation. The principal structure of a Fuzzy-Logic Controller (FLC),as illustrated in Figure 1.3, consists of the following cornponents. Figure 1.3 : The principal stnrciure ofjc~7-logicconrrol

Fuzzification Module: This module performs two kinds of transformations: the first transformation maps the physical values of the current system States into a nomalized universe of discourse, and the second one converts the current cnsp value of the system state into a fuzzy set.

Knowledge Base: This module consists of a data base and a rule base. The data base provides the necessary information for the proper functioning of the fuzzification module, the rule base, and the defuzzification module. This information includes:

8 Fuzzy sets (membership functions) representing the meaning of the linguistic values of the system state and control input variables.

8 Physical domains and their nomalized counterparts together with the normalizationl denormalization (scaling) factors.

The basic function of the mle base is to represent the control policy in the form of a set of IF-THEN rules.

Inference Mechanism: This module cornputes the overail value of the control input based on the individud contributions of each rule in the rule base.

Defuzzification Module: In this module, the set of modified control input values is mapped into a single point-wise value, through defuzzification and denomalization. 1.3 BACKGROUND AND OUTLINE OF THE THESIS

1.3.1 Fuzzy-Logic Modeling

in attempt to obtain more flexibility and more effective capability of handling and processing of complicated and ill-de fined systems, Zadeh (Zadeh. 1973) proposed a linguistic approach as the mode1 of human thinking which introduced "jifir~Niess*' into systems theory. This idea was developed further to a new class of systems called ''jificzy systems", by Tong (Tong, 1979), Pedrycz (Pedrycz. 1984). Gupta et al. (Gupta. 1989), Sugeno and Yasukawa (Sugeno 1993). and Yager and Filev (Yqer. 1994).

In investigation about fuzzy-logic modeling, there are several issues which must be clearly addressed. With regards to where system information is presented. two basic categories have been suggested. so fa.. in the first category, both antecedent and consequent parts of IF-THEN rules consist of vague propositions. In these models. fuzq quantities are associated with linguistic labels. and the fuzzy mode1 is essentially a qualitative expression of the system which uses naturd laquage expressions. The second categoly of fuzzy models is fonned by logical rules that have a fuzzy antecedent part but a functionai consequent part; essentially they are a combination of fuzzy and non-fuzzy models. This category was initially proposed by Takagi-Sugeno-Kang (Takagi. 1985) and is usually cdled TSK fuzzy models. TSK fuuy rnodels have effective potential for expressing quantitative information and are computationally efficient. However, we are more concerned with a generai framework for qualitative modeling. therefore it is preferable to adopt the more general type of fuzzy IF-THEN niles which consist of fuzzy variables in both their antecedent and consequent.

Regarding the methodology of fuzzy modeling. two basic approaches cm be recognized in the current literature. In traditional methods of fuzzy modeling. it is assumed thai expert information is available. Therefore, in this approach. the linguistic description is constructed subjectively on the bais of the a priori knowledge about the system. The first significant application of fuuy logic in modeling of complex systems. CJUPTER INTRODUCTION

specially in modeling operator's actions in the area of control engineering (Mamdani. 1975) was clear evidence of the great power of this novel approach for dealing with the complexity of the real world. This direct approach to fuzzy modeling has some inherent limitations. The main drawbacks of this approach are subjectivity and lack of generalization and dependence on expert's knowledge which sometimes could be faulty. In search for more objectivity in constmcting fuzzy models. scientists tried to develop more formal techniques that could use available data to augment human knowledge, or even generate new knowledge. Therefore. the second direction in the development of fuuy models. inspired by classic systems theory, is based on the use of input-output data. ui the ianguage of systems theory, this approach can be regarded as a process of system identification (Sugeno, 1993).

One of the main issues of fuzzy rnodeling is the reasoning mechanism. i.e.. i) the way information is implied in each rule, ii) the way it is aggregated among a set of rules. iii) the way new information is inferred from the set of rules. and iv) the way fuzzy inferred values are umslated into their crisp correspondences. In current methods of fuzzy modeling, the connectives of the reasoning mechanism are selected a priori of the identification procedure without any theoretical basis. In the proposed systematic fuzzy modeling methodology, by using the fundamentals of the theory of approximate reasoning. we introduce a unified parameterized formulation for the inference process as a general frarnework for reasoning with a fuzzy modrl. In this way. we attempt to spread the objectivity to the selection of the reasoning mechanism in fuzzy modeling and control. In chapter 2. we discuss the above subject rnatter.

Other issues of the objective approach of fuuy modeling are due to the fuzzy system identification problem, which is the subject of chapters 3 and 4. The procedure of fuzzy system identification and modeling can be represented by the flow chart in Figure 1.4. Sirnilar to conventional system identification, the problem can be divided into two types: strtict~ire identification, and parurneter identification. In fuzzy rnodeling. structure identification proceeds through two steps: (i) input variables are recognized among a11 CHAPTER 1NTRODUCTlON

. 1 Reasoning iism Rule Generation Fuzzy System Structure I Identification Input Selection & Membership

Inference-Parameter Adjusment I ] Parameter 1 Identification 1 [ Membenhip Function Tunins 1

Figure 1.4 : Flo~r.chart offilu? systern rnodeling

possible input candidates and suitable membership Functions are assigned for them. and (ii) input-output relations (IF-THEN rules) are specified.

In chapter 3, Fuzzy ciustering is addressed as an intuitive approach to objective mle generation in fuzq modeling. In this direction, we inspect a fuzzy c-means clustering algorithm and attempt to improve the objectivity of this technique by derîving suitable indices for selection of the number and the level of fuzziness of clusters. An efficient method is also suggested for the assignment of initial cluster center locations. Furthemore, we address the "clussifcntion process" to extend the derived fuzzy partition of the sampie data to the entire space.

Chapter 3 contains the "input selection" step of structure identification.. In this chapter, we suggest a new strategy through which dominant input parameters are assigned in one step, and no iteration is required. Furthemore. the convex input membership functions are also derived through ''jicz? line cllistering". The second type of fuzzy system identification . i.e.. parameter identification. consists of the derivation of the optimum inference parameters and adjustment of input and output membership functions. This is also discussed in chapter 4. Finaily, the proposed systematic fuzzy rnodeling algorithm is surnmarized and the validity of the methodology is illustrated by two examples. Fuuy- Logic Control

The goal of developing simple and yet efficient control strategies for complex systems has provided significant challenges to traditional control methodologies. It has also triggered a new field of research known as Fuvy Logic Control (RC). The new area originated from the seminal work of Zadeh on fuuy algorithms (Zadeh. 1973) which introduced the idea of formulating the control algorithm by logical IF-THEN rules.

From the earliest efforts by Mamdani and his coworkers (Mamdani. 1975). most of the related research has focused on practical implementations of fuzzy controlle~.Successful results have been reported in a wide range of system cornplexity and application such as water quality control (Yagishita. 1985). automatic train operation systems (Yasunobu. 1987). nuclear reactor control (Bernard, 1988). and automobile transmission control (Kasai. 1988). The widespread success of the fuuy logic approach has pointed the way to the effective utilization of fuzzy control in the context of compiex ill-structured situations. those marked by the lack of an accurate and yet tractable mode1 of the plant and/or a multiplicity of qualitative and often conflicting performance objectives. On the other hand. this enormous success has led to a surge of curiosity about the theoretical and methodological foundations of fuzzy control. such as basic questions conceming design guidelines. stability and performance robustness.

Despite the diversity of approaches used in the development of fuzzy controllers. most of them are designed based on a "trial-and-error" approach. Although this could be effective in some cases. it prohibits us from obtaining detailed and systernatic studies of developing fuzzy control subject to given goals and constraints.

However, in recent years. many basic theoretical issues of fuzzy logic control have been tackled with promising resulrs. The main approach to the objective synthesis and analysis of fuzzy logic control is to consider the FLC as a particular class of noniinex controllers. and to apply tools from classical nonlinear control systerns theory. Along this direction, one of the first efforts is that of Tong (Tong. 1976) based on a discrete version of fuzzy relations. Braae and Rutherford (Braae. 1979) introduced the concept of linguistic trajectory of closed-loop fuzzy control systems. and established a relation between linguistic state space representation of the system and Fuuy control rules. Kickert and Mamdani (Kicken, 1978) developed a multi-level relay mode1 of fuzzy control and used the describing functian method to study the stability problem of FLC. Qualitative analysis of the state space for fuzzy control systems was proposed by Aracil et al. (Aracil, 1988), and was applied effectively to simple systems. Sugeno and Kang (Sugeno, 1988) proposed a design method based on the fuuy mode1 of the system. Tanaka and Sugeno (Tanaka, 1992) applied Lyapunov's direct method to study the stability of fuzzy control systems. Langari (Langari, 1992) proposed an andytical formulation of füzzy-logic controllers. In the context of input-output stability, classical techniques such as the circle criteria and Popov cnteria were applied to fuzzy control systems by Ray and Majumder (Ray, 1984) and Aracil et al. (Aracil, 1991) as a rnethod of stability analysis and design of FLC.

One of the prornising approaches towards objective design and analysis of fuzzy-logic control systems is based on the fact that FLC is a Variable Structure System (VSS). Variable structure control systems constitute a class of nonlinear feedback control systems whose structure varies depending on the state of the system. Although none of the structures of VSS is necessarily stable, their combination results in a stable sliding mode, Le., the system trajectory slides dong a switching (hyper)surface. The variable structure , which is usually called sliding mode control. was initially proposed and elaborated upon by Emelyanov (Emelyanov. 1967) and Itkis (Itkis, 1976). The latest development in the theory of VSS is due to Slotine and Li (Slotine, 1990). and an appropriate generalization to multi-input multi-output systems was developed by Qu and Dawson (Qu, 1996). A detailed survey can be found in (Hung, 1993).

While research still continues in the field of variable stmcture control theory, recently new efforts have been made to investigate the connection between fuzzy logic and variable structure control (Kawaji, 1992; Filev, 1993: Ghalia, 1995: Wu, 1996). Based on the analysis of the two control approaches, it was concluded that, due to partitionhg of the input-output space, fuuy control is a qualitative extension of the sliding mode control. Some guidelines were specified to derive the fuzzy IF-THEN control rules and to analyze the stability and robustness of fuzzy control based on variable stmcnire system theory (Palm. 1992). However, in the above-mentioned efforts only simple single-input single-output systems are considered. For rnulti-input multi-output nonlinear systems. due to the state variable interactions. more information from the system is required. leading to a model-based fuzzy-Iogic convol approach which is our focus in chapter 5.

Recently. a few researchers have attempted to apply the fuvy sliding mode control approach to robot manipulators (Chen. 1994: Tsay, 1994: Begon. 1995). Despite successful results, a lack of a systematic approach to design and analysis of FLC. based on the sliding mode control theory. is observed. This is Our focus in chapter 6.

1.3.3 Application of FLC to Robotics

Robot modelinj and conuol is a challenging problem with its intelligent aspects. highly nonlinear and uncertain characteristics. and real-tirne implementation difficulties. Nonlinearity, interactive dynamics. parameters variation. and other uncertainties in robotic systerns prevent linear servo controllen from providing a satisfactory performance specially in transient and high speed modes of operation. .ModeI-based control algorithms have been used as nonlinear feedback and adaptive controllers for achieving a better performance. However. these techniques are usually based on analyticai dynamic rnodels that are difficult to achieve within an appropriate accuracy. need many system parameten to assign. and require long cornpuration tirne. Therefore. it is difficult to implement these dgorithms in red time. These shortcomings have led some researchers to investigating the application of fuzzy-logic conuollers to robotic systems.

Except for the work in hzzy decision-maiung for robots by Uragami et al. (Uragami. 1976), applications of FLC to robotics have been increased since the beginning of the 1980's when the progress was being made in fitting industriai robots with various kinds of senson for perceptive functions and human-machine information exchange. Research in this area is devoted to high-level and low-level aspects of robot control. High-level fuzzy controllers have been suggested for motion planning of mobile robots (ex., Yen. 1991; Fei. 1992), servo gain adjustment of robot manipulators (de Silva. 1989), micro robots (Wohlke. 1993). and of complex robotic systems (Cotsaftis, 1993).

in the actuator-level implementation, the major part of the research is focused on the kinematic control. Calculation of the inverse kinematics of manipulators is computationaily expensive. and consumes a large percentage of time in the real-time control of manipulators. Lack of the solution in singular configurations and existence of multiple solutions for redundant cases add more complexity to the problem. The idea of using human intuition and experience through fuzzy logic approach to avoid complex computation for inverse kinematics mapping has been investigated by several researchers (e.x., Palm. 1992).

Robot control is more difficult when the robot has a contact with external forces. h this case, control methods should pnerate compliant motion to balance external forces. Also. they should be capable of adjusting to the dynarnic changes of the environment. Fuzzy-logic adaptive force controllers have been developed as simple and efficient techniques for flexible compliant motion (Kim. 1992) and grasping (Xu. 199 1 ).

Although the idea of using fuzzy-logic mode1 of the manipulator dynarnics in control loop was introduced in (Zhou, 1992). no systematic algorithm and detailed analysis and design procedure can be found in the literature. This is due to lack of concise fuzzy-logic modeling algorithm. In this research. we exploit Our proposed fuzzy-logic modeling algorithm for controlling a real 4 degree-of-freedom robot manipulator. Details are discussed in chapter 6. 1.4 CONTRIBUTIONS

The outcome of this research is a systematic methodology of fwzy-logic modeling and control that has been successfully applied to a 4 degree-of-freedom robot manipulator. The emphasis is on the system modeling phase, since by accornmodating a simple and yet comprehensive model, the control task becomes straightforward. Moreover, a tool for modeling complicated systems has further benefits such as system behavior prediction.

The basic hypothesis of this research is that, in "real" applications, it is hardly possible to model or identify the intemal parameters through analytical approaches. The proposed methodology can be viewed as a genenc tool for the modeling and control of complex and ill-defined systems.

There are three major contributions in this research:

(i) developrnent of a systernatic approach to fuuy-logic modeling of complex systems;

(ii) construction of a concise framework for design and analysis of Fuzzy-logic control of nonlinear multi-input multi-output systems;

(iii) application of the proposed methodology to a 4 degree-of-freedom robot manipulator as a typical example of complex systems.

The above contributions are provided through the following outcornes:

A unified parameterized formulation of fuzzy reasoning process : A fuzzy reasoning formulation that provides a continuous range of variation for the inference mechanism was deveioped. As a result, unlike the traditional approach of selecting a reasoning formulation a priori for fuzzy modeling, the best inference mechanism is identified from the system input-output data.

An improved fuzzy classification algorithm : Major bottle-necks of fuzzy clustenng algorithms were addressed, and efficient solutions were proposed. The improved fuzzy clustering aigorithm needs no a priori information, and can automatically assign the required parameters from the data.

A novel strategy of identification of significant input variables and their fuzzy membership functions : A method of finding the most dominant input variables arnong a finite number of possible input candidates was proposed. Unlike traditional methods, the proposed method requires no iterations. Also a new clustering notion, "Jrtz>' Zine clustering" for assigning the input fuzzy membership functions from the output membership function. was introduced.

A generalized formulation of sliding mode control for a class of nonlinear muti- input rnuti-output systerns : A new formulation of multi-dimensional sliding mode control was developed. The formulation has two distinguishing features: (i) it is applicable to a "black box" system without any need to model its internai parameters, and (ii) the robust control terms can be designed for each system state independently, however the stability and robustness of the entire system is guaranteed. As a result. for each system state. a "robr

A robust model-based fuzzy-logic control stmcture : The above formulation was impIemented in the context of fuzzy-logic control systems. and a robust model- based fuzzy control structure was proposed. We proved the stability and robustness of the control system and provided guidelines for designing appropriate robust fuzzy IF-THEN control rules. REASONING PROCESS IN FUZZY MODELING

2.1 INTRODUCTION

One major step in fuzzy-Logic modeling is to decide about the reasoning mechanism. The process of reasoning in fuzzy modeling proceeds through the foIlowing steps:

1) iûzzy aggegation of antecedents in each rule (A-WconnectiW: 2) implication relation for each individual rule (IF-THEN connecrive):

3) aggregation of the rules ( ALSO connective ); 4) inference from the set of rules. using the crisp input. to obtain the fuzzy output:

5)def~~eatfonof~hewtput.------

In current methods of fuzzy modeling. the connectives in dl of the above steps of reasoning are selected a priori to the modeling procedure without any theoreticai bais.

The number of selections are limited CO a few known aggregation and implication operators (Demirli, 1994).

In this chapter, a general and unified frarnework for the reasoning process is constructed. In section 2.2, we start from the basic elements of reasoning, the connective operaton (AND.ALSO, and IF-THEN). and adopt a special parameterized farnily of tnangular functions which. due to its sirnplicity and symmetry, is appropriate for our purpose. We extend the binary operations of connectives to n-ary operations. and prove the validity of De Morgan laws for n-ary operations. CHAPTER REASONING IN FUZrY MODELING

In sections 2.3 and 2.4, we derive a parametric formulation of fuzzy mie implication (step 2) and mle aggregation (step 31, respectively. in section 2.5. by focusing on systems with crisp input. which is the case in most applications of fuzzy modeling and control. and proving the propeq of disuibutivity of triangular funcrions in such cases. we present a unified reasoning mechanism for two extreme reasoning formulations that leads to a unified parameterized hzzy reasoning method. in section 3.6. a parameterized formulation is also inuoduced for the defuuification step.

As a result. four reasoning parameters p. q. a. and p. are introduced whose variation will cause a continuous range of variations for reasoning mechanisms. Therefore. we are no longer resuicted to the extremes in any step of the reasoning process. but in each case. it is the system itself which specifies what combination of the above parameters is more appropnare to express its behavior. Reasoning parameters cm be optimized based on input-output data obtained from the system.

In order to reduce the computational efiort. in section 2.2. a fast algorithm is introduced for the calculation of the pararneterized family of triangular functions. Furthemore. in section 7.7. by prociding an approximation of this farnily of functions. a simpiified parameterized reasoning approach is consuucted in which the defuuified output can be imrnediarely calculated from the individual consequent fuzzy sets of the mle set. The validity of the proposed formulation and its simplified version is illustrated through several examples. 2.2 FUZZY CONNECTIVES

At the computational level of expressions. naturd linguistic connectives "and". "or". and "not" are transformed into algebraic hnctions such as "Min". "Mai"' O: in a general form. triangular nom (t-nom). triangular conorm (t-conorm). and cornplementation operators (Turksen, 1995a). In classical set theory. these connectives are defined in a unique way which is due to the two-valued logicd operations. However. when the degree of membership to a set is no longer a value from the set {0.1) but from the interval [O. 11. as it is in the case of fuzzy sets. then the interpretation of logical connectives is neither unique nor so obvious. By introducing the suirable axioms. newer interpretations for logical connectives are introduced which cover a wide range of suggested expressions (Bellman. 1973). In this section. in the spirit of this new interpretation. we investigate a parametnc class of t-nom and t-conorm operaton. In what follows. we use the computationd level of expressions to interpret propenies and relations of connective operators. Ar this level. what we deal with are membership functions such as a. h. c. etc.. which are defined as :

For each x c X : a(x) : X + [O. 11 : where X is the universe of discourse.

2.2.1 Fuuy Complement

Bellman and Giertz (Bellman. 1973) suggest the following propenies as nntural awioms for a negation operator C : Cl : C(0) = 1 : C(1) =O: C2 : C is strictly decreasing and continuous mapping : C3 : C is involutive, Le.. C(C(a))= a for a E [O. 11 . A negation function is cdled strong if it satisfies al1 three axioms.

A suitable pararnetric strong negation is suggested by Yager (Yager. 1980): for q = 1. the negation function is the standard cornplement of crisp set theory which was also initially adopted for fuzzy set theory. Our further analysis is confined to the standard complement operator.

ln classical set theory, the complement operator relates union and intersection operators according to De Morgan laws:

in hizzy set theory. we would aiso like to maintain the above relationships. Therefore. fuzzy set intersection and union operaton are defined rnutuaily in order to satisfy De Morgan laws.

2.2.2 Fuuy Set Intersection and Union

Propenies generally expected to be satisfied by the commutative. associative class of intersection-union operaton. which is knov~nas the t-nom and t-conorm set of operators. are identified with the following axiorns ( Smets. 1982):

F 1 : Bo~otdrrry n(a.l)=ri . n(a.O)=O for al1 a in [O . I ] u(a,O)=a . u(a.l)= 1 for al1 a in [O . 13

F2 : Comr7zurativi~

n(a.b) = n(b.3) for al1 a. b in [O. 1 ] uhb)= u(b.a) toralla.bin[O. I]

F3 :Associativi~ n(n(a,b),c) = n(a.n(b,c)) for al1 a . b in [O . 1 u(u(a.b),c) = u(a,u(b,c)) for al1 a. b in [O . 11

F4 : Monotonicity If a 2. a' and b 1 b' then : n(a.b) 2 n(a'.b) . n(a.b) 2 n(a.b') for al1 a. a' . b . b' in [O. I ] (2.6) v(a.b) 2 u(a'.b) , v(a.b) > u(a.b') for al1 a . a' . b . b' in [O . 11 CHAPTER REASONING lN FUZZY MODELING

These properties have been used for characterizing functions t-nom. T : [O. 1 ]x[O. 11 ->

[0.1].and t-conorm. S : [O,I]x[O.l]-t [0.1].which in turn define the commutative and associative ciass of conjunction-disjunction operators. Such functions are known as triangular noms and triangular conorms. respectively. introduced independently from fuzzy set theory by Schweize and Sklar (Schweizer. 1953) in the context of statistical metnc spaces. The only distinction between T and S operators is in condition FI in which the unit is L for t-nom and O for t-conorm.

Some of the well-known t-nom and t-conorm operators are defined as follows:

Min-Max Operators :

S,,(a.b) = Mm(a.b) = avb (2.8)

Win-~Maw operators which are also known as Zadeh opentors have some additional propenies such as distributivity and idempotency. Hence. it can be considered as a special computational c lass of conjunction-disjunction operators (Turksen. 1995bl.

XIgebraic Product and Sum :

Drastic Product and Sum :

a if b=l 1 T,(a.b) = b if a=l O therwise 10 otherwise

By using properties FI (2.3) and F4 (2.6). it can be easily proved that for any arbitrary t-nom T and t-cononn S and for al1 a . b E [O. 11 : CHAPTER REASONING 1N FU= MODELING 23

In order to cover various types, parameterized families of t-noms and t-conorms have been suggested arnong which Schweizer and Sklar's operators (Schweizer. 1983) are adopted for further investigation :

The extreme cases are when p tends to O, 1. and infinity :

T(a, b) = Tm,(a, b) = a A b '->O : {S(a,b)=S,(a,b)=avb

T(a, b) = Tpd (a, b) = a @ b S(a, b) = S,,, (a, b) = a 8 b

T(a, b) = T, (a, b) = a* b p+w : S(a,b)=S,(a,b) =a 0 b

The main features of this parameterized form are its analytical simplicity and syrnrnetry. These are basic advantages for our future irnplementations. Another advantage is that, as discussed in (Trojan. 1987), as p (pO)changes continuously. this parametric form does cover al1 t-noms and t-conorms from the special class of Zadeh operators to drastic operators.

It is worth noting that, analogous to classical set theory, De Morgan laws establish a link between union and intersection via complementation. If a t-nom T and a t-conorm S and a strong negation C satisQ De Morgan laws as : CHAPTER REASONlNG IN FUZZY MODELING 24

then the triple (T,S,C)is cailed a De Morgan triple. and T and S are called n-duds (cojoints) of each other. Al1 cojoint t-noms and t-conorms introduced above are du& when considered with the standard negation C(a)=I-a . The behavior of the parameterized t-nom and t-conorm for the extreme cases is shown in Figure 2.1.

2.2.3 Extension of Triangular Norm and Conorm Functions

Alihough t-nom and t-conorm functions have been defined as binary operators on [O. Il, their associativity property allows thern to be extended to n-ary operations as :

Tn : [0.iln + [0.1] Sn : [0.1]" + [O. i ]

where. T(-) and S(-) are binary operators. It is proved that the n-ary operators Tn and Sn satisfy sirnilar propenies as the original binary T and S. CH.APTER REASONING IN FUZZY MODELING 25

Figure 2.1 : Pararnereri:ed t-nom (lefr) and t-conorm (Nght) for p=.0001(borrom). p = l (middle),p= lOOftop) THEOREM 2.1 (Ruan, 1993) : The n-ary operators T. and Sn on [O. 11 satisfy following properties:

where o is a permutation of { 1.2.. . ..n ) . (2.22) FE3: T,(ai,a2..... a,) = TtAl(at.. . ..a,.T,-,(a,+. ...a,.. . ..an)) = Tn.j*~(T,(al.-...a,).+[.. . ..a,) : S,(a~.a?..... a.) = S,+l(al... ..a,.Sn.,(ai,i.. ...a,.. . ..an)) = S,.,- i(S,(ai.. . ..a,).a,-i... ..a,) .

(Tn(a1.a ,..... an) 5 Tn(a;.aI..... ai) FE4: (V~E{ 1.2 .....n}: a,

.Moreover. we need to justiS that De .Morgan laws hold for n-ary tnangular operators.

THEOREM 2.2 : If the binary operators T and S are duals with standard nepion. then their corresponding n-ary extensions T, and Sn are also duais.

PROOF : By using mathematical induction. De Morgan Inw is truc for n=2. Suppose that it is ais0 true for n=k. then :

Consider n=k+ 1, then :

The same proof cmbe given for Srci(al .az.. .. .ak+i ) . We cal1 Tn and Sn the extension of tnangular nom and conorms to n arguments and we omit the subscript n, and simply wnte T and S for the class of mapping generated by the triangular noms and conoms.

We have to extend the parameterized form of t-nom and t-conorm (equation 2.14) to n arguments. The extension of t-conorm will be derived first, and in order to obtain extended parameterized t-nom we use the De Morgan law:

Extending the t-conorm formulation to three arguments by using the associativity property yields:

In the same way, the formulation for IZ arguments becomes :

As it is obvious from equation 2.26. the computational complexity exponentially increases when the number of arguments n becomes large. With a good algorithm we need (2"-2) additions and (2"-11- 1) multiplications and (11) power operations to compute the above formulation. Hence, the computationai complexity is of 0(2Iz).This problern is a bottle-neck for further applications of fuzzy reasoning in fuzzy modeling and control.

In order to significantly reduce the number of arithmetic operations, we change equation 2.26 to the following form which can be confirrned by inspection :

S(aI,a2,..., a,) = (2.27) CHAPTER REASONING IN FUZrY MODELING 28

STEP 1 : Compute a p. a!,. . ..a: as AI, At,. ...A,, respectively.

STEP 2 : S=A,

STEP 3 : LOOP i FROM n-1 TO 1 SEP -1 ; S=A, +(1-A,)xS END

-. Figure 2.2 : The algorithm of calculating t-conorrn

Then. for a set of (al,a2,....a,) (n>3), the new formulation can be computed by the algorithm shown in Figure 2.2. The number of arithmetic operations in the above algorithm is (32-2) additions. (n-l) multiplications. and (n+ 1 ) power operations. reducing the computational complexity to O(n). Therefore. computational complexity is a linear function of the nurnber of arguments which is sufficien

STEP 1 : I / Compute ( 1-ai).(1-az).. . ..( 1-a,) as a,.a...... ai . respectively.

STEP 2 : Compute a;P.alP,.... a:P as Ai. A?,.... A,. respectively.

STEP 3 : T = A,

STEP 4 : LOOP i FROM n-1 TO 1 STEP -1 ; T=A, +(1-A,)xT END

Figure 2.3 : The ulgorithm of calculating r-norm CHAPTER REASONING IN FUZZY MODELING 29

2.3 IMPLICATION OF INDIVIDUAL RULES

According to the theory of approximate reasoning (Dubois. 1991a.b). each fuuy rule of the form :

IF Ui is Bi AND U1is B2 AND ... AND Ur is Br THEN V is D (2.28) cm be translated into a canonicai proposition of the fom : (Ul.U2.... .U,.V)isR where R is a fuzzy relation defined on the Cartesian product universe XixX-x.. .xX,xY .

According to the analysis presented in section 2.2. it is suitable to use t-nom operators to define conjunctions in the antecedent of the multi-input de.Furthemore. modeling of implication relation based on the use of huy logic is not unique. ln membrrship domain. each entry of the implication relation ( B inB.ri.. .riBr ) + D is denoted as :

Two extrerne paradigms for forming the implication relation are corjrrncrive nzrtizod and disjtrnctive rnetliod. Under conjunctive implication. the hzzy relation R is simply the conjunction of antecedent and consequent spaces. Therefore :

in which T is t-norm operator (with parameter p) for rule implication. and T' is t-nom operator (with parameter q) for rule antecedent aggregation. This approach. which is based on heuristics. is an approximation of implication functions.

On the other side. the disjunctive approach is obtained directly by generalizing the material implication defined in classical set theory as : B -t D = BUD .

Therefore. we have :

in which. S and S' are t-conorm operators with paramerers p and q. respectively. REASONING IN FUZZY MODELING 30

2.4 AGGREGATION OF THE RULES

Selection of an operator for aggregation of the rules depends on the selection of an implication operator for individual rules. Suppose that the total knowledge of a system is expressed by a mle set "(UI,Ur,. ...U,V) is R" . or. in a more expanded form : (2.33) (Ui.U2,.... U,,V) is Ri ALSO (UJJ, ,....U,,V) is R2 ALSO ... ALSO (Ur.U2..... Ur.V) is Rn .

Further. suppose each basic proposition (individual mie) is to be as a conjoin of the constituents. Le.. "UJ is Bij". and "V is Di". Then. each individual rule is stated as a conjunctive implication (equation 2.3 1). Furthemore. the combination of dl rules mut be stated as a disjunction (union) operation. In other words. the ALSO connective should be an OR operator: a t-conorm: (2.34)

R,,(x,.x ,..... x,.y)=S(R,,(x,.x, ..... x,.y).R..(x,.x,i- ..... x,.y) ..... R;,(x,.x, ..... xr.yH

The reason for such selection is that: since we have adopted t-nom operation for rhe implication of individual rules. there is always a possibility of having a zero output from at Ieast one of the des. Le.. when the antecedent rnembership value becomes zero (property FEI. equation 2.20). In order to elirninate the effect of such a rule in the rule set. it is required to implement t-conorm operation for the aggregation of the mies according to the property FEI. This method of aggregauon. which is a heuristic approximation of reasoning. coincides with .CIamdc~ni's npproximnrion tzpproncli introduced originally by Marndani (Mamdani. 1971). and was applied successfully by ,Marndani and Assilian (Marndani, 1975) to the control of dynarnic systems.

From the other point of view. if each basic proposition. Le.. each individual rule. is regarded as "[C(U, is Bij)]u[V is Di]". which is the disjunctive implication approach. then the knowledge "(UJL,. . ..U,,V) is R should be considered as a conjunction

(intersection) of the rules. In other words. the ALSO connective is MW operator: a t- nom: (2.41 A similar argument is put forth for this selection. Since there is a t-conorm operation for each individual nile implication. there is always a chance of getting 1 from at least one of the niles. This happens when the antecedent membership value becomes zero (property FEI. equation 2.20). In this case, the effect of such a rule should be canceiled by the rule aggregation operator; a condition which is satisfied by t-nom operator according to the property FEI. This method based on formal logic is cailed fomal logical approach. We refer to (Turksen. 1993a) for more details.

2.5 INFERENCE OF THE RULE SET

We now consider the problem of finding the output value in its fuzzy environment. Consider a Single-Input Single-Output (SISO) system. Given the relationship "(C.V) is R" and the information that U equals to a fuzzy set A. we intend to find a fuzzy value for V. From the mathematical point of view. this can be seen as solving the equation. From a logical point of view. this can be seen as a Generalized form of LModus Ponens (GMP). Based on Zadeh's Cornpositioanl Rule of Inference (CRI) (Zadeh. 1973). the process of finding a solution consists of two steps : 1) Combine the system input proposition and the rule-set relation via the conjunction operation. 2) Project onto the variable of interest.

Therefore. having "(U.V) is R" and "ü is A" . one obtains the relationship "(LM is G" where G=AnR is a fuzzy set defined on the Cartesian product universe XxY with

membership function : G(x,y)=T8'(A(x).R(x.y)). where. T" is a t-nom for CRI conjunction operation.

We are interested in obtaining the output that is generated by the rule. considering that the input U is a fuzzy set A. Applying the projection pnnciple. we get a value F for V as "V is F' . where F is a fuzzy subset of Y such that:

F = Proj, G (2.35) CHAPTER REASONING IN FUZZY MODELING 32

The membership function of the projection of fuzzy set G onto the output space Y is :

F(y) = vx(G(x. y)) = v, [T"(A(x), R(x. y))] = Max. iTM(A(x),R(x. y))] (2.46)

in which V, means the maximum for al1 values of x.

Expression 2.46 can be written in a compact forrn : F = A 0 R, where "0" is known as

the composition operator which represents a combination of " vx"and " T" " operators.

Two different approaches defining the relation R, Marndani's approximation and formal logical approach, lead to two formulations for obtaining the reasoning solution.

2.5.1 Reasoning Based on Mamdani's Approximation

In conjunctive rule implication approach. we recall that individual rules are combined via disjunction operation:

Where each Ri is interpreted as a fuzzy intersection of the fuzzy sets Bi and Di :

Ri is defined on the Cartesian product space XxY and has membership function :

For a given input fuzzy set U = A . the fuzzy output. obtained by this method is : In equation 2.49 several conditions should be satisfied for the selection of t-nom and t-conorm operators. First of dl. according to two simila. approaches for the selection of CRI conjunction operator by Trillas and Vdverde (Trillas. 1985) and Dubois and Prade (Dubois. 1984). T" should be the same as the t-nom T assigned for rule implication in section 2.3 to possess certain desired properties. This is reviewed in more detail in (Turksen. 1993b). However. if the observation of the reasoning (the input A) is a cnsp set. which is mein most cases of hzzy rnodeling and conuol application. and which is Our main interest in this research. T" vanishes in the final reasoning formulation because of the boundary condition irnplemented on the CRI conjunction t-norm opentor. as we will see in the foregoing derivation. Second. as it is investigated in (Turksen. 1993a). selection of t-nom T and t-conorm S operators in equation 1.49 should satisfy the basic requirernent for fuzzy reasoning. i.e.. if we have a system input which is the same as the antecedent of a rule in the rule base. then the reasoning result should be the same as the consequent of the rule. Moreover. there are some constraints on membership functions depending on composition and implication operators as it is discussed in (Turksen. 1993~).Again. for a cnsp observation. it cm be seen that the basic requirement for ftizzy reasoning and the membership function constraints are already satisfied.

Another concem with the above reasoning formulation (equation 2.49) is that: in oeneral. t-nom and t-conorm classes do not have the property of distributivity. Thrrefore. 1 for a fuzzy input A(x). we cm not distribute the t-nom operation arnong the t-conorms in equation 1.19. This means that for the case of îüzzy input. we have to first combine al1 rules to obtain the rule set relation R. and then compose it with the fuzzy input. This method of inference is called First-Aggregate-nzen-Infer (FATI). and regarding the cornpuration and memory considerations, this method is time and mernos, consuming. and has practical limitations.

There is a more efficient method if the input of the reasoning is cnsp. If the input is x' then the input fuzzy set A is interpreted as a hzzy singleton with membership funcrion: CKAPTER REASONING IN FU= MODELING 34

In this case. we can impiement the distributivity for any type of t-nom and t-conorm family. We will prove this for the binary operator. and by using the associativity property. this proof can easily be extended to the n-ary operation.

THEOREM 2.3 : If ~'(x)is a singleton. and M and N are fuuy relations defined on

XxY, then the following distribuùvity relation holds for t-nom T" and tsonorm S :

T"[A'(x).s[M(x,y).~(x. y)]]= s[T"[A'(~).M(x.y)]~"[~'(x).~(x. y)]] (2.51)

PROOF : a) if x = x* then ~'(x)= I. and therefore. recalling the propew F1 (equation 2.3) we have:

T"[A'(x). ~[~(x.y).~(x.y)]] = T"[I.s[M(~.y). N(X. ?)]] = S[M(X. Y). N( x. y )] : s[T"[A* (x). ~(x.y )]. T''[A- (x).~(x, y)]] = s[T"[I. M(X. y )J ~"[l. 'I( X- Y )]] = S[M( x. y ). N( x. Y)].

Hence. the left hand side and the right hand side of the equation 2.5 1 are rqual. b) if x # x' then A'(x) = 0. and therefore. recalling the property FI. we have:

s[T"[A~(~).M(~.~)~T"[A~(~).N(~.~)]]=S[T"[O.M(X.~)~T"[O.N(X.~ I]] = S[O.O]= O. Hence. again the Ieft hand side and the right hand side of equation 2.5 1 are equal. . Retuming to equation 7.19 and applying the distributivity for singleton input A'. we have:

F&) = V~[S[T"[A'(~).T(B,(~).D,(~~)]....T"[A'(~).T(B,(X).D,(Y))]]] (2.52)

Again, we consider two sets of values for x :

b) if x # x' then Af(x)=O. and therefore. we have Fw(y)=O . Thus. for a crisp input x' : This means that we cm fire each single rule fint. i.e.. to compute Bi(xœ).and then for each single mle we calculate the individual fbzzy output Ri, and findly we aggregate al1 hzzy output Ri of al1 rules to obtain the inferred fuuy output Fw(y). This method is called First-Infer-Then-Aggregate(FITA); and is computationally faster dian FATl. Thus. it was proved here that, for crisp input. the two approaches dways give the same fuuy output. This is stated in the next theorem.

THEOREM 2.4 : For crisp input. the reasoning result based on Wamdani's approximation approach is identical for FAT1 and FITA methods.

Frorn equation 2.51. it is concluded that when the inpur is a crisp set. for multi-input single-output systems. the antecedent of each rule i is a conjunction of r hzzy sets Bila

B,2, .. . , Bir. For crisp input x ' = (x; .x: .. . . . x; ) , the mle firing step for the rule i is to

t, is called the Degree Of Firing (DOF) of mle i (Lee. 1990). The fuzzy output

From equation 3.56, in general, there are two t-nom and one t-conorm operators in the fuzzy output membership function which must be selected arnong different classes of triangular noms. In MIS0 systems. usually the number of input variables (r)and the number of rules (n) are more than two. This makes the computations more complicated unless sorne simple triangular operators such as min-Max or drasuc are selected. This is the main reason why people usudly tend to use these noms in practical applications. We do not restnct ourselves to simple and extreme triangular operators but give more flexibility to the system representation by adjusting the operators among the infinite continuous variation of parameters in the pararneterized form. This is provided by taking advantage of fast algorithms, as we have stated in section 2.2.3, for calculating CHAPTER REASONING IN FUZZY MûûELlNG 36

parameterized triangular noms and conorms. and also by some simplifications that will be implemented in section 2.7.

2=5.2 Reasoning based on Formal Logical Approach

This method is based on the disjunctive approach of rule implication. in which the relation of the rule set is conjunction of individual rules :

For each rule. we derive the fuzzy relation membership function (equation 2.32) for SIS0 systems as : R, (&y) = s[U- B,(x)).D,(Y)] (2.58)

Therefore, for a fuzzy input A . the fuzzy output is :

At the computationai level. the membership function of the fuzzy output is :

If the input is crisp then ~'(x)is a fuzzy singleton (equation 2.50). then : REASONlNG IN FUZZY MODELING 37

If we choose duai t-norm and t-conorm operators. by using De iMorgan laws. we can derive an alternative form for logicai reasoning : FL(y)= l-s[~[~,(x*).(l- ~,(y))]~[~?(x').(l- D~(Y))]..-.T[B,!X').(~-D~(~))]]

For MIS0 system we have :

F,Q) =T[s[(L-sltxw )).D,(~)]s[(I or.

FL(y) = 1 - ~[~[r,(x*?.D,(~)l~[r~c where. r, is the degree of firing of the ith rule.

Equation 7.65 is similar to equation 2.36 for .Mamdaniqs reasoning. In othrr words. it is concluded that in the logical approach. we cm implement the sarne reasoning mechanisrn as &Mandani's approach with the modification that the consequents of each mle is considered as the complement of the original mle set with the final resuit being cornplemented. This similarity of the reasoning mechanism in both approaches provides a convenient ground for comparing the theoretical features of each approach. As we cm observe. a kind of complementation related behavior exists between .Marndani's and logicai approaches for the singleton input case. in the logical method. we consider the complement of the consequents and then we complement the entire function to get the result. when the input is cnsp. However. the final output is totally different for the two methods (Turksen. 1991). as we will see in example 2.1. There is another advantage for representing the logical method by equation 1.65 which will become clear in the foIlowing section. 2.5.3 Unified Parameterized Fuuy Reasoning Method

Yager (Yager. 1992) analyzed the advantages and disadvantages of both approaches of mle aggregation without any conclusion about the supenority of either of them. He also considered the situation where the output of the two methods is combined to give a new individual output as:

We adopt this approach for constructing the parameterized frarne for reasoning process. However. it should be mentioned that for the case of crisp input (which is mostly the case in fuzzy modeling and control). we introduced a unified reasoning mechanism for both Mamdani's and logical approaches (equations 3.65 and 2.56); so. we are not concemed with the problem of aggregating the inferred output fuzzy set by such an operator that would be a compromise between the aggregating operators used in two methods. In other words in the proposed unified fuzzy reasoning method, reasoning operators are exactly the same. This is the second advantage of representing the logical reasoning as equation 2.65. As a result. the proposed parameterized reasoning method is presented as : CHAPTER REASONING IN FUZZY MODELING 39

Example 2.1

Consider the fuzzy model of a nonlinear system with three input variables x,. +r and g and one output y as presented in Figure 2.4.

For a set of input values x={ 1.25. 3.0.4.2). Figure 2.5 illustrates different fuzzy output results due to different values of reasoning parameters: p (the parameter of t-nom and t- conorm operators for rule implication and mle aggregation. T and S). q (the parameter of t-nom operator for rule antecedent connection. T'). and p (the combination parameter of two inference approaches). As it is obvious from the figure. the fuzzy output has a significant variation with respect to various combinations of reasoning parameters: a rnatter which should be seriously considered in fuzzy modeling and control.

Figure 2.4 :Tltefrizzz model of a nonlinear -lem Figure 2.5 : F~cqotitplir of the nonlinear qstern for input ser [I 25. 3.0. 4-21 CHAPTER REASONING IN FUZZY MODELING 41

2.6 DEFUZZlFlCATlON OF THE OUTPUT

The final step of the reasoning process is selecting a crisp value y' based on the output

fuzzy set E(y). Two commonlvJ used defuzzification methods are the Center Of Area (COA), and Mean Of Maxima (MOM) (Lee, 1990). In the COA method. one calculates the output of the defuzzifier y;

where, the real interval Y=[yo,yl] is the universe of discourse of the output.

In the MOM method, the defuzzified output is calculated as :

where, G is the set of elements in Y which attain the maximum value of E(y) and p is the cardinaiity of G .

An effort for making a generalized defuzzification method is the method of Heights (Mizurnoto, 1989) in which the intervals of the universe rhat correspond to membership

2orades lower than a certain given level a are completely discounted and the defuzzification value is caiculated by the application of the COA in the interval of Y that has membership grade not less than a :

where, al1 elements in Y'=[y'o,y'lJ have membership grades more than a .

In this method, the case a=O implies the COA method and a=Max[E(y)j implies the yeY MOM method. CHAPTER REASONING IN FUZZY MODELING

As a better attempt of generalization, Yager and Filev (Yager. 1994) suggest a general defuzzification method, based on the probabilistic nature of the selection process arnong the values of a fuuy set, called the Basic Defuuification Distribution (BADD) method :

As we can see, the BADD method is essentiaily a family of defuzzification methods parameterized by parameter a. For a=l. the BADD method implies the COA dehzzification method. and for a + m. it irnplies the MOLMdehzzification method. For a=O. the BADD defuzzification method coincides with the arithmetic mean of the universai set Y. By varying a continuousiy in the real interval. it is possible ro have more appropriate mappings from the fuzzy set to the crisp value dependinz on the system behavior.

Example 2.2

Following the fuzzy inference process for the nonlinear system of Example 2.1. we desire to have the defuzzified values of y for input variables x={ 1.15. 3.0. 4.1) with respect to different values of p. q. a. and P. Figure 2.6 represents the results. It is obvious from the figure that for one input set. a wide range of crisp output values cm be derived from the fuzzy model of the nonlinear system due to different values of reasoning and defuzzification parameters. By adjusting these parameters in the unified parametenzed formulation. we are able to modify the fuzzy model performance in order to obtain a behavior closer to the reai system. CHAPTER REASONMG IN FUaY MODELING

Figure 2.6 : Defir~ifiedoutprit of the rionlinear qstemfor Urpilt set [1.25. 3.0. 4.21 2.7 A SlMPLlFlED PARAMETERIZED REASONING FORMULATION

In the previous sections. we developed a general parameterized frame for the reasoning process in hzzy modeling and control. It was shown that we cm obtain an analyticai relation between input and output variables. using pararneterized triangular functions. when fast aigorithrns for cdculating trianplar aperators are used. Furthemore. it was shown that the computation effort is low enough for most applications. We now propose a simpler formulation for the reasoning process in fuuy modeling and control. The following simplification is based on Schweizer and Sklar's operators. equation 2-14

We start frorn the r-conorm parameterized formulation and derive the first term of its Tailor expansion around the middle point of the domain [O.l] x [O.L]x.. .x[O.ll. Le.. . .Y n rrms

We rewrite some of the rems in equation 3.72 as follows:

1 n! / P J, = S(O.5.0.5 ,...0.5) = -1?n 2. (-l)'-' i!(n - i)!

(n - II! (-7),n-I-j,pj[=(-l)j-L n ! (z)in-j!p j!(n - 1 - J)! j!(n - J)! tO 5.0.5..... 0 5)

where. Hn =Jn-?K, n . CHAPTER REASONING IN FU- MODELlNG 45

instead of expanding the parameterized t-nom hnction. it is more convenient to obtain the approximate fom by using De Morgan laws. One cmvenQ that the result is the sme as what is obtained by direct derivation of Tailor expansion about the middle point for t-nom function :

where. Ln =1-Jn -7K,.-n

From equations 1.75 and 2.76. the only difference between simplified t-nom and t- conom functions is due to H, and Ln which are functions of parameter p.

In this approximation. al1 the family of parameterized trimgular functions is approxirnated by lines with different slopes and constant values. It is wonh noting that by choosing parameter p. H, and Ln are computed once. and are constant during the reasoning process. Thus. the calcularion of approximate triangular norms for n arguments sirnply needs n addition and one multiplication operations.

The linearized form of Schweizer and Sklar triangular functions lets us have a simpler analytical relation between input and output. while we still keep the tlexibility of changing the nature of the reasoning by changing parameter p. From squations 2.67. 7.75. and 2.76. we derive:

where. CHAPTER REASONING /N FUfZY MODELING 46

From the above formulation. it is possible to compute the defuzzification step faster.

Since E(y) is a surnmation of Di and the input effect as T,(x' ) appears as an addition tenn in Q, the MOM method wouid be rneaningless for this form of fuzzy output. Therefore, we are restricted to choose the Center of Area method as the defuzzification method :

where, y: is the center of area of consequent of the irh rule Di and A, is the area under the curve Di . For a trapezoidal membership function shown in Figure 2.7. the centroid and the surface area can be simply calculated as :

Figure 2.7 : Trapezoidal membership fiinction y,=Min[y,], and y,=Max[~,I, i=l.n t=l.n

From equation 2.79. for each input set x' = [x,. x:.. ...x,]. the d efuzzified output cm be immediately calculated by obtaing the centroid and areas of the individual consequent hzzy sets Di's and parameters P and Q.

EXAMPLE 2.3

We retum to the fuzzy model of the nonlinear system in Example 2.1. Figure 7.8 represents exact and approximate values of the defuzzified output for different values of reasoning parameters p. q. and p. As we can see. the approximate values have the relative error of about 1% at rnost. which is a reasonable approximation.

A zood evduation of the proposed simplified formuiation is to compare it with Yager's (Yager. 1994). and Sugeno's (Sugeno. 1993) simplified reasoning formulations. Both simplified functions are based on Mandani's reasoning approach. and the approximated crisp output is cdcuiated as :

In order to make the results comparable. we calculate the pararnetenzed reasoning function. for p = 0.000 1 and q = 0.0001. to compare the results with Yager's formulation in Figure 2.9: and choose p = 0.0001 and q = 1. to compare the result with Sugeno's formulation in Figure 2.10. For a specific system and input. it is observed that the proposed simplification is better rhan Yager's hinction and close to Sugeno's fùnction. Unlike Yager's and Sugeno's simplified reasoning fomulations. which are heunstic in nature. the proposed simplified approach is based on mathematical analysis. This makes it more reliable to generdize die specific results. Besides. the pararneterized fom of the proposed simplified function mdces the reasoning process continuously vary among different selections of p. q. and B.

Figure 2.9 : Yager's (7; ) arrd proposed siinpiifiedfiri~crim(y' )fi~rE.wnpie 2.1

Figure 2.10 :S~igeno 's (y; )and proposed simplifiedfrincrion (7' )for Example 2.1 CHAPTER REASONING IN FUZZY MODELING 50

2.8 CONCLUSION

In this chapter. Our goal was to construct a general and unified frarnework for the reasoning process in fuzzy modeling. We staned from the basic elements of reasoning, the connective operators (AND, ALSO. and IF-THEN), and adopted a special pararneterized family of triangular functions which, due to its sirnplicity and syrnrnetry. is appropriate for our purpose. By extending the binary operation to n-aiy operation. and by proving the validity of De Morgan laws for n-ary operation. we were able to parametenze the reasoning formulation for multi-input single-output systems. Focusing on systems with crisp input. which is the case in most applications of fuzzy modeling and control. and by proving the property of distnbutivity for viangular hnctions in this case. it was shown that the two methods of inference from a rule set. First-Aggreegate-Then-hfer (FATT) and Fint-Infer-Then-Aggregate (FiTA). always give the same fuzzy output. .Moreover. we presented a unified reasoning mechanisrn for .Mamdani's approximation and formai Iogicai reasoning approaches that leads to n unified panmeterized fuzzy reasoning method.

As a result. four reasoning parameters p. q. a. and p. were introduced whose variation will cause a continuous range of variation for the reasoning mechanism. Therefore. we are no longer restricted to the extremes in any one of the steps of reasoning process. The inference parameters are optimized based on input-output data as we will discuss in Chapter 4.

In order to reduce the computational effon. a fast algorithm for the calcuiation of the parameterized family of triangular functions was introduced. In addition. by making an approximation for this family of functions. the simplified pararneterized reasoning formulation was developed in which the defuzzified output can be immediately calculated from the indivuduai consequent hzzy sets of the rule set. The validity of this simplified formulation was demonstrated by comparing it with Yager's and Sugeno's simplified reasoning functions. FUZZY CLUSTERING IN FUZZY MODELING RULE GENERATION

3.1 INTRODUCTION

In the heuristic approach to fuzq modeling. it is assurned that expert information is available. This information inchdes the definition of the rule antecedent and consequent partitions. Seeking more objectivity in constructing fuuy models. sorne researchers have tried to develop more formai techniques that can use available data to augment human knowledge, or even generate new knowledge (e.x.. Yager. 1994. This approach to the development of hzzy rnodels. inspired by classic systems theory. is based on the use of input-output data. In the language of systems theory. this approach can be regarded as the process of system identification.

The most critical step of fuzzy system identification is hizzy rule generation. a process that humans are able to manap. but as of yet. Our understanding is not enough to effciently copy it. An intuitive approach to objective rule generation is based upon clustering of the input-output data, which has been recently suggested by severai researchers. Two main directions for this approach can be considered. In the first approach. the enrire data space, input and output. is partitioned. Therefore. clustering is performed in multi-dimensional input-output space. Nakamon and Ryoke (Nakamori. 1994) propose a hyperellipsoidal clustering technique which has an assistance role for modelers in finding fuzzy partitions suitable for building a fuzzy model. In this method. CHAPTER FUZZY CLUSTERING 1N FUZZY MODELlNG 52

having appropriate intuition about the system is a basic requirement for certain steps of rule generation through Fuuy clustering; for instance. thoughtful consideration of human interaction is required in this technique to select variables to be used for the clustering. Barone et al. (Barone, 1993) introduce a simple clustenng method cdled muuntain clristering which is a grid-based process for identifying the approximate locations of cluster centers in data sets with clustering tendencies. Again. the whole input-output space is considered. and the first step is to discretize the space into grids. in order to tum the continuous optimization problem of finding the cluster centers into a finite one. Finer gnds increase the number of potentid cluster centers but also increase the required calculation. This technique should be complemented by a learning technique to adjust the fuzzy partitions.

The major drawback of considering the whole input-output space for clustering is that. in rnost of the clustering algorithms. efficiency degrades as the dimension of the clustenng space increases, while the complexity of the algorithm grows npidly. In real systems. there are usually a considerable number of input variables. Thus. for fuzzy modeling. it becomes necessary to have a clustenng methodology which is independent of the number of input variables. For this purpose. Sugeno and Yasukawa (Sugeno. 1993) suggest that in fuzzy modeling we first partition the output space. and then obtain the input space clusters by "projecring" the output space partition onto each input variable. separately. By this method. as discussed in Chapter 1 (Section 1X). since we deal with multi-input "single-output" systems. we cm always perform the clustenng in single- dimensional output space. Simplicity and applicability. especiaily for systems with a large number of input variables. are the main advantages of this method.

In order to caqout the process of encoding the output space. we consider one of the rnost applicable and uaceable fuuy clustering algorithms. i.e.. Fuzzy C-iMeans (FCM) clustenng. In section 3.3. after introducing a brief background in section 3.2. the FCM algorithm is reviewed. Then. we address three major difficulties encountered during fuzq clustering of real data. In sequential sections of this chapter, 3.4. 3.5. and 3.6. we introduce some efficient solutions for the related clustering problems €rom the fwy modeling point of view. In Section 3.7. we address another important issue in the fuzzy data encoding process which has mosùy rernained unattained in the literature. i.e.. the classification process in formation of membenhip functions from the fuzzy clusters. A reasonable methodology is suggested for this process. In each section. we illustrate some exarnples from current literature to show the effectiveness of the suggested solutions. Concluding remarks are made in section 3.8

3.2 A BRlEF BACKGROUND

Clustering is defined as partitioning a collection of unlabeled data into a number of Croups or clusters such that data that are more sirnilar to each other are put into one cluster. and data that are less similar are put into different clusters. .Man- algorithrns for both hard and hzy clustenng have been developed to accomplish this task. Hard clustering algorithms (Duda. 1973) assign each data point to one and oniy one of the partitions. with a degree of membership equal to one. assuminp well-defined boundaries between the clusters. In real-life situations, however. the boundaries between the clusters are not clearly definabble. and a less restrictive description of an object's affinity to a. specific cluster is required. Therefore. the fuzzy environment of decision-making would be an appropriate tool to tackle the clustering probiem. Ruspini (Ruspini. 1969) was the first to suggest the structure of fuzzy c-partition spaces. The problern of finding the optimal fuzzy clustering of data points was formulated by Dunn (Dunn. 1971) as that of minimizing a function subject to conditions on membership hnctions. Bezdek (Bezdek. 1973) developed a farnily of generaiized clustering algorithms called Fuzzy C-Means (FCM) based on the fuzzy equivalent of the nearest mean hard clustenng algorithm (Duda, 1973). and proved the convergence of the FCM algotithms to local minima (Bezdek. 1980). Performance of many existing clustering algorithms are snidied in

(Backer. 198 1), among those. the FCM algorithm is the most popular. CFWPIER FUZZY CLUSTER!NG IN FUZZY MODELlAfG 54

3.3 FUZZY C-MEANS CLUSTERING ALGORITHM

As was mentioned, clustering is carried out with unlabeled data X=( xl .x2,.. . .x. ) c$ . where N is the number of data vectors and A is the dimension of each data vector. Clustering. in particular, is the assignment of a number of partition labels. usually known as c to the data vectors in X. Thus, c-partition of X are sets of (c.N) membership values {uir}that cm be conveniently displayed as a (cxN)matrix U=[uik]. The problem of fuzzy clustering is to find the optimum membership matrix U. The most wideiy used objective hnction for hizzy clustering in X is the weighted within groups sum of squared errors objective hnction J, which is used to define the constrained optimization problem

(Bezdek, 198 1 ):

N c min J,(u,v;x)=CC(u,k)mllxk -vlII; 1U.V I { k=l r=i 1 where,

V=(vl,v,. . . ,v,} is vector of (unknown) cluster centers (prototypes). and llxll = is any inner product nom. ~MatrixA is a hxh positive definite matrix which specifies the shape of the clusters, and is usually selected to be as the identity matrix. This leads to the definition of Euclidean distance, and consequently to sphencai clusrers. The case with ellipsoidal clusters has been considered by Gustafson and Kessel (Gustafson. 1979).

Fuuy partitions are carried out by the Fuuy c-means algorithm through an iterative optimization of 3.1 according to the steps shown in Figure 3.1 (Pal, 1995). CHAITER FUZZY CLUSTERING IN FUZZY MODELINO

STEP 1 :CHOOSE

(i) number of clusters c; (ii) weighting exponent m>k

(iii) iteration lirnit iter; (iv) termination criterion E > 0:

(v) nom de finition for /lx, - V, 11 in 3.1 : (vi) nom for error= llvt - V, -, II .

STEP 2 : GUESS

cn initial position of cluster ceniers Vo = (~1.0. Vz.0 ,.... v,.-J c R .

STEP 3 : ITERATE

FOR t = 1 to iter :

rn-l CALCULATE q,.,=

k=l

IF or= v - v 1 I E . THEN stop. and put ( Urid. Vfiml)= ( Ut. VI)

iÿEXT t

- - -- Figure 3.1 : The aigorlthrn offi:? c-means chisrering

Conditions 3.3 and 3.4 are first order necessary conditions for local extrema of Jm (Bezdek, 198 1). Therefore. the FCM aigorithm always converges to strict local extremum of J, starting from an initial guess of Vo, but different choices of initial Vo might lead to different local extrema. It is also worth noting that in the above aigorithm. iteration starts from the initial set of prototypes Vo rather than initial membership matrix Uo, which is the case in the standard FCM algorithm. [n consideration of speed and mernory requirements and stringency in termination condition. this algorithm. called nlternnting optimization (Pal. 1995). is more efficient. Moreover. this algorithm gives us an CHAPTER FU= CLUSTERING IN FUZZY MUDELlNG 56

oppominity to use some hard clustenng algorithms to estimate the initial locations of fuzzy cluster centers. This will be discussed in Section 3.6 .

There are three major difficulties encountered during fuzzy clustering of real data:

It is not always possible to assign the number of clusten c a priori. It is required to obtain a cluster validity critenon in order to determine the optimal number of clusters presented in the data.

No theoreticai bais for an optimal choice of weighting exponent rn has emeqed to date.

Since the FCM algorithm always converges to strict local extrema. the initial guess for the location of cluster centers Vo is cntical for obtaining an optimal partition. This knowledge is not necessarily available n priori.

in the following sections. we consider the above difficulties and suggest practical solutions from the fuzzy modeling point of view.

3.4 CLUSTER VALlDlTY : SPEClFlCATlON OF THE NUMBER OF CLUSTERS

As a prerequisite for FCM algorithrns, it is necessary to assign the number of underlying partitions that appear in the data set. In many practical cases. there is no a priori information, or there is conflicting evidence about the optimal number of clusters in the data structure. In those situations. there should be a performance measure to evaluate the validity of partition structure in measures of separation among clusters and cohesion within clusters. In other words, the main cnteria for the specification of "optimal cll

a) separation between the resulting clusters: b) cornpactness of the clusters.

The first fuzzy clustering validity hnctions. suggested by Bezdek (Bezdek. 1974)). are partition coefficient s,, and partition entropy s,, of any U in Mfc, :

where. in 3.6. a€([.-) is the logarithmic base. The two indices essentially measure the distance U from king crisp. Solvinp mFx{nOx{s, }} or min{nn{s, }} (c=X... ..Y- 1 i is supposed to produce optimum clustering of the data set X; where. Q, denotes the optimality candidates at a fixed c. Both indices have rnonotonicdly decreasing tcndency with c. The nomalization of these indices based on non-statistical (Dunn. 1976) and statisticai (Bezdek. 1980) criteria helps to reduce their monotonic behavior. The main disadvantape of the cluster validity indices s,, and sp, is due to their behavior as functions of the weighting exponent m. Usudly for values of rn less than 2. which generate more crisp partitions. good results are obtained by using s,, and s,,. but for large values of tri both indices wiil select c=2 as the optimum number of clusters. because of their Iimit behavior with respect to ni (Pal. 1995). Funhermore. neither of them has any physical rneaning or direct connection to geometrical property of a data set.

Several other criteria can be found in the literature as a measure of the arnount of fuzziness. such as uniform data functional (Windham. 1983). information ratio (Windham, 1989), nonfuzziness index (Libert, 1983). and proportion exponent (Windham, 1981), which suffer from the sarne drawbacks as s,, and s,,. Gunderson's separation coefficient (Gunderson. 1978) is the first validity index which takes into account geometrical properties. Using the same idea but applying directly to fuzzy clustenng, Xie and Beni (Xie, 199 1) introduce a compact and separate fuzzy validity CHAPTER FUaY CLUSTERING IN FU2ïY MODELING 58

critenon. which is an explicit function of m and (U,V) and therefore might be unreliable for srna11 or large values of m. They do not offer any guide for the appropriate value of rn for the data at hand, as it is demonstrated in (Pal, 1995).

III this section. we perform a proper generalization of scattering cnteria that are mainly applied as suitable tools for expressing the cornpactness and separation between the hard clusters (Duda. 1973). Let X={xl ,xz,. ..,x~}=XiuXZu.. .uXC be any hard c-partition of X. i.e., Xid. i=1,2 ,.... c; Xi's are proper subsets of X. then : the mean vector for the ifhhard cluster is :

where. N, is the number of data in cluster i. The total rnean vector is defined 3s :

The scatter rnatrix for the i'h cluster. which shows the diversity of data in the i'h cluster around the mean vector vh, is :

the total within cluster scatter rnatrix is :

The index Swh cân be an expressive index for the compactness of hard clusters. There is another critenon representing the separation between the hard clusters cailed between- cluster scatter matrix which is defined as: It can be easily shown that the surnmation of the above two scatter matrices (equations 3.10 and 3.1 1). called total scatter matrix, does not depend on the partition structure but only on X done:

in order to extend the above concepts to fuuy clusten. fint we should note that the number of data in each cluster. which is Niin hard partition. is not so clear in fuvy partition. Rather. the sum of the membership grade of al1 data to each cluster. cm be a good presentation of the amount of data contributed in that cluster. Therefore. rather than

N using Ni. for fuzzy partition. we use 1(u,,)~ for the ithcluster. Notice that in case of k=l hard clusters. in which the membership grade for each data point is either one or zero. this terni will reduce to the nurnber of data belong ro the ithcluster. N,. Furthemore. in fuzzy clustering, the surnmation sign must be on al1 data considered in a particular cluster X,

together with their grade of membership in that cluster. i.e.. (U !,)" x, . instead of k=I summation on only those data that belong to each cluster. x, . because belonging in a fuzzy cher-isspeciiied clustering. this reduces to

In this manner. the generalized fuzzy mean vector will coincide with the definirion of fuzzy cluster centers (equation 3.4):

It should be recalled that rn is the weighting exponent.

Consequently. the fuzzy total mean vector is defined as a generalization of its correspondence for hard partition : While V, is an index of data concentration regardless of how they are partitioned. the fuzzy total mean vector 'G is a weighted mean of data considering their belon,Uness to each of the clusters in fuzzy partition. and is no longer invariant in a data set. but depends on the way they are partitioned.

The extension of the scatter matrices for fuzzy clustering would be readily introduced as follows : fuzzy within-cluster scatter rnatrix :

fuzzy between-clusrer scatter mauix :

fuzzy total scatter matrix :

Similar to hard partition. with a srnall exercise. it cm be shown that :

However, in this case, ST does depend on the way the data are clustered (uljWs).and is not constant for a set of data.

As was rnentioned. SM and SBh (equations 3.10 and 3.1 1) are suitable indices for presenting the compactness of hard ciusters and separation between thern. respectively. We suppose that their extensions also have the sarne applicability. In fact. tr(Sw) is the fuzzy clustenng objective function J, (equation 3.1). Hence. in an attempt to derive the best clusters. we minirnize tr(Sw) to increase the compactness of fuzzy clusters and CHAPTER FUZZY CLUSTERING IN FUZZY MOOELING 61

maxirnize tr(Ss) to increase the separation between hzzy clusters. In other words. we rninirnize :

The index s,, is similar to Fukuyama-Sugeno's cluster validity critenon (Fukuyama. 1989) which is stated as:

However. it should be noted that there is a fundamental difference between the Fukuyama-Sugeno index (equation 3.20) and Our proposed index (equation 3.19). In st-, (equation 3.20). the total mean vector 8, is applied for measuring the separation of clusters. In order to have a consistent generalization of hard partition scatter critena. we use the fuzq extension of the total mean vector F as a reference of fuzzy cluster separation. The change in the result is smail if small values of nt are chosen. and it becomes signifiant as m increases. In every case. because of the theoretical consistency. s, is more reliable.

Another motivation for using the complete extension of scatter matrices for fuzzy cluster validity is to constmct the fuzzy total scatter matrix ST as the sum of fuzzy within- cluster and between-cluster scatter matrices (equation 3.18). This provides a useful guide for selecting an appropriate value of weighting exponent in. which is the subject of the next section. CHAPTER FUZZY CLUSTERING IN FUZZY MODELING 62

3.5 SELECTION OF WElGHTlNG EXPONENT (m) IN FUZZY CLUSTERING

Another parameter whose value should be decided in fuzzy clustering is weighting exponent rn in equations 3.3 and 3.4. In general, weighting exponent controls the extent of mernbership sharing between fuzzy clusters in the data set. Therefore, in the range of

( 1 ,=), the larger m is, the ''j?friierei'are the membership assignments to each data point. As nt approaches infinity. data are distributed uniformly throughout c fuzzy clusren by a membership grade of llc. Conversely, as m 4 1 . fuzzy c-means clusters become hard. This parameter must be selected in advance to the FCM algonthrn. and no theoretical basis for an optimal choice of rn has been suggested. yet. Pal and Bezdek (Pal. 1995) suggest the interval [1.5.2.5] for rn whose mean and midpoint nt=2 is the most frequently used choice for many researchers.

h this section. we introduce a guideline for selection of m. considering the cluster validity cntenon s,, derived in the previous section. Let us examine the limit behavior of s,, as m approaches its extremes, one and infinity. First. knowing that (Bezdek. 1973):

limit [u,, ] = -1 m+- C'

limit v, = v ,, in-1 - limit vi = v, m-c- we conclude : C

limit V = m+- CHAPTER FU- CLUSTERING IN FU22Y MODELING 63

Since the fuzzy total mean vector approaches to its hard correspondence V, at both limits, one and infinity, the limit behavior of sa is exactly the same as Fukuyama- Sugeno's cnterion :

limit s,, (U,V; X) = limit tr(~,) - limit &(SB) rn-1 m-i rn-1

limit si, (U, V; X) = limit U(S, ) - limit U(S, ) m-r- m-r- m--

At limit cases. sf, (and sr,) has poor reliability to specify the optimum number of clusters. Since tr(STh) IS fixed in each data set. as m 1. sa behaves very much like tr(Sw). which. by itself. is not necessarily a good index as a validity functional. At the other end. as m + m. s, becomes too srna11 to be able to validate the fuzzy partition. Therefore. a wise straregy of choosing m to guarantee the validity of s,, for specifying the optimum number of clusters would be to pick it up far enough from its both extremes. Le.. somewhere in the middle of its domain. In order to specify this condition. first we should clearly speciw the limits: the iimit "one" is definitely clear. but what is "injhi~" for m? This mainly depends on the data at hand. and the question is : "is there an. index showing when rn is about to becorne large?". The answer. in Our strategy is "yes". In fact the key is the fuzzy total scatter matrix ST. Let us consider the limit behavior of tr(S~)as â function of m. By using 3.17. 3.18. and 3.21 through 3.26. we have :

Iimit u(s,) = ümit w(s,)+ limit tr(S,) m41 ma1 rn-1 =Sm +SB, =Sn

limit U(S, ) = limit V(S, ) + limit tr(~,) m-m m+- m4- =o+o=o CHAPTER FUZZY CLUSTERlNG IN FUZZY MODELING 64

In fact, tr(ST) decreases monotonically with rn on optimal pairs of (U,v). In order to show this, noting that U. v, and hence. V are not dependent on rn at optimal solution. we differentiate tr(ST)with respect to m. For m > 1 :

For O < Uik < 1, we have:

and tr(ST) is strictly monotone decreasing function (evaluated at optimal pairs of (U.V)) of m on the interval (1,m). In conclusion, as rn varies from one CO infinity, tr(S~) monotonically decreases from tr(STh)to zero. Consequently. an appropriate value for m is what holds tr(ST) somewhere in the middle of its domain (tr(STh) . O). reminding that tr(STh)is a constant value depending only on the data set.

There is another restriction for >n from the fuzzy modeling point of view. As mentioned earlier. as ln becomes Iarger, the membership assignment becomes "fuzzier". such that, for large values of ni, ail membership grades tend to become Uc. [n fuzzy modeling, Our desire is to have fuzzy clusters specific enough to have at least one data point with membership grade equai or close to one. Let nt,, be the maximum value of m which satisfies this condition for al1 partitions solved by FCM algorithm. Now. if the value of in, selected such that tr(ST) lies somewhere in the middle of its domain, is less than mm, we can trust our cluster validity by s,, and that ni would be Our choice for the FCM algorithm. Othenvise, mm, should be selecteci for FCM algorithm. Since tr(Sr, is a function of number of clusten c as well as rn, the process of choosing ln and c should be performed iteratively, starting from choosing an initial m. then deriving s,, for several CHAPTER FUZZY CLUSTERING IN FUZZY MODELING

nurnbers of clusters. getting the optimum c. and finally checkmg if for this c and m. u(ST) is satisfactorily far from its limits; otherwise, the process should be repeated by a new m.

EXAMPLE 3.1

As a practical example. we use Normal4 data set. which is a sarnple of N=800 points consisting of 200 points each from the four components of a mixture of ~4.M-variate nomals. with the population mean of p = 3e and covariance rnatrix of Z=L for each component. Pal and Bezdek (Pal, 1995) implement this data set to inspect the reliability of some cluster validity indices. In Figure 3.2, hiuy total scatter matrix is plotted as a function of rn for different numbers of clusters. It is observed that the reliable domain for

VI (values of m which make tr(Sr) be in the rniddle of its range) is [l.j . 2.51 for c=I-IO.

For c=2, the appropriate choice would be m=2. FigureLi 3.3 shows the behavior of cluster validity index s,, as a function of c, out of the reliable domain for two values of m. Le.. rn=3.0 and m= 1.2. From Figure 3.3. It is observed that would be the optimum number of ciusters for rn=2.

1 2 3 4 5 6 7 WElGHTlNG EXPONENT (m)

Figure 3.2 : Trace offriu.~total scatter rnatrl~as afrtnction of nz for Normal4 data set NUMBER OF CLUSTERS (c)

Figure 3.3 : CIrrster validic index s,, as a jimctinn of c jor ~Vormal-4dam set

ln (Sugeno. 1993). Sugeno and Yasukawa introduce a nonlinear static system with two input variables x, and .Y: . and a single output - as follows:

50 input-output data are availabie. and the output data are to be clustered by FCM algorithm. For the same data, the trace of the fuzzy total scatter matrix is shown in Figure 3.4 for different number of clusters as rn varies. In order to choose initial Vo of the FCM aigorithm. a number of random searches should be perfomed to obtain the optimum for each c (this will be discussed in the next section). For this case, the reliable zone is rnc [2.7 . 3.61. Figure 3.5 presents s, as a fùnction of c for three different values of m. For m=3, the optimum number of clusters is cIearly c=7.

3.6 INITIAL GUESS AND LOCAL OPTlMALlTY IN FCM ALGORITHMS

The third problem in FCM algorithms &ses from the fact that these algorithms may produce only local minima or partial optima points. Therefore. a different initiai guess for rnean vectors vi may conclude different optimum results. It should also be mentioned that "convergent' algorithms do not necessady stop at local minima. i.e.. they may stop at saddle points or local maximizers. as well (Isrnail, 199 1 ). This fact affects cluster vdidity as well as cluster andysis. In order ro show how serious this problem could be. let us consider the following example.

EXAMPLE 3.3

Returning to Exarnple 3.2. in order to assign the optimum nurnber of clusters. using the Fukuyama-Sugno criterion. Sugeno and Yasukawa obtained curve #1 shown by the solid line in Figure 3.6. They conclude that the best number of clusters is c=6. By using the same data. and the same criterion. and the same power exponent m=2 (although it was shown in the previous section that for this data set. m=7 is out of the reliable domain). but with different initial values of Vo, we obtain a different optimum number of clusters as shown by curve #î in Figure 3.6. i-e.. c=8. In fact. by trying several random initial guesses and choosing one which minimizes the Fukuyama-Sugeno index. we will have curve #3 in Figure 3.6 which is quite different from curve #1.

Two solutions have been suggested for this problem. so far. One is to select the initial prototypes by using some knowledge about the data (Pal. 1995). which is context- dependent, and is not always possible. The second is the repeated use of the FCM algorithm for different randornly chosen initial prototypes. and then selecting the best arnong the generated solutions (Kamel, 1994). Ths method is time-consuming and even after a long search. it is not guaranteed that the best solution is achieved. because there is no guideline for selecting initial mean vecton in this method. CIUPTER FUZZY CLUSTERING IN FU= MODELING

i cuve # 1 : one random Vo L 1 r----: 1- 1 curve #2 : different randorn Vo

NUMBEI? OF CLUSTER (c)

Figure 3.6 : The F~lkrqarna-Srrgenoindex for rhe data of E-rarnple 3.2 rrsith differertr V,] !rn=2)

In order to efficientiy obtain a preference for initial locations of ciuster prototypes. we implement an Agglomerative Hierarchical Clustering (AHC) algorithm t Duda. 1973) as an introductory procedure to find proper suggestion for the initial locations of cluster prototypes for the FCM aigorithm. The AHC al=orithm places each of the N aata vectors in individual clusters. Then. by defming a dissimilarity matrix (depending on the method). it starts to merge two or more of the trivial clusters. getting the second level of data partition. The process is repeated to form a sequence of nested clustering in whch the number of clusters decreases as the sequence progresses until the required number of clusters c are obtained.

The specific method used in this research is Ward's method (Ward. 1963). Having unlabeled object data X={xl. x:.. . ..xx J, the basic algorithm for this method is show in Figure 3.7. STEP 1 :CHOOSE

number of clusters c; the mauix of dissimilarities D=[dij] as the following Euclidean-based distance:

where, Vhi and vh, are mean vectors of hard clusten Xi and X,, respectively.

STEP 2 : LOOP

FOR t=Ntoc ; andXi.,=xi. i=1 .2....fl

FIND the pair of distinct clusters which have the minimum dij,say X,., and Xj.1:

MERGE X,., and X,., :

DELETE X,.,;

iWXT t

------Figure 3.7 : The A HC algorirhrn for assigning the inirinl cluster cenrers

The result of the above process is c hard clusten for the data. which would be a good start for fuzzy clustering procedure. By this method. we have a preference to choose the initial prototypes without any knowledge about the data n priori: and it is more efficient than random search arnong different initial gesses.

This strategy has an effect on Our cluster validity criterion s,. By choosing the hard clusters that corne out of the agglomerative hierarchicai clustering as the initial guess. SC, has a monotonic decreasing tendency for large values of c. Therefore. for cluster validity. it is recornrnended that one should plot s,(U,V;X) as a function of c. and then select the starting point of the decreasing epoch as the maximum c (c,). Then the optimum value of c is obtained by minimizing s, over c-2,3,.. ..cm.

Figure 3.8 shows the cluster validity for data in Example 3.3 (m=3. as discussed in Section 3.5). Decreasing tendency after cmK=22 is observed and therefore. the optimum number of clusters between 2 and c,, is c=8. CRAPTER FUZZY CLUSTERING IN FUZZY MODELING

Figure 3.8 : Index s, for rhe data of Erampk 3.2 rr-irh AHC algorirhm for choosing VIlrn=31

3.7 FORMATION OF MEMBERSHIP FUNCTIONS

After assigning the appropriate fuzzy clusters for the output sample data. the next necessary step in fuzzy rnodeling is to fom the membership functions for the entire output space. One method is to directly estimate the mernbership grades uiJ derived from the fuzzy clustering by suitable trapezoids as it is implemented in (Sugeno. 1993). and to use the approximate trapezoidal functions as a classification for the entire output space.

If the number of sample data used for clustering is adequately large. and if the behavior of the system output is srnooth enough. we may be able to extend the partition obtained from the sample data to the entire space. However. in general. there should be a classification step between the two steps of formation of rnembenhip functions for the output space, Le., clustering step and approximation by trapezoidal functions. We should emphasize the difference between ''cllistering" and "clnssificrrrion". In clusterin_oprocess. we make suitable partitioning for data set XcK '.whereas in classification procedure. CHAPTER FUZZY CLUSTERING IN FUZZY MODELING

every data point in the entire space Rhis labeled. Therefore. the problem of rnembership function formation for the entire output space lies in the category of classification probierns. Since classifier design is usually perfonned by labeled data. clustering the sample output data is a good tooi to design the appropnate classifiers for the entire output space.

From the probabilistic point of view. in order $0 classifj the output space. without any assumption of knowing the and the state conditional densities of al1 classes. the k-Nearest Neighbor (k-NN) algorithm is a sub-optimal procedure. i.e.. its use will usually lead to a probability of error in classification decision making close to minimum possible error rate (Duda. 1973). Keller et al. Keller. 1985) introduce a fuzzy generaiization of k-NN classifying as the algorithm shown in Figure 3.9.

STEP 1 : DENSE X={xi.x2.. ...xx} c 2 * of labeled data set wirh membership grade U=[u,,] .

For any x of unknown classification.

STEP 2 : CHOOSE number of neiehbors k : 1 < k 5 N : nom for the disrance Ilx - x,il j= 1.2 .....3.

STEP 3 : FND

k-nearest neighbors to x among X= { XI .x,.. .. .xx } .

STEP 3 : LOOP FOR i=l toc CALCULATE the rnembership grade to x in class i as :

NEXT i

Figure 3.9 : The k-NNftr~? classrficarion algo rithm CHAPTER FU= CLUSTERING IN FUZZY MODELING 73

After partitioning the entire space. in order to obtain simple membership functions, we cm approximate the classified data by trapezoidal functions in a way that. for each fuzzy cluster, convex points are picked up and a trapezoid is fitted to them (Nakanishi. 1993).

EXAMPLE 3.4

We apply the above strategy to data of the nonlinear static system in Example 3.2. Figures 3.10 and 3.1 1 are output membership functions when the fuzzy clusters are directly approximated by trapezoids. and when the classification process has been performed in between. respectively. Al1 other parameters are identical for both cases (nz=3, c=8). The difference in the results is obvious.

I OUTPUT (y) Figure 3.10 :Mernbersliip frutctiotrs for the systern ortrprtt in Ecarnple 3.2 \r.itltortt classification

------Figure 3.11 :membership fiincrions for the ?stem oltrpur in Erample 3.2 witlz class~catiori 3.8 CONCLUSION

in this chapter, we discussed the rule generation phase of fuzzy modelinp. By using fuzzy c-means clustering algorithm, we assign the output clusters that are fuzzy sets of the consequent parts of hizzy mode1 niles. In other words, we speciQ the 'THEN" part of the fuzzy IF-THEN mies. In the following chapter, we focus on how to identify the input fuzzy sets, Le.. the "IF' parts of fuzzy niles.

Three major problems in fuzzy c-means clustenng algorithm were considered in this chapter. Le.. selecting number of clusters. weighting exponent. and initial location of fuzzy cluster centers.

An intuitive approach to choosing the optimum number of clusters is to make the fuzzy clusters (i) compact and (ii) far from each other. at the same tirne. We extended the idea of scatter matrices for hard clustering to fuzzy clustering. The result was a vdidity index which cm be considered as a modification of the Fukuyama-Supno cluster validity index. Like ozher indices. the validity of this index depends on suitable selection of weighting exponent m for each data set. Limit analysis and generalization of scatter cntena pave us an opportunity to introduce another index as fuzzy total scatter matrix to get an understanding of the variation of m in its domain: and to choose it to be far from its extremes in order to make sure that the cluster validity index correctly shows the optimum number of fuzzy clusters. In this regard. we developed a relation beween optimum number of clusters and power exponent for each data set to be partitioned. Exarnples show that the reliable zone for m depends on the data. Hence, dthough the domain of rn may be a part of the interval [1.5 , 3.51, each data set should be separately examined by the proposed strategy to select the suitable values of m and c.

Initial-value problem is another bottle-neck in the FCM algorithm which arises from the local optimality of the algorithm. In order to estimate the initial locations of ~UZZY cluster centers, using the altemating algorithm is essential. Choosing random points in the data as the initial prototypes is by no means reliabie; different results iri both cluster validity and cluster analysis are obtained by choosing different random points, as demonstrated in Exarnple 3.3. Implementation of a hierarchical hard clustenng method would be a good idea to estimate the initial Vo. This strategy is more efficient and reliable than a random search amocg different selections of initial prototypes. We used an agglomerative hierarchical algorithm for this purpose. This strategy has an effect on cluster vdidity index s, such that. for large values of m. the index has a monotonically decreasing tendency. The decreasing epoch usually starts at the number of clusters very far from the optimum c.

Finally. a relevant issue in fuzzy rnodeling through fuzzy clustenng was addressed. which is mostly ignored in the literature. In order to fom the membership functions for the system output. we proposed a classification process to extend the fuzzy partition to the entire output space. Exarnple 3.4 illustrated the effect of this process on the final output membership functions for a typical nonlinear system. THE FUZZY-LOGIC MODELING ALGORITHM

4.1 INTRODUCTION

Retuming to the flow chart of fuzzy modeling represented in Chapter 1 (Figure 1.4). and after investigating the reasoning mechanism in Chapter 2 and mie generation step in Chapter 3, in this chapter. Our focus is on the remaining steps of fuzzy modeling procedure, Le., input selection and membership assignment, identification of the optimum inference parameters, and membership function adjustment. Moreover, we summarize the proposed systematic fuzzy modeling methodology as an algorithm.

In section 4.2, we propose a novel approach to assigning the significant input variables arnong a finite set of candidates. This approach is not combinatonal, and rherefore requires no iteration. Based on this approach, in section 4.3, we introduce a new concept in the context of fuuy clustenng, '7ici3 line clustering" which helps us to assign the convex input mernbership functions.

Section 4.4 discusses the pararneter identification phase in two subsections: inference parameter identification (section 4.4.1), and rnembership parameter tuning (section 4.4.2). The final fuzzy modeling algorithm is presented in section 4.5. Two examples are illustrated in section 4.6, followed by conclusions in section 4.7. CHAPTER THE FUZZY-LOGE MODELING ALGORITHM

4.2 INPUT SELECTION IN FUZZY MODELING

4.2.1 Background

The phase of input selection in system identification is to find the most dominant input variables which affect the output arnong a finite number of input candidates. Theoretically, this problem belongs to a more general field of data analysis. i.e.. dimension reduction. In the anaiysis of multivariate data, it is common practice to look for the dimension reduction via linear combinations of the initial variables. Classical techniques, such as principal components (Duda. 1973,. discriminant analysis (Friedman. 1967), and canonical correlation (Jain, 1988). are exarnples of this approach. From a practical point of view, another type of dimension reduction is selecting a subset of the variables. The main advantage of this approach is that there is an actual reduction in the nurnber of measured variables. In this way. we can avoid the interpretationai difficulties which could aise in looking at linear combinations of very different kinds of variables. Although it is a common practice to check the weights of variables in a linear combination and to discard those that have "negligible" weights. this is not dways easy to do nor are negligible weights always guaranteed.

The problem of variable selection is also refened to as "feantre se le cri on^'. especially in some areas such as pattern recognition and information processing. Three major techniques are suggested for selecting a subset from an initial set of features. Le.. multiple regression (Draper. 1981), discriminant analysis (Seber. 1984). and ciuster analysis (Fowlkes, 1987). A good comparison of these techniques cm be found in (Fowlkes. 1987). Al1 the afore-mentioned methods are expressed in the context of statistical analysis. which, in most cases, benefits from the foxmal analytical background. However. in order io apply these techniques, many conditions such as normal distribution. adquate amount of data, independence, etc. shoulci be satisfied, which is rather crucial in red situations. There are some efforts to use informai techniques such as search method (Almuallim. 199 1), genetic algorithms (Vafaie. 1993), and techniques based on fuzzy sets CHAPTER THE FUZZYILOGIC MODELING ALGORITHM

(Pal, 1986) and possibility theory (Di. 1986). in the context of feature selection, in order to relieve the restricted formal conditions of statistical approach.

In the context of feature selection. there is no distinction between input and output variables of the investigated system. However, the specific problem of "input selection" can be considered taking this distinction into account. For instance. in the input selection problem, it is quite possible to consider the dependence of the output variabIe(s) to each input variable, separately. in this way. the complexity of the problem at hand would be reduced significantly. Following this more specific approach. in fuzzy rnodeling three basic ideas have been suggested for selecting significant input variables among al1 finite candidates. Sugeno and Yasukawa (Sugeno. 1993) propose a combinatorial approach in which al1 possible combinations of input candidates are considered. For each combination. they build two fuzzy models based on two separated sets of data. and calculate a performance index called i reg da ri^ crilerion" based on a rnethod of analyzing two groups of data in an attempt to cause data independence in model formation (niara, 1980). A cornbination of input variables is chosen which has the minimum value of the performance index. For ro input candidates, the number of fuzzy rnodels to be built and tested for input variable selection is ro(ro+ly2. In another investigation, Takagi and Hayashi (Takagi. 1991) propose a fuzzy reasoning neural network system to identify the significant input variables by eliminating each input candidate and checking a performance index. Those candidates that have less or no improvernent effect on the performance index are considered as non-significant. Again. for ro input candidates. a possible rdro+l)L2 neural nets should be trained in this technique. Building ro(ro+l)Rfuzzy or neural neiwork models is quite time-consuming especially for real systems with a large number of potential input variables. Moreover. in our fuzzy modeling methodology, we desire to separate the "input selection" stage from other stages, specifically because the inference rnechanism is not fixed in the proposed methodology . As a matter of fact, unlike Sugeno-Y asukawa approach. we believe that the significance of each input variable in the system is a real property of the system itself and should not depend on a selection of inference method and hence the manner of interpreting the model of the system. The third method of input selection is suggested by CHAPTER THE FUZZY-LOGIC MODELING ALGORITHM 79

Lin and Cunningham (Lin, 1994). In their technique, for each input variable, the input- output data are plotted and each sample point is hzzified to a Gaussian membership hnction, and then, for each sample point, a fuuy rule is constructed. Next. for potential input values, the defuzzified outputs are derived from the set of mles using Sugeno's heuristic reasoning formulation. As a result of this process, a "jifuzlycurve" is produced in the input-output plane. This prccedure is repeated for other input variables. one at each time. Significant input variables are supposed to have a wider range for their iuzzy curves. Lin and Cunninghan illustrated the validity of their method by several examples (Lin, 1995). 4.2.2 The Proposed Method

In Our proposed fuzzy modeling, for the selection of the significant input variables. we introduce an approach which is compatible with the whole idea of hizzy models. In fuzzy models, unlike anaiyticai models, the input-output relationship is defined for different partitions of input-output space through several IF-THEN rules. Each partition is represented by a membership function. Consider the fuzzy mode1 of a multi-input single- output system:

ALSO ...... m...... m. (3.1) ALSO IF Ul is B., AND U2 is Bnz AND ... AND Uris B, THEN V is D,

In each iule i (i= 1,2,..., n), the input membenhip functions Bi, (i=1 .Z,...,r) are aggregated via AND connection which is expressed by a triangular nom operator: ri(x) = T'(Bii(~I)9Bii(~2),... ,Bir(xr)) i=1,2 ,-...n (4.2 1 where, Tgcan be any kind of t-nom. As expressed in section 2.2.2 of Chapter 2 (property Fl), for the farnily of t-nom operators, "one" is the neutrd element. Therefore, if for an input variable x,, Bij(xj) is "one" for the whole range of xj, then the variable x, does not have any role in the i" rule. Consequently, if the input variable x, has no effect on the output, its rnembership functions Bij's (i=1,2, ...,n) should al1 be b'one" in the entire range CHAPTER THE FUnv-LOGlC MûûELlNG ALGORITHM 80

Figure 4.1 : Qualitative illustration of the effect of input variable x, on the ilh ride of x,. In other words. for each input variable xj, the range in which its membership function Bij is "one" can be a proper index of how effective that input is in the i" rule: if this range is equai to the entire range of Xj. then x, has no effect in the i" nile. and if this happens for the other niles of the fuuy model. then x, has no effect on the system. at dl. and can be removed. This statement is illustrated graphically in figure 4.1.

The above discussion can be summarized with the following statement:

COROLLARY 4.1 : In a fuzzy system model. the necessary and sufficient condition for an input variable to be non-significant is that. it has convex membership gade equal to "one" al1 over its domain. in al1 E-TIIEN rules.

From the above statement. it is desired to define a quantitative index nJ as an overall measure of the "(non)significance" of input variable x, in the fuzzy system as follows:

where. Tij is the range in which membership function Bij(%) is one. and r, is the entire range of the variable x,, and n is the number of rules. In the domain of [O. 11. small values of rc presents more effective variable and vice versa. While rc, presents the overall effect of x, on the system. each Ti, / 5 can provide rneaningful information about the effect of x, on the ifhmie.

For construction of the input and output membenhip functions. the ideal case would be to partition the (r+l)-dimensional input-output space. where r is the number of significant input variables. Due to limitation of clustering techniques and potential hgh- dimensionality of the problem, this approach is not promising in most of the applications. One practical alternative is to denve the fuuy partition of the output space from the data. in order to obtain the required number of rules for expressing the system behavior, i-e.. CHAPTER THE FUZZY-LOGlC MODELING A LGORITHM

OUTPUT (

# 5 Figure 4.2 : "Peak" poinrs should be the same for input and orrtput clrtsrers the output variation. The next step in this approach is to extract the input membership hnctions from the output partirions. After deriving the output space clusters and before discussing the input membership assignment. we are able to implement the proposed strategy of selecting the significant input variables. The reason is that by output-space ciustering. for each duster (rule), the points whose corresponding output membership grades are equd to one are specified. No matrer how the input membership functions are assigned. these points should have the same input membership grades (equal to one) in the corresponding rules. as illustrated in Figure 4.2. Based on the above reasoning. a simple algorithm is proposed for the input selection as shown in Figure 4.3.

One important point should be remarked regarding the above strategy. and the following strategy of input membership assignment. as well. in some applications. there might be more han one input cluster corresponding to one output cluster as illustrated in Figure 4.4. In this case, the input variable having this characteristic is certainly significant, and two (or more) membership functions should be defined for this variable using the suategy explained in the next section. In such cases. the number of mles (n) is more than the nurnber of output clusters (c),since we have several mles with the same consequent. Without any loss of generality, in the following, we assume that the number of rules is equal ro the number of outpur clusters (c = n). although for the above cases the same strategy can be applied considenng al1 input clusters corresponding to one output cluster as separate clusters. CHAPTER THE FUZZY-LOGE MODELlNG ALGORITHM

STEP 1: GET the output-space membership matrix uik, i= 1.2 .....n . k=1,2,..., N. where, n is the number of mies (output clusters) and N is the number of data. STEP 2: LOOP FOR j= 1 to ro PUT q=l FOR i= l to n

muD r,,={set of inputs x, with u,k=I. k=l.2 .....Y} FDiD r,={set of al1 x,}

NEXT i NEXT j STEP 3:COiMPARE the values of rr,. j=12 .....ro:

STEP 4: REMOVE input variables with large value of E, .

Figure 4.3 : The algorirlm of significanr inptir selecrion

Figure 4.4 : One orrtptrt clrister with nvo con-esponding input clrtsters CHAPTER THE FUZZY-LOGIC MûûELlNG A LGORITHM 83

4.3 ASSIGNMENT OF INPUT MEMBERSHIPS

After selecting the significant input variables, suitable membenhip functions should be defined for them. One simple approach is to set the membership grade of each sarnple input equai to its corresponding output membership grade, obtained from the output data clustering process (Sugeno, 1993). Therefore, for each output daturn. dl the corresponding input variables will have the same membership grade. The problem with this technique is that the membership functions assigned in this way are not convex and further approximation is required to shape the convex membership functions. Moreover. there is no reason for the input membership grades to be the same and equal to the output rnembership grade at each sample point.

In Our proposed fuuy modeling methodology. a new technique is suggested based on the proposed input selection strategy. As discussed before (Figure 4.2). assuming that the membership functions are smooth enough. the only points which can be claimed to have equal input and output membership grades are those which have the unit (or close to unit) membership grade. This was Our basic assurnption in identification of the significant input variables. We use this conclusion to construct the convex input membership functions. In Figure 4.2, suppose that for each output cluster i (i=1.2 ..... n). there are several points on the axis of input variable x, (j=l,z ..... r). which have output membership grades equal or close to one. These points lie between vi and vi ( v:, c vi ). We define the "distance" of each point x,, (k=l,Z,..., N), located on the axis xj, to the line vkvt with the following func tion:

1 1 ( di&, .v:,) = vq - xjlr if x,, < v,,

[ dis(x,, .v;) = x,, - vi if x,, > vi

NQW. for input data Xjk Q=1,2 ...., r: k=1.2 ,...,N). the membership grades u;, corresponding to output cluster i (i= 1.2, ..., n) is formed such that those points which are - "closer" to the line vj,vi obtain higher membership grades. Obviously. those points CHAPTER THE FUZZYLOGIC MODELING ALGORITHM 84

which are between vl and vf are assigned to have a unit mernbership grade. We cal1 this clustering procedure ''Line Fuuy Clustering" algorithm. Although the introduced clustering concept can be generalized to the multi-dimensional space having line or surfacc fuzzy clustering, in this research, we stick to the one-dimensionai case and postpone the generai case to funher research. Anaiogous to the weighted within-group sum of squared errors J, in FCM algonthm, for the line fuzzy clustering algonthm. the following objective function 7, is defined:

It should be mentioned that in Our application. for each input variable x,. the lines

v:,v: (i=1.2. .... n) are known and already specified from output clusters. Therefore. the

problem of fuzzy clustering here is to find optimum membership grades u:, such that 5, becomes minimum. Like FCM algorithm. in line fuzzy clustering algorithm. weighting exponent rn specifies the degree of fuzziness cf the clusters. Solutions to the above optimization problem are directly obtained by distinguishing between two cases when

x,, c v:j and x,, > vi . and solving --;-Pm)d = O for each case. The final result is du ,k obtained as follows:

for i=1,2 ,..., n, j=1,2 ,..., r, and k=1,2 ,...,N ; where, rz is the number of des, r is the number of significant input variables, and N is the number of data.

The above membership formation procedure is repeated for al1 selected input variables. Figure 4.5 illustrates the algorithm of input membership formation assignment. CHAPTER j% THE FUZZY-LOGIC MODELlNG AL GOWTHM 85

LOOP : FOR j=l to r FOR i=l to n

FIND Tlj= ( set O f inputs x, which correspond to output membership grade u,= L j

PUT vh = in(^,^) AND V: = ~ax(r,,) NEXT i CALCULATE u * from equation 4.7 . for i= 1.2..... n and k= 12 .....N NEXT j

Figure 4.5 : The algorirhm of input membership function assignrnenr

4.4 FUZZY PARAMETER IDENTIFICATION

The stage of parameter identification consists of two steps:

4.4.1 Fuuy Inference Parameter Optimization

At this step. we speciw the "best" inference mechanism for the system represented by its input-output data. This is a distinguishing feature of Our fuzzy rnodeling methodology. The inference rnechanism (parameters p, q. a. and P) is optirnized according to the data such that it provides the most adequate mechanism for modeling the system under investigation, which is not necessarily one of the known extreme inference mechanisms.

In order to find the optimum value of the inference panmeters. we mode1 the problem as the following boundary non-linear optimization problern:

Derive the set of parameters [p. q, a, P] such that: CHAPTER THE FUIIY'LOGIC MODELING A LGORITHM 86

becomes minimum, subject to the following boundaries:

where. N is the number of data. y' is the ithactual output and 9' is the ilh rnodei output. It should be mentioned that at this step. the input and output membership functions that are obtained from the structure identification are used. in order to solve the above optimization problem. Function "consri' of MATLAB has been used which is based on Sequential Quaciratic Programming (SQP) method (Grace. 1995).

4.4.2 Membership Functions Parame ter Tuning

We have already found the input-output membership functions in the structure identification stage. However. it is better to tune the parameters as we do in the ordina? system identification methods. In our methodology. wpezoidal fuvy sets are used as approximations to convex huy sets. Referring to Figure 2.7:

In order to adjust the trapezoid hinction parameters (y,, yb. y,, and yd) we apply Sugeno- Yasukawa's nining algorithm (Sugeno. 1993) with the modification that a variable adjustment value is used at each ~ningstep. This modification makes the tuning procedure somewhat more efficient. Besides, unlike Sugeno-Yasukawa's method. we adjust the parameters of both input and output rnembership functions. The algorithm show in Figure 4.6 summarizes the tuning process. CHAPTER THE FUZZY-LOGIC MODELING ALGORITHM 87

STEP 1: CHOOSE

the initial value of adjustment for input (qo) and output (&) membership hnctions (5- 10% of the range of the universe of discourse would be a good start) . number of iterations (irer) , number of adjustment changes (div). STEP 2: ERATE FOR 1 =I to iter STEP 2.1: for i=1.2 ....,n (nurnber of rules). and j=1.2 .....r (number of input variabIes), and k=1,2,3,4 :

SET b: as the krh input mernbership parameter of the jrh hzzy set in the if" rule.

SET q=qo

STEP 2.2: LOOP FOR Il = 1 to div SET q = 7/11 .

CALCULATE b +q and bl! -q.

IF k2.3.4. AND b:-q c bn-' . THEN 6; = b:-': ELSE 6: = bi-' - q.

IF Lz1.2.3, AND b:+q > b:-'. THEN 6: = bi-': ELSE b: = 6:'' +q. CHOOSE the parameter which shows the least PI (equation 4.8) arnong

(6n.bl.bi) and REPLACE bl! with it.

iF the new PI is less than the old PI. THEN break LOOP Il NEXT Il STEP 2.3: for i= 1.2 ,.... n (number of des), and k= 1.LX4 :

SET di as the krhoutput mernbership parameter in the ilh rule. SET 6 =j,

STEP 2.4: REPEAT STEP 2.2 for output membership parameters di .

NEXT 1

- Figure 4.6 : The algorirhm for rrrning inptrr-outprit membership paramerers CRAPTER THE FUZZYLOGIC MODELINO ALGORITHM 88

4.5 FUZZY MODELING ALGORITHM

Surnrning up the discussions of this chapter and previous ones, we propose the lÛzq modeling algorithm shown in Figure 4.7.

-- -. - - Find suitable weight exponent for clustering output data

& 1 Find the optimum number of output clusters I Rule Generation; Perform the agglomerative hierarchical hard Output Fuzzy Clustering clustering for the initial prototypes 1 1 Perform huy clustering for output data 1

.. ------Iormthe membership hnctions f&the entire output space 1

Input Selection ; 1 CanceI ineffective input candidates 1 Input mernbership - - - - Assignment mmfuzzy line clustenng for input mernbership functions 1

Fuzzy Inference Obtain the optimum value for fùuy inference parameters Parameter ~~timizationl1 4 Membership r Adjust the parameters of input and output parameter Tuning L fuzzy membership hnctions 4

Figure 4.7 :The fu~??stem rnodeling algorithm CHAPTER THE FUZZY--LOGE MODELING ALGORITHM 89

4.6 CASE STUDY

Example 4.1

in this example, we complete the hizzy modeling process of the nonlinear system discussed in Exarnple 3.2 of Chapter 3. After deriving the output fuvy clusters and performing the classification for the entire output space in Example 3.1. significant input variables should be identified and their membership functions are to be assigned. The fuzzy system identification is based on 50 input-output data. Two dummy input variables .rj and .rd have been added to check the input selection strategy. Unlike Sugeno- Yasukawas's approach of dividing die data into rwo sets and using a tirne-demanding combinatorial strategy. we apply the straightfonuard strategy described in section 4.2. The values of n (equation 4.3) for the four input candidates are: n, =0.60x104 : rr, =0.69x10J ; rr3 =5.72x104 ; rc, =4.60x 10' (4.11)

Clearly. the fint two input variables (x, and -y2) have the minimum rcbswhich are less than those for the other two variables in one order of magnitude. Input membership functions are also assigned through fuvy line clustering as explained in section 4.3. After approximating the input and output fuzzy clusters by suitable rrapezoidal functions. the first-step rough hzzy rnodel of the system is derived and shown in Figure 4.8. Note that up to here. no inference mechanism is required to denve the input-output clusters. The next step is to select and tune the set of parameters of the fuzzy model. which consists of the inference parameters (p. q. a. and p), and the input and output membership Function parameters. At the first step of pararneter identification. the optimum inference parameters are identified as explained in section 4.4.1. The optimum values are :

By optimizing the inference panmeters, the fuzzy model performance index (equation 4.8) is PI=0.171. The second step of parameter identification is to adjust the input and output membership pariameters. This is performed by the tuning aigorithm presented in section 4.2.2. After 5 iterations the error is reduced to PI=.0106 and after 5 more CHAPTER THE FUZIY-LOGE MODELING ALGORITHM 90

iterations the performance index becornes PI=0.0040. Figure 4.9 shows the final fuzq model of the system. The performance index of Sugeno-Yasukawa's huymodel of the same type (position type) starts from PI=0.318, and after 20 iterations. it reaches to PI=0.079 (Sugeno, 1993). Our methodology shows almost 20 times improvement in this example. Even compared to the Sugeno-Yasukawa position-gradient fuzzy model with PI=0.010 for this example, the proposed position type fuzzy model shows a better performance.

We apply the proposed algorithm to a famous example of the system identification given by Box and Jenkins (Box, 1970). The process is a gas furnace with single input u(t) (gas flow rate) and single output y(t) (CO2 concentration). For this dynamic system. 10 input candidates y(t- 1) ...., y(t-4). u(t- 1 ), .... u(t-6) are considered. We use the same 296 data as in (Sugeno. 1993). Figures 4.10 and 4.11 show the indices trtST) and s, as functions of m and c, respectively. m=2.5 and c=6 have been identified for the system. The signifiant input variables are detennined as y(t-1), u(t-2), and u(t-3). The optimum inference parameters for the gas fumace system are derived as:

After 10 iterations. the performance index reduces to a value of PI=0.1584 which is less than both the identified linear model (PI=O.193). and the Sugeno-Yasukawa position- gradient fuzzy model (PI=0.190). In (Sugeno, 1993), no position-type fuzzy model is presented for the process. Figure 4.12 shows the identified fuuy model and Figure 4.13 presents the fuzzy model behavior comparing to the actual process. CHAPTER THE FUZZY-LOGIC MUOELING ALGORrrHM 91

;=O p,, ia 3+ 0.00 1 na se-

Figure 4.8 : InitiaZjir--,~mode1 of rhe nonlinear Figure 4.9 : Final firi,?; mode1 of the nortlinear qstem afier srnrctrtre ident~jïcation esrem after parameter idenrijication cHAPTER THE FUZZY-LOGE MODELING ALGORITHM

1 -750 234557 9 3 ;O Wsighung bonenr Im) Nurnber of Ciuclers (c)

Figure 4.10 : Identrfication of rn for gas fumace process Figure 4.1 1 :Specificarion of c for gas firrnace process

- Process

Figure 4.12 : Final fit- modei of gas frtrnace process Figure 4.13 :Cornparison offii- rnodei and wai afrer parameter identification outprtt of gas frrmace process THE FUZTY-LOGIC MODELING AL GORITHM 93

4.7 CONCLUSION

We proposed a systematic approach to hiuy modeling and system identification. The methodology considers the inference mechanism. as an identifiable object of fuuy systems. as well as their structure and parameters. For the reasoning process, a unified parameterized formulation was developed by which the suitable inference mechanism is adjusted for the system based on the input-output data. Therefore. no selection of inference mechanism is required a priori. and no restriction on any steps of reasoning is necessitated,

For structure identification of the fuzry system suitable indices were introduced for identifying the number of rules and level of fuzziness of the fuuy mode[. based on fuzzy c-means clustering technique. Moreover, we used hizzy classification techniques to extend the clusters obtained from the sample data to the entire space. Significant input variables were identified by a new strategy. immediately as a result of output data clustering. Considering only the output space to identiQ the structure of the fuuy system gives us the advantage of simplicity and applicabiliv. By introducing the "hizzy line clustering" problem. we sugpested an appropriate methodology for specifying the input space partition from the output space partition. For parameter identification. an efficient algonthm for tuning mernbership parameters of input and output hzzy sets was introduced.

The whole effort was to achieve a systematic and objective technique of fuzzy modeling, which is reliable for a wide range of applications. based on its theoreticai background. The validity of the methodoIogy was examined through two examples. and a comparison study was made with the Sugeno-Yasukawa Fuuy modeling method. The results were quite superior. SYSTEMATIC DESIGN AND ANALYSIS OF THE FUZZY-LOGIC CONTROL

5.1 INTRODUCTION

In this chapter, we introduce an appropriate structure for hzzy-logic control of .MM0 systerns based on their hizzy-logic model. Furthemore. in order to Suarantee the stability and robustness of the system performance, we develop basic guidelines for the derivation of fuuy control rules using fundarnentals of sliding mode control theory. In chapter 1. a systematic methodology was proposed for developing the Fuzzy-logic mode1 of general nonlinear systems. As a continuation. in this chapter. we use the hizzy-logic model of the nonlinear system for control tasks. This chapter is organized as follows. In section 5.1. we first introduce an architecture for fuzzy-logic convol of complex MM0 systems. Then. we develop a generaiized formulation of model-based sliding mode control for a class of nonlinear MIMO systems in order to prove the effectiveness of the proposed control strategy and to derive guidelines for designing fuuy control mles that ensure stability and robustness. Next, the generalized formulation is applied to obtain the robust fuzzy-logic control mles as a specifîc case of nonlinear controllen. A discussion on how to derive fuvy rules to obtain the desired stability. robustness. and satisfactory performance is included. An exarnple is illustrated in section 5.3, and concluding remarks are presented in section 5.4. CHAPTER e SYSTEMATIC DESIGN & ANALYSIS OF FLC 95

5.2 ROBUST MODEL-BASED FUZZY-LOGIC CONTROL : DESIGN & ANALYSE

The key idea of the proposed approach to the design and analysis of the Fuzzy-Logic Control (FLC) system is to consider ETC (with crisp input and output) as a multi- dimensional nonlinear transfer element with upper and lower limits. The FLC nonlinear characteristics are due to irs computational structure. i.e.. fuuification. inference. and defuzzification. This requires the development of a suitable formulation of sliding mode control for a class of nonlinear MIMO systems that can be applied to fuzzy logic approach. This formulation is crucial to a systematic methodology of FLC design and analysis. In this section. we introduce the structure of the proposed fbzzy-logic control system. The required mathematicai fundamentals and theorems are presented. A generalized formulation of sliding mode control for nonlinear iWiMO systems is developed. and finally, the design of the robust fuzzy IF-THEN rules and membership functions for the FLC is presented.

5.2.1 The Proposed Fuzzy-Logic Control Structure

Figure 5.1 illustrates the proposed structure of the FLC for nonlinear LMMOsecond order dynamic systems. The controller consists of two main parts. In the first part, a set of fuzzy IF-THEN rules expresses the dynamic behavior of the system. This "Xmoidedge base" can be regarded as the fuuy-logic inverse dynamics model which contains the dynamic interaction between systern States as well as other complicared phenomena in the systern. Unlike analyticai rnodels, the fuzzy-logic model is simple and hence computationaily efficient, and at the same tirne, as we will illustrate for robotic applications in Chapter 6, the fuzzy-logic model can represent complex phenomena of the system behavior more precisely than anaiytical models. Moreover, since the model is directly obtained from input-output data, there is no need to identiQ intemal system parameters for constmcting the model. CHAPTER SYSTEMATIC DESIGN & ANA LYSlS OF FLC 96

The second part of the FLC consists of decoupled robust fuzzy IF-THEN rules for each state independently, in order to guarantee system stability. and in order to ensure achievement of the desired performance. As shown in Figure 5.1, two pre-processing units are also required to provide suitable input to FLC which will be specified in the next sub-section.

The proposed control structure is intuitive. Based on Our knowledge. which may be incomplete or inaccurate. we try to control the system towards the desired performance based on our knowledge about the system: at the same time. by using some extra rules (fuuy robustifiers in Fi,we 5.1). we ensure that the system remains stable and does not deviate frorn the desired behavior. In fact, for a simple system. these extra rules might be sufficient by themselves to conîrol the system without any further knowledge as we see in the traditional fuzzy-logic controllers. However. as the complexity (such as Iarge number of input variables. interaction between States. and wide range of disturbance) increases. more information is required which. in Our approach. is formed as the fuzzy-logic knowledge base of the system. in essence. the proposed FLC is a robust model-based control structure in which fuzzy IF-THEN rules are implemented in place of the andyticai formulation to guarantee the desired system stability and performance.

Figure 5.1 : The stntcrrrre of the proposedficzp-fogic control sysrem cFUPTER SYSTEMATIC DESIGN B ANALYSE OF FLC 97

Based on the proposed structure, the systematic methodology of design and andysis introduced in this thesis requires the following steps:

1) Development of a fuzzy-logic model. The main knowledge of the system characteristics is encapsulated in huzy IF-THEN rules. The development of an objective algorithm to extract this knowledge from the system behavior (input-output data) is the heart of the FLC.This task was acomplished in previous chaptea.

2) Design of the robust fuay IF-THEN niles for each system state.

3) Proof of stability and completeness of the structure. In the proposed structure. for each system state, robust fuzzy control IF-THEN rules are designed independently. This 'bdecoilpling"charactenstic provides a simple aproach to the design of the robust fuuy niles. It should be proved that this is sufficient in order to parantee the stability and robust performance of the entire system.

The following sub-sections discuss steps two and three. 5.2.2 Fundamental De finitions and Theorems

In this section. some basic concepts and theorems of matrix theory are briefly reviewed, and three results which are used in the development of the generalized formulation of sliding mode control, are proved.

DEFINITION 5.1 (Hom, 1985): An nxn real syrnrnetric matrix BER"" is called positive definite, if for al1 nonzero real vectors XE Rn, the real scalar X~BXis strictly positive:

Vx é Rn, x # O : IF X*BXr O . THEN B is positive definite .

If the above strict inequality is weakened to xTBX > O , then B is said to be positive semi-

defin ite s

DEFINITION 5.2 (Hom, 1985) : A scalar function f(x) : R -+ R is positive definite if for al1 x E R : a) f(0) = O , b) f(x) > O, c) f(x) is continuous, a f d) y is continuous.

If condition (b) becomes f(x) 2 O, then f(x) is positive semi-definite.

DEFINITION 5.3 (Hom, 1985) : Let A9B~RR""be real symmetrîc matrices. We say A>B if and only if the matrix (A-8) is positive definite; sirnilariy, A 2 B means that (A- B) is positive semi-definite. CHAPTER SYSTEMATlC DESIGN & ANAL YSlS OF FLC 99

DEFINmON 5.4 (Hom, 1985) : A time-varying rnatrix B(t)€Rnm is uniformly positive definite if there exists a positive scaiar a > O such that: Vt 2 O : B(t) > cd, where I is the nxn unity matrix.

COROLLARY 5.1 (Hom, 1985) : A real symmetric matrix BE RWn is positive definite (semi-definite) if and only if its eigenvalues are positive (non-negative).

COROLLARY 5.2 (Hom, 1985) : A non-singular matrix B€Rn"" is positive definite

(serni-definite) if and only if its inverse B'I is positive definite (serni-definite).

COROLLARY 5.3 (Hom, 1985) : If A,BER""" are real symmetric matrices and

A 2 B , then for any arbitrary vector XE Rn we have: xTAX 2 x BX .

THEOREM 5.1 (Hom. 1985) : If matnx AER"" is non-singular, and has distinct eigenvalues, then there exists a similarity transformation such that: A = V-'L,v. where

A is a diagonal matnx of the eigenvalues of A. and V is a non-singular matrix of the eigenvectors.

THEOREM 5.2 (Hom, 1985) : If A,BE R~"are nxn non-singular mavices with distinct eigenvalues, and A and B cornmute, Le., AB=BA, then they have the same eigenvectors such that: A = V-'Z ,V and B = V-' t, v . The matrices Z, and E, are diagonal matrices of eigenvalues of A and B, respectively.

THEOREM 5.3 (Istratescu, 1987).: For an nxn positive definite matrix BER^" and every two arbitrary vectors x,y~Rn . the following inequality called "generaliced Cauchy-Schwarz inequaliry" holds :

X~B~5 JxrBx. JyTBy CHAPTER SYSTEMATIC DESlGN & ANAL YSlS OF FLC 100

Based on the above theorems, we need to prove the following results that are used in the sequel:

COROLLARY 5.4 : if A,BE Rnm are positive definite (serni-definite), and A and B commute. then their matrix product AB is also positive definite (semi-definite).

PROOF : Since A and B commute, by using Theorem 5.2, we have:

where, LA, = Z,Z,. Therefore, the eigenvalues of AB are the product of those of A and B. According to Corollary 5.1, positive definity (semi-definity) of A and B irnplies that al1 their eigenvalues are positive (non-negative), and hence, their products are also positive (or at least non-negative) which also irnplies that AB is positive definite (semi-definite). +

THEOREM 5.4 : Suppose that for a positive definite nxn matrix BE RnXnthere exists a positive reai scalar b > O such that FI 2 B where I is the nxn unity matrix. Suppose that

for a vector y E Rn there is an upper bound (y/lSp. Then. for any arbitrary vector

x E Rn, the following inequality holds:

xTBY bpllxll (5.3)

PROOF : Since (bI - B) is positive semi-definite. for arbitrary vectors x.y E Rn we

have:

According to Theorem 5.3, for the bounded vector y and arbitrary vector x we have:

xT~y5 JXTBX ..,/yTByyTBy (5.7) and from 5.4, 5.6, and 5.7, we detennine that:

THEOREM 5.5 : Consider ME R~"as an nxn positive definiie macrix and KE R"~"as an nxn diagonal positive definite matrix. If there exists a positive real number > 0 such that a 2 M . then for every arbitrary vecror x E Rn.we have: - ~.x~M-'I(~2 X'KX (5.9)

PROOF : The assumption a 2 M means that matrix @ - hl) is positive serni- definite. i.e. @ - M)2 O .

According to Corollary 5.2. since M is positive definite. so is M-~.Also since K is diagonal. M% cornmute. and based on corollary 5.4 it is also positive definite. Furthemore, we have:

(ir- M)M-[K = M-'K@- M) (5.10)

Therefore. from Corollary 5.4. it is concluded that @ - .M)V-'K is positive serni- de finite: (Z~-M)M-'KZO

Based on Corollary 5.3. for an arbitrary vector x E Rn. we obtain: CHAPTER~ SYSTEMATIC DESIGN & ANAL YSIS OF FLC 102

5.2.3 A Generalized Formulation of Sliding Mode Control

In order to use sliding mode control theory for the synthesis and analysis of fuzzy control. a generaiized formulation, developed in this section. is required. Without loss of generality and for the sake of clarity, we consider second order dynamic systems. The dynarnics mode1 of such systems with n system states and n input variables is represented as follows:

q = f (q. q;t) + B(q, q; t)u(t) = G(q, 4. u: t) (5.14) where, q=[q,,q, ,..., qnITisthe vector of systern states. and (I=[~,.~~..... iln]T and

T q = [9,,9 z,. .. , q ] are state velocities and accelerations. respectiveiy. Function P E Rn is a noniinear vector function that represents system dynamics and al1 uncertainties and disturbances, and B E Rn""is also a nonlinear matrix function which acts as a nonlinear control gain. Vector u é Rn is the control input vector. The acceleration vector of the entire system can be considered as a nonlinear and tirne-varying vector hinction G E Rn-

For further development. we need to introduce the inverse dynamics mode1 of the nonlinear system 5.14, based on the following assumptions: i) by suitable transformations, it is possible to uansfer the system dynamics into the form presented as equation 5.14 such that the system dynamics is linear in rems of the control input u (although nonlinear in the states). ii) the conuol gain matrix B is non-singular and bounded positive definite over the entire state space, i.e.,

where. b is a positive constant and b(q,q; t) is a positive definite function. Based on the above assumptions, the inverse dynarnics mode1 of the system can be presented as:

= M(qTq; t)q+ h(q, q: t) = F(q, q, q; t) (5.16) where. M = B", and h = -~-'f.

Since B is non-singular, frorn 5.15 it follows that:

1 - 1 where. g = = and m = - . b -b

In this analysis, our goal is to derive formulation by using the nonlinear fünction F instead of its components M and h. In this direction. considenng the fact that:

the boundary matrix inequalities 5.17 can be rewritten in the following form of scalar inequalities: (5.19) vt 20 : vq.4,ij E R" : mJlq~I's qT[~(q,q,q;t)-~(q,~,o;t)]I&,4;t]14112

The control task is to follow a desired q, and q, in the presence of system parameter variation and uncenainties. The tracking error e = q- q, and the rate of error e = q- q, are to be observed. We define a generalized error vector as follows:

where, P and Q are nxn diagonal matrices. The integral of error is included in the generdized error to ensure zero offset error. Based on the theory of sliding mode control (Appendix A), the tracking control problem cm be formulated as keeping the error vector e on the sliding surface defined as follows: CHAPTER SYSTEMATC DESW & ANALYSE OF FLC 104

An optimum response for each error state is obtained if the system 5.21 is cntically darnped where:

P=2A; and Q=A*

Matrix A is an nxn positive definite diagonal matrix.

At this point, we should consider the conditions which guarantee that for each state qi. the system trajectory will approach the sliding surface from any non-zero initial error. within a desired period of time. In order to avoid the chattering effect prevalent in sliding mode control (Appendix A). the condition is relaxed to asymptotic convergence of system States to a small neighborhood of their corresponding switching surfaces. For each state. this neigborhood is defined as:

The above task can be achieved if the control law u is designed such that for each state a Lyapunov-like condition for system stability holds (Slotine. 1990):

or, in sum:

The pararneter QI is the thickness of the boundary layer and q, is a design pararneter that sets the time the system trajectory requires to reach the boundary layer from an outside initial condition.

From equations 5.21 and 5.22. the dynamics of the generaiized error vector s is determined as:

S = (ë+ 2Aé+ A? e) = [a-@, - 2Aè- A' e)] CHAPTER~ SYSTEMATlC DESIGN & ANALYSlS OF FLC 105

The acceleration vector q cm be obtained from systern dynamics. Equation 5.14 cm be rewritten as:

Inserting 5.27 into 5.26 results:

equation 5.28. the te* [~(q,- Zh é- A' e)+ h] is the systern inverse dynarnics with the input acceleration defined as "reference" acceleration as follows:

Then we define the desired control input as:

Because of the system uncertainty and variation. the inverse dynamics mode1 of the system (in Our case a fhzzy-logic model) is an approximation of the reai system. Hence:

Û,, = ~(q,q;t)ii,+h(q,q;t)= Ê'(q,&q,:t) (5.3 1)

Therefore. we consider that the control input u is defined as :

where. the control tem u, is the compensation part of the controI due ro model uncertainty. and it should be specified such that the sliding condition 5.75 is satisfied. By replacing u (equation 5.32) in equation 5.28 we have:

where. AF is the uncertainty vector of the inverse dynamics rnodel. Consequently. the left hand side of the sliding condition 5.25 becomes: CHAPTER SYSTEMA TIC DESIGN & ANAL YSlS OF FLC 106

We assume that the uncertainty A F is bounded as:

By using Theorern 5.4 . for the positive definite matrix B and bounded vector A F. we have:

sT BA F I6pllsll or:

and therefore, equation 5.34 changes to the following inequality:

Considering the fac t that:

the following inequality cm be inferred from 5.38:

In order to satisf'y the sliding condition 5.25. we choose a continuous u, such that:

or in another fonn:

Assume that for each state i, we choose uci as a function of S, . uci = Gi(st) SUC~that it satisfies the following properties: a) Gi(si)is continuous; b) Gi(si)is rnonotonic and decreasing for O c (s,1 < a,;

C) Gi(0) = 0.

We express Gi(si)as follows:

where, gi(si) is a positive function for ail si, and dsgn(si) is a function defined on the entire R as:

From equation 5.44. the vector u, can be represented as:

where, G is an nxn positive definite diagonal rnatrix with gi(si)as its diagonals and Q is an nxn positive definite diagonal matrix with A,,as itr entries if ri O : otherwiie the diagonal element corresponding to s, = O is zero. - By inserting equation 5.46 into inequality 5.42 and multiplying both sides by -m. we obtain:

Since GR is positive definite (or at Ieast positive semi-definite). according to Theorem 5.5, we have:

- n msTM%RS > sT GRs = ~g,si.dsgn(sl)

There fore. inequality 5.47 will be satisfied if the following inequaiity holds: CHAPTER SYSTEMATK DESIGN & ANAL YSlS OF FLC 108

Figure 53: The specified domain for robrisr conrrol rerm u,,

It is sufficient that condition 5.49 hoids for each terrn of the surnrnation:

From inequahty 5.5 1. the general condition for u, to parantee compensation for system uncertainty is obtained as: CHAPTER SYSTEMATlC DESIGN & ANALYSE OF FLC 109

Figure 5.2 shows the domain in which each 4, can compensate for system uncertainties. We cal1 this domain the "Robusmess Region". This region and properties specified in 5.43 help us to assign the robust control tenn uci for each state, independently.

In our methodology, the control tems Gi are produced by suitable fuzzy IF-THEN rules. The procedure is as follows: we consider the nonlinear .MM0 system 5.14 with the assumptions (i), (ii), and (iii), and with the following inverse dynamics:

First. we pnerate the hzzy-logic inverse dynamics mode1 of the system as:

based on a known bounded enor AF. Then the control input is of the form:

where. q, is defined by equation 5.29. The pnerd conditions of u, are: for each state i. u,i should satisfy properties 5.43. and be located in the domain defined by 5-52 and iilustrated in Figure 5.2. The robustness region depends on design pararneters h, . q, . and a,.and pararneters .m .and p which are defined as foliows:

In conclusion, in this section it was shown that it is possible to design the "decorrpled' robust fuzzy control tems u, (i=1.2. .... n) as illustrated in the control structure of Figure

5.1. Furthemore, we developed the seneral conditions for Uci to ensure the stability and robustness of the entire system. These conditions depend on the bounds of the mode1 error and system parameters which, in our formulation. can be achieved from the inverse dynamics mode1 (equations 5.56 and 5.57). Therefore. in the proposed formulation. the system dynamics is considered as a black box without the necessity to speciS its components specifically. CHAPTER~ SYSTEMATIC DESlGN & ANALYSIS OF FLC 110

5.2m4 Design of the Robust Fuuy Control Rules

In section 5.2.3, we have developed an approach to control of a class of nonlinear MIMO systems, which consists of implernenting an inverse dynarnics rnodel and designing a robust control term G, for each system state independently. Each function uci(si)should satisfy conditions 5.43 and 5.52. In this section, we design fuzzy IF-THEN rules to satisQ the afore-mentioned conditions.

From figure 5.2, the characteristic relationship between Uci and si can be qualitatively expressed as: "uCiLr inversely as large as si within certain lirnits". We interpret the above characteristic by the following seven IF-THEN rules:

Positive Big (PB), THEN u , is Negarive Large. Positi~7eMedium (PM), THEN u, is Negative Mediion. Positive Small (PS), THEN u, is Negative Smnll, Airnost zero (AZ), THEN u, is Alrnost Zero. Negative Small (NS), THEN u, is Positive Small, Negative Mediiim (NM), THEN u, is Positive Medilim. Negative Large (NL), THEN u, is Positive Large.

It is possible to apply the unified reasoning formulation proposed in Chapter 2 to robust fuzzy rule set 5.58. However, by having a comprehensive fuzzy rnodel. the robust term of the control input cm have simple characteristics. Therefore. For the sake of simplicity. we use the modified Sugeno's reasoning formulation (Sugeno, 1993) for the inference mechanism of the robust fuzzy rules that provides a simpler and faster result.

Accordingly, given the input si, the crisp output uci is denved as:

where, Aik(si)is the membership function of Si in the antecedent fuzzy set of the kth de, and bik is the centroid of the consequent fuzzy set of the kth rule.

The main objective is tu assign suitable membership functions for generating the robust control rules such that conditions 5.43 and 5.52 are satisfied. It shouid be noted CAAPTER SYSlEMA TIC DESIGN & ANALYSlS OF FLC 111

that according to the reasoning formulation 5.59. for the consequent fuzzy sets, only their centroids are required. Considering the input membership functions shown in figure 5.3. and seven consequent fuzzy set centroids b: for "Almosr Zero" and b: .b:. b: for "Positive Small, Medium, Large". and b: .b'. bi for "Negative Small, Medium, Large*'. the si-uci relation cm be represented as shown in figure 5.4. For the sake of simplicity and without loss of generality, the input membenhip functions are arranged such that they always overlap at the degree of membership equal to 0.5. Therefore, for each input s,, two rules are fired at mosr. Furthemore, a symmetric behavior for uci(si) is assumed. Hence,

? 3. 4 4 4 -a: =-a; ; ai3 =-a, g, =-a, ; and - - ; bl = -bf : b, = -b: (5.60)

From figure 5.4, some of the membership parameters can be assigned irnmediately. First, Conditions 5.43 require that:

By using inference formulation 5.59 and membership functions shown in Figure 5.3. a piece-wise linear characteristic is produced for the robust fuzzy control function of each system state i (i= 1.2, ...,n), which cm be formulated as follows:

Figure 5.3 :Membership fitnctiorls of the generalized error sifor robrlsr conrrol rides cHAPTER~ SYSTEMA TIC DES/GN & ANALYSIS OF FLC 112

where, K: = bi" - bl 7.

In order to assign membership parameters, we consider the dynamic behavior of the generalized error vector s (equation 5.33) which cmbe rewritten as:

Figure 5.4 : The robust fil- control characteristics cHAPTER SYSTEMATlC DESlGN & ANALYSlS OF FLC 113

or. in the component fonn:

Substiniting 5.63 into 5.66 results in:

Equation 5.67 represents the behavior of a state-dependent first order filter with corner frequency equal to B,i 7K : and system uncenainties and state interaction dynamics as 0, input to the filter. Based on the theory of sliding mode control (Appendix A). a suiiable selection of the corner frequency for such a filter to remove system uncertainties and unmodeled frequencies is that:

where. )cl is the lower band of the unmodeled frequencies. Since b = is an upper value of the gain rnatrix B, a reliable break away frequency for filter 5.67 can be assigned such that:

However, within the boundq layer. the unmodeled frequencies and uncertanties cm affect system performance only when s, is close to zero. i.e.. for the first segment where

1s,1 5 al. Therefore. for each stare i, parameters a: and b: should be selected such that:

For a larger distance between the state and the switching line. since the unmodeled frequencies and state interactions cm not change the sign of the control input we are able to assign higher break away frequencies whch provide better control and consequently. faster response without any performance degradation. There fore. pararneters a and b are designed such that:

The capability of choosing different dopes for the robust control signal within the boundary layer provides more flexibility in the design of the robust control than the sliding mode control approach. Moreover, as illustrated in Figure 5.4. by designing piece- wise linear robust control function we ensure that the state trajectory remains inside the "robustness region".

Similar to the sIiding mode control. the tracking quality is guaranteed by choosing (Appendix A):

Outside the boundary layer, the maximum value of the robust control is assigned to be the Iower bound of the "robustness region". therefore. from 5.52:

and from 5.72 and 5.73. the boundary layer thickness 0,= a: is specified as:

Equations 5.60, 5.61, 5.70, 5.71, 5.73 and 5.74 assign the rnembership parameters of robust fuzzy IF-THEN rules 5.58. Obviously, these pararneters depend on the design pararneters hi and qi. The natural frequency hl specifies the rate of convergence on the sliding surface, and it should be less than the minimum frequency associated with the largest unmodeled time delay r,,, and the frequency associated with the sarnpling rate r,. A suggested cnterion for selecting hl is (Slotine. 1990): CHAPTER SYSTEMATIC DESIGN & ANAL YSIS OF FLC

hlmin - - (31m 5:s )

The bove two criteria for assigning Ai have an inverse relation: the more accurate is the mode1 developed, the more computational time is required and hence the larger sampling rate should be applied. An ideal solution is to implement modeling paradigms that provide simple interpretation with high accuracy. This is perfectly satisfied in Our fuzzy-logic modeling approach.

The design parameter q, reflects the time to reach the boundary layer from an outside initial condition. A higher value of 11, results a faster transient response. However. since this parameter controls the maximum value of the robust control term (equation 5.73). its magnitude is limited by physical limitations. Figure 5.5 :A planar two degree-of-fleedom manipularor

5.3 CASE STUDY

In this section. we illustrate the validity of the proposed robust hzzy control rule generation methodology by cornparing the performance with the boundq layer sliding- mode control for a two degree-of-freedom plana robot manipulator shown in Figure 5.5. The inverse dynamics mode1 of such a robot is explicitly given as:

where,

M,, = a, +2a, cosq, +?a, sinq2 M,, = ML,= aZ+a, coq: +a, sinq, 'ME =aZ h =a, sinq2 -a, coq, g, =a, coq, +a, cos(% +cl?)

. a20 = a, cos(q, + q,) with

CHAPTER SYSTEMATlC DESIGN & ANALYSlS OF FLC 118

approach. The entire hiuy control approach will be validated experimentally in the next chapter.

The upper and lower lirnits of the inertia rnauix M. and the error nom of the inverse dynamics mode1 are caiculated as: - -m = 0.7 [kg] ; rn = 6 [kg] ; p = 5 wm] (5.84)

In order to have the same basis for cornparison, we choose identical maximum robust control signal and boundary layer thickness for both schemes. Let AI = h, = 50, and ql = q2 = 1. The maximum value of the robust control signal is set to:

- K=KI = K, = n1(:+~)=48.86 [Nrn] and the boundary layer thickness is assigned as:

K @=al=a, =-- - 1.4 [rad / s]

Figure 5.6 : The roblist conrrol characreristics ofjii;? and sliding mode control cHAPTER SYSTEMATIC DESIGN & ANALYSE OF FLC 119

Figure 5.6 shows the robust control characteristics of both schemes. and the designed membership hnctions for robust fuzzy control are shown in Figure 5.7.

The robot, initially at rest ( q, = O , q2 = O ) is commanded a desired trajecrory:

q,, (t) = 30°(1- cos(2~t)); q,, (t) = 45'(1- cos(2m)) (5.87)

The corresponding position and velocity errors and control input are plotted in Figure 5.8. Displacement and velocity errors of both joints are reduced by using the robust fuzzy IF- THEN niles. without a significant change in the total control input command.

Figure 5.7 :Membersttipjitncrions for robustjïi- control rules CHAPTER m SYSTEMATIC DESlGN & ANAL YSIS OF FLC 120

JONT #1

J I 1 .- Fuzzy Control 15 2 25 3 - Sliding Made Contml TME

Figure 5.8 : Cornparison of the petformance of robust firzzy control rules and boundary layer sliding mode control for the 2 D.O.F robot CHAPTERESYSTERUATIC DESIGN & ANAL YSlS OF FLC 121

5.4 CONCLUSION

In this chapter, we introduced a fkq-logic control structure for a class of nonlinear MIMO complex systems. The core of this structure is the knowledge of the system dynamics in the form of niuy IF-THENrules. In chapter 4, a systematic methodology of developing this knowledge base was proposed. In order to compensate hirther for system uncertainty and knowledge incompleteness, we apply additional robust fuuy rules. In order to prove the stability and robustness of the proposed control system, and provide systematic guidelines for designing the robust fuuy rules, we developed a generalized formulation of sliding mode control for the class of nonlinear MIMO systems. This formulation has two distinct features. First, it is possible to apply this formulation while considering the system as a black box without any need to identiS the intemal parameters or to assume specific properties. Second, it is possible to design the robust control cornmands for each system state independently while the stability and robustness of the entire system is guaranteed. These two features are critical for the proposed hzzy-logic control approach. As a result, for each state, a "robust region" was defined within which suitable fuuy rules cm be designed. The results of the developed formulation led us to guidelines for designing robust fuzzy IF-THEN rules, which are quite simple and efficient as illustrated in the exarnple. APPLICATION TO ROBOTICS SIMULATION AND EXPERIMENT

6.1 INTRODUCTION

In the previous chapters, the proposed methodology of fuzzy-iogic modeling and control was examined analytically and numerically. In Chapter 4, the systematic fuzzy- logic modeling approach was applied to the input-output data of a chernical plant. In Chapter 5, the proposed fuuy-logic control method was also illustrated by simulating the trajectory control of a two degree-of-freedom manipulator, which yielded superior results cornpared with a classical robust control algorithm.

Robotic systerns can be considered as a challenge for modeling and control due to their highly nonlinear characteristics, variable parameters, and real-time computational problems. As well, some of their inherent phenornena such as friction, flexibility, backlash, etc. are very complex to represent and control. In this chapter, the new systematic methodology is implemected for the trajectory control of a four degree-of- freedom experimental robotic test-bed called the "IRIS robot (RoboTwin)". Our goal is to illustrate the strength of the proposed methodology for constructing the fuzzy-logic model and controller in order to improve the behavior of the manipulator especially with respect to nonlinear effects, parameter variation, and model uncertainties.

In this investigation there is no need for andytical simulations. However, in order to compare the performance of the proposed fuzzy-logic modeling technique with other analytical approaches. two general purpose simulation models, symbolic and numerical, CHAPTER SlMULATlON AND EXPERIMENT 123 were prepared for the forward and inverse dynarnics modeling of robot manipulators.

Kinematic and dynamic parameters of the IRIS ami were also identified.

In section 6.2 a short description of the experimental set-up is presented. In section 6.3 the preparation of the analytical simulations and the denvation of the IFUS arm parameters are briefly reported. In section 6.4, we cary out the fiiw-logic modeling of the 4 D.0.F IRIS robot manipulator and compare the results with those of the analytical mode1 simulations. In section 6.5, the proposed fuzzy-logic controller is designed for the trajectory control of the manipulator and experimental results are presented. We compare the results with those of an ordinary servo controller.

6.2 EXPERIMENTAL SETUP

In this research, the experirnental test-bed is the IRIS robot (RoboTwin) developed in the Robotics and Automation Laboratory at the University of Toronto (Hui, 1993). Figure 6.1 presents a general view of the setup. This facility is a reconfigurable and versatile test-bed composed of two 4 D.0.F robot manipulators that can be easily disassembled and reassernbled to provide a large va.riety of configurations. The basic element of the system is the "joint modzrle" which cornmunicates with the controller, independently. Each module is activated by a

Figure 6.1 :IRE roboticfacifity CHAPTER SlMULATlON AND €XPERIMENT 124

Max. Coat. Max. Con t. No Load Max. Cont. MOTOR Peak StaIITorque Wm) ~tai~~urrent Speed Output Power (Nm) (A) WM) O JOINT #1 0.540 2.830 4.3 1550 73.1 JOINT #2 O250 1.120 2.7 2150 44.7

Reduction GEAR Torque Peak Torque Peak Torque Speed Ratio (Nm) mm) (NM) (RPW JO~T#I 100 49 82 108 4000 L I JOINT #2 100 49 82 108 4000 JOINT #3 50 34 56 98 4000

Torque at Gear Current Gear Torque Current GEAR Output Shaft (Nm) I+lk I JOINT #l 60.0 43 49.0 3.5 JOINT #2 27.0 2.7 49.0 4.8 JOlNT #3 13.5 2.7 34.0 6.6 JOINT #Q 5.0 i .7 34.0 6.5 TabIe 6.1 : Torque and speed charucteristics of IïUSj0inr.s

fiameless brushiess D.C. motor (Inland Motor K. Corp.) coupled with harmonic drive gear (HD Systems Inc.) by which high torque to weight and inertia ratios and virtuaily zero backlash are achieved. A combination of three different motors with the maximum continuous output power in the range of 28 to 73 Watts, and two different harmonic drives with the gear ratio of 50 and 100 are used for different joint modules. Table 6.1 surnmarizes the torque and speed characteristics of the joint modules. The angular displacement of each joint is measured by a high revolution incremental optical encoder (Hewlett-Packard, HEDS-5000).The applied torque on each joint can also be measured by a tension-compression load-ce11 torque sensor specifically designed for the IREjoints.

The system is controlled by a computer node built around a 50 MHz, EISA bus-based IBM-PC compatible host computer. An AMD 29050 RiSC coprocessor board is tightly coupled with the host computer which contains a powemil RISC processor with a built-in floating-point unit and separate memory, and performs real-time tasks. The RISC board is capable of delivering a real speed of 10 MFLOPS for the C-coded robot application programs. The communication between the FüSC and the host computer is provided by a CHAPTER SIMULATION AND EXPERIMENT 125

16 Kbyte memory window (Kircanski, 1993). The host computer provides many vimially parallel fiinctions such as user interface, UO signal processing, data acquisition, etc. The W0 system consists oE (i) ADC board with 8 differential channels and 5 psec, 12-bit sampling rate; (ü) DAC board with 6 analog output channels; and (iü) 96-bit parailel digital UO intedace board used as an interface to the optical encoders. The important feature of the control architecture is parallel execution of host, RKSC and UO interface tasks, which is essential for achieving maximum system performance. Communication is perforrned by passing messages through the common memory window. Figure 6.2 shows the schematic view of the IRiS facility control architecture (Kircanski, 1994).

EISA BUS

.., * Jq POWER

AMPLIFIERS ,y

Figure 6.2 : Control architecture ofthe IRIS faciliiy CHAPTER SIMULA TION A ND EXPERIMENT 126

Modularity of the joints enables the user to set various configurations, and the software environment is designed such that the user can develop and implement a choice of control strategy on the IRIS manipulators. Moreover, the test-bed provides an ideal environment for evaluating different modeling and control methods in conjunction with study of physical phenornena, such as dynamic nonlinear effects, flexibility, friction, backlash, and system parameter variation.

6.3 SIMULATION MODEL 6.3.1 The Desired Configuration for the Experiments The modularîty of the joints in the IRIS setup enabled us to generate the most appropriate configuration for the experiments. The main criterion is to intensiQ the nonlinear effects and parameter variation considenng the physicai limitations of the joints. The highest interaction of the dynamics of the joints can be obtained by arranging the maximum number of perpendicular joint axes. Therefore, it \vas decided to have three consequent perpendicular joints in the IRIS m. Due to physical limitations, the axis of joint 1 should be vertical. The axis of joint 2 is horizontal. The axis of joint 4 was selected to be parallel with joint 1, and the ais of joint 3 to be horizontal but perpendicular to that of joint 2, in order to magniQ the weight effect. Figure 6.3 shows the desired configuration of the IRIS arm for our investigations. CHAPTER SIMULAT/ON AND EXPERMENT 127

6.3.2 Kinematic and Dynamic Parameter Estimation

A schematic diagram of the selected configuration is shown in Figure 6.4 vdh the link coordinate frames defmed according to the standard Denavit-Hartenberg convention (Paul, 1981). Kinematic parameters were estirnated by direct measurement. Dynamic properties of each link, i.e., mas, location of the center of mass expressed in the link coordinate frame, and the inertia matrix with respect to the center of mass and expressed in the link coordinate frame, were caiculated by preparing the link solid models on Advanced Solid Modeling Application of AUTOCAD 12. Table 6.2 summarizes the manipulator parameten.

6.3.3 Dynamics Mode1 of the IRIS Arm

The general dynamic equations of an articulated robot manipulator with n degrees of freedom can be presented as:

= ~(q,)q*+ f(%?k)+ (6-1) where, qa , q8 , q, are nx 1 vecton of joint displacements, velocities and accelerations, respectively, and r, is the nx 1 vector of torques applied to the joints by the motors through the transmission units (harmonie drives in this case). ~(q,)is the nxn inertia matrix, f(q, ,q,) is the nx 1 vector representing dynamics coupling (Coriolis and centrifugai) and fiction iorques. g(q8) is the nx 1 vector of gravity load. In each joint of the IRIS arm, the joint torque sa is proportional to the motor torque load r, by the factor of gear ratio Nh:

Considering the flexibility of the gearing system, the applied joint torque ta generates the following dynamics: CHAPTER SIMULAT/ON AND EXPERIMENT 128

Figure 6.4 : The desired conf;gurarion of the IRIS arrn wirh rhe link coordinatefi.ames

Length Offset Twist Mass Center of Inertia Matrix (ml (ml (de@ (kg) Mass (m) (kgmz) 0.0420 O LINK#l 0.28 O 90 4.023 0.0075 0.0035 [;;;:] [;;;:] [ O 0.0035 0.0400O 1 0.0208 O LINK#2 0.32 O 90 2.191 O 0.0070 -.O035 [-O%I:] [ O -.O035 0.0160O 1 4.108 0.0076 O 0.0059 LINK #3 O 0.25 90 2.8 10 0.0388 [ 0.0200 ] [0.0059 O O 0.0340O 3 0.0014 O LINK #4 O 0.19 O 1.385 0.0063 ] O O 0.0064 - [ -- Table 6.2 :Kinema~ic und Dynamic parameters of rlze IIRI mmfor the desired configurarion

J, Br## B: Bi K( KB 1s US rm 8, (Nml (Nm/ Kr (kgm2) camp) 03 (ohm) (Nm/ (Nm/ rads) (Nm) (Nm) amp) radls) rad) radis) JOINT #1 28e-6 6.4e-4 .O138 -.O282 -1256 0.141 4.8 24 1.2 3.5e2 0.2 - - - - -p. JOINT #2 12e-6 6.4e-4 .O138 -.O282 -1256 0.102 4.8 24 2.2 3Se2 0.2 JOINT #3 12e-6 6.4e-4 .O138 -.O282 .1256 0.102 4.8 24 2.2 4e2 0.1 JOINT #4 1.4e-6 6.4e-4 -0138 -.O282 -1256 0.059 4.8 24 3.7 4e2 O. 1 ------Table 6.3 :Joint parameters used in the simulation CMER SIMULA TION AND WPERIMENT 129

acceleration, and k, and g, are harmonic drive stifiess and viscous coefficients, respectively .

The clynamic equation of each joint module of the IRIS am can then be written as (Kircanski, 1995):

where, r, is the input torque to the motor, J, is the inertia of the rotor, B, is the viscous coefficient, and Bi,Ei are positive and negative Coulomb friction depending on the direction of the shaft rotation sgn((lm). The motor torque is proportional to the motor current as:

where, Kt is the motor torque constant. The motor current is also generated from the cornmand voltage u, ,provided by the DAC unit, through the amplifier:

Furtherrnore:

where, Us is the steady-state motor winding voltage, UB is back emf voltage, 1, is the current limit due to back emf, K, is the back emf constant and r, is the stator winding resistance. Besides, the amplifier electronic circuit monitors the motor current and imposes a hard Iimit to the maximum current not to exceed a limit 1, ,hence: CHAPTER a SIMULATION AND MPERIMENT 130

Equations 6.1-6.9 yield the dynamics model of the IRIS m. Motor, amplifier, and harmonic drive parameters have been derived fiom expenments and technical catalogues (Kircanski, 1995). Table 6.3 lists the simulation parameters.

For the numerical simulation, we used the recursive Newton-Euler algorithm through Cartesian tensor notation developed in (Balafoutis, 1989). A general-purpose robotic simulation software was prepared in MATLAB (version 4.2~1) environment. Furthemore, in order to denve the symbolic dynamics rnodel of the IRIS arm, the parametric equations were derived through the Lagrange-Euler approach (Craig, 1989) using MAPLE V (release 3). Appendix B contains the symbolic formulation (in MAPLE language) and the fmal parametric form of the dynamics model of the desired configuration of the IRIS arm.

6.4 FUZZY-LOGIC MODELING AND SYSTEM IDENTIFICATION

6.4.1 Experiment, Data Acquisition and Analysis

As a prerequisite to the funy logic modeling procedure, an adequate amount of system input-output data should be obtained. Needless to Say, the result of any system identification, in terms of vaiidity, accuracy, and robustness of the model, cntically depends on the expenment and the input-output data extracted fiom it, no matter whether it is based on traditional or non-traditional approaches. Our goal is to constmct the fuzy logic interpretation of the inverse dynarnics model of the 4 D.O.F.IRIS am. Therefore, refemng to equation 6.1, the system has 12 input candidates, i.e., joint displacements, velocities, and accelerations, and 4 output functions as joint torques. In order to apply the proposed methodology, as explained in chapter 1 (section 1.2.2), the entire system cmbe considered as a composition of 4 subsystems, each with one output and 12 possible input candidates. In other words, the fbzq logic model of each joint is built up separately by considenng the effect of other joints dynamics. CHAPTER SIMULATlON AND EXPERIMENT 131

The phase of data acquisition is by no means a trivial step. Many practical issues should be considered arnong which the most important ones are discussed in the following.

6.4.1.1 Setup Preparation The general plan of our experiments is to drive the manipulator joints dong different trajectones, and then measure joint displacements and torques, and to calculate joint velocities and accelerations in reai time. For this purpose, it is required: (i) to build a simple control feedback to make the manipulator perform stable behavior, and (ii) to calibrate the sensors to obtain reliable information. Figure 6.5 illustrates the control loop for die data acquisition phase of the experirnents. A simple joint displacement fecdback gain (Ki, i=1, ..A) was designed for each joint separately to maintain the stability of the manipulator during the tests.

controi torque I measured torque 1 D.O.F. I Trajectory qd 4 IRIS 9

=@ LMANIPULATOR ' 1 1 L

Differentiation

" Central znd ,'lm Differen tia tion

Figure 6.5 : The bhck diagram of the system chsed hopfor idenfijkation experimenrs

A collection of comprehensive data was obtained through a wide range of joint movement. The mechanical design of the system was closely examined and modified for this task. It was required to modify the design of joint 1 in order to strengthen the manipulator load capability. Sensor calibration and examination was also performed before the expenments (Emami, 1996). Since our system is not equipped with joint velocity and acceleration sensors, it was required to calculate these parameters on-line. A user shell was prograrnmed on the host computer using backward difference and central CHAPTER SIMULATION AND EXPERIMENT difference formulations to calculate velocity and acceleration, respectively, from the rneasured joint displacements in real time (Figure 6.5).

6.4.1.2 Test Plan In spite of extensive published research, as yet there is no global theory of experiment design, because it is much too problem-dependent (Garcia-Diaz, 1995). However, there are some basic rules that should be exarnined to guarantee the validity of the information denved fiom the expenmental results. Expenment usuaily means applying some controlled input to the system to be identified and observing its response. Four basic conditions are required for a "proper" experiment (Bohlin, 1991):

(i) CAUSALITY: Through this condition we specify which pararneter(s) should be selected as fûnction(s) of other parameters. Matis observed in an expenment is always a covariation, Le., a simultaneous variation of the parameters. What is needed for a control application is cousolity which exhibits sornething more than a covariation. It must be possible to state that the input causes the output to Vary in a certain way, defined by a model. In our application, two sets of joint torque data are obtained: joint control torque generated by the computer based on joint displacement errors; and dynamic joint torque measured by the torque sensor. The causality condition implies that the joint control torque data should be considered to be the identification parameter. In our case, the measured torque can not be an identification variable since it is neither a cause nor an independent effect of the system behavior as are joint displacements, velocities and accelerations. The causality condition also implies which parameters in the closed-loop expenment should be considered as cause (system input) and which ones as effect (system output). In a closed-loop experiment, there are obviously causal dependencies in both directions. However, if the control signal is generated by a computer, as in our case, then due to the physical system delay, the consequence of "system state" and "control si@ generation " is closer in time than the consequence of the "control signal " and the new "system state". Hence, it is more appropriate to consider the system state (joint displacements, velocities and accelerations) the model input and the control signal (joint CHAPTER SIMULATlON AND EXPERIMENT

control torque) the output. This is already defined by the inverse dynamics mode1 of the system.

(ii) SUFFICIENT EXCITATION: In order to ensure that the excitation during the identification experiment coven the entire applicable range of system inpudoutput variables, the input signal must be sufficiently stimulating. In other words, the experiment should excite at lest dl modes of the system that may be excited when the model is used, in the same range of variation. A zero-mean white noise signal would be an ideal case for dl input parameten since it was proved that it is persistently exciting the system of any order (Van Den Bosch, 1994). However, due to physical limitations, high-fiequency excitation is not ailowed. For robot manipulators, random joint trajectories that cover the desired range of input/output parameters are suggested as "proper" input signais (Gautier, 1992) provided that joint velocity and acceleration do not exceed the physical limitation of the system. In our application, we generated these trajectories by an interactive program prepared in MATLAB environment. Moreover. in order to enrich the obtained information, we also tested the manipulator for several step joint trajectories and sinusoidal trajectories with different frequencies (due to system bandwidth) and maximum desired amplitude. Figures 6.6-6.8 illustrate some of the inpur joint trajectories generated for data acquisition.

(iii) REPEATABILITY: While suficient stimulation would ensure that the input signal will Vary enough to ensure the validity of the model within a suficiently wide domain, another condition is required to make certain that the same system output (within an acceptable range of disturbances) is obtained for repeated experiments. Jn our application, reproducibility tests were performed, and as a result, joint displacements, velocities and control torques were found to be quite repeatable. However, as expected, the noise spectrum of the calculated joint accelerations was high and sorne post-processing is required, as will be discussed in section 6.4.1.3. JOINT #2 I

- -- O 10 20 JOINT #3 JOINT #4

O 10 20 O 10 20 TlME (sec) TlME (sec)

Figure 6.6 : Some random trajectoriesfor the idenr~jicationtests

JOINT #2

O 20 40 JOINT #3 JOINT rW

I I O 20 40 O 20 40 TIME (sec) TIME (sec)

Figure 6.7 :Some sinuîoidal rrajecroriesfor the identification tests CHAPTER SIMULATION AND EXPERMENT 135

O2468 JOINT #3 JOINT #4

O2468 O2468 TiME (sec) TlME (sec)

Figure 6.8 : Some step trajectoriesfor the identrficarion tests

(iv) SEPARABILITY: This condition States that the input signal to the system should be independently generated, or at most, be influenced by the past and present system output only. A closed-loop expenrnent does satisfy this condition. It should be verified however that the channels transmitting input and output data do not have any cross-interference. This condition was also examined closely in our application. Al1 rneasured and calculated parameters satis& it except for the measured joint torque. The joint sensor is highly sensitive to environmental parameters such as temperature and power ON/OFF situation. Figure 6.9 shows the bias signal of one of the torque sensors when the motor power changes from OFF to ON position. Fortunately, as discussed before, measured torque signal is not applied to system identification directly, and as will be discussed in section 6.4.1.3, this data is used only to estimate the maximum meaningful bandwidth of the sample data and the maximum joint acceleration spectrum. CHAPTER SIMUUTlON AND EXPERIMENT 136

Figure 6.9 : Power OAVOFF eflect on the torque sensor output

6.4.1.3 Data Selection and Processing One of the advantages of the proposed rnethodology is that, unlike classical approaches, there is no assurnption of zero-mean signal. hence there is no need to remove the trend and outliers in the data. Furthemore. scaling is not required for our algorithm. either. However, the following data processing steps are usehl for the subsequent tasks:

(i) Sampling Frequency: For data collection, we would Iike to sarnple as fast as possible. since choosing a low sarnpling frequency may lead to Ioss of information. k Lewer Bad -nAe qling&queny is obtained_framShan~nonssampkng ae-m. which States that in order to recover a continuous-time signal exactly. the sarnpling frequency os should be chosen such that the signal does not contain any useful fiequencies above the Nyquist fiequency os/Z.By considering the power spectral density of the measured joint torques, the highest useful bandwidth can be obtained. Figure 6.10 illustrates a sarnple power spectrum estimate of the measured torque for a random trajectory. As a result of this analysis, Nyquist fiequency around os/2=[20-301Hz determines the width of the meaningful bandwidth in our expenments. Therefore, a data sampling frequency of o,=100 Hz is quite sufficient for our application. CHAPTER SIMULA TION A ND EXPERIMENT 137

FREQUENCY (Hz)

Figure 6.1 0 :Power specrrum esrimare ofjainr #I rneasured rorque for randonz trajectory

(ii) Low-Pass Filtering: The second denvative of joint displacement signal contains a wide-band noise. Using input data with high bandwidth for system identification makes the mode1 too sensitive with a higher error variance. Therefore. it is desirable to filter the acceleration signal within an appropriate range of frequency. The rneasured joint torque signal can be a useful hint to speciQ the maximum meaningful frequency of the acceleration of each joint. What the torque sensor measures is the torque load applied on each joint as a result of the dynarnics of al1 joints. Hence, this signal contnins the effect of joint accelerations, as well. As a result, spectral analysis of torque signal provides a suitable cut-off frequency for filtering the calculated joint accelerations. As an example, Figure 6.1 1 illustrates the measured joint torque and calculated joint acceleration for a sinusoidal trajectory with fiequency 0.5 Hz. The power spectm estimate of two signals is show in Figure 6.12. For the torque signal, the major energy spectrurn is below 10- 15 Hz According to the above discussion, this is an appropriate cut-off frequency for filtering the acceleration signal. We used a Butterworth low-pas filter to eliminate the effect of higher kequencies. Figure 6.13 shows the filtered acceleration signal used for system identification. The above procedure was perfomed for al1 joints and trajectones. CHAPTER SIMULA T'ONAND EXPERIMENT 138

------.-,_;,------1------I II------; ------I I 1 I 5 1 O 15 20 25 llME (sec)

Figure 6.1 1 : Measured torque and calculared accelerarion of join f X-l for sinwoidal trajecrory

Measured Toque

Calculated Acceleration i= 108 c/l D= 106 2 2 104 s w 10' a 5 loO a 0 10 20 30 40 50 FREQUENCY (Hz)

Figure 6.12 : Power specfmesrimation of the measured torque and calculared acceleration of joint X( for sinuso idal trajecro~ CHAPTER SIMULA TION AND EXPERIMENT

TiME (sec)

Figure 6.13 : Fihered accelerarion dura

(iii) Data Selection and Categorization: The sampling frequency for system identification is not necessarily as high as sampling frequency for data collection. In fact. as discussed before, in order to reduce the sensitivity of the modei to noise. it is recommended to choose a sampiing Frequency less than osfor the identification. Also. it is desirable to reduce the amount of data used for identification. For reduction of sampling frequency, first. we implemented a Buttenvorth low-pass filter with cut-off

fiquencyarmnd Nyquistfreq~enc~0~/2~inordo @ prevent aJigin_g -effects. ------Then we reduced the nurnber of data carefully such that the main information contained in the signal was not damaged. This procedure depends on the signal and the applied trajectory, and was performed for al1 experiments. Finally, the resultant data fiom a11 experiments (random, sinusoidal, and step trajectories) were combined and categorized for three purposes: a) Training Procedure :Construction of the fuay structure (IF-THEN rules). including output clustering, significant input selection, and input/output membership assignment, is based on this set of data. As a sarnple, figure 6.14 shows the applied training data set for joint 1. CHAPTER SlMULATlON AND EXPERIMENT 140

-20 I O 2000 4000 6000 8000 10000 12000 14000 NUMBER OF DATA Figure 6.14 : Training output torque data forjoint #i

b) Tuning Procedure: Parameters of the inference mechanism and inputloutput membership functions are adjusted using this set of data. c) Validation Procedure: A separate data set is used to evaluate the validity of the model.

6.4.2 System Identification Procedure

Afier data preparation, we are now ready to follow the proposed fÜzzy logic system identification algorithm (Figure 4.7). As a first step, the output data, Le., joint control torque, should be clustered. For this purpose, suitable weight exponent (degree of fuviness of the rules rn in equation 3.1) and number of clusters (number of rules required to express the system behavior, c in equation 3.1) shouId be specified. Figure 6.15 illustrates the index trace(ST) (equation 3.17) for the output torque data of IRIS joints. The appropriate magnitude of rn is selected within the reliable domain. The index s, (equation 3.19) for selection of the optimum number of clusters, based on the selected rn, is also show in Figure 6.15. The identified values of m and c are listed in Table 6.4. Having these values, we are able to cany out the clustering and classification of the output data, and to derive the membership hnctions of the rule consequent. CHAPTER SIMULA TlON AND EXPERMENT 141

x IO' JOINT $2

u 1 2 3 4 5 6 7 weight exponent (rn) x 104

-8) 1 2345678910 number of clusten (c) nurnber of clustefi (c)

JOINT #4

" 1 -7 3 4 5 6 7 weight exponent (m) x 10'

1 4 1 345678910 2345678910 number of clusten (c) number of clusten (c)

Figure 6.15 : The fu=ziness and clurrer validi. indices for IRIS joints

Weight Number of Number Vanables a Exponent Clusters of Rules P 9 P r qd 1,qdd 1, JOCNT X1 2.8 4 0.484 1.043 3.38 0.218 ' qdd2,qdd3,qddJ qd2,qddZ JOINT #2 2.5 J 0.955 20.00 1.68 0.153 gdd 1,qdd3,qdd4 q 1,@,qd3,qdd3, JOiNT #3 2.2 5 5 0.530 1.59 4.97 1.00 qddl ,qddt,qdd4 JOMT if3 2.5 6 qdd,qddt,qdd' 6 2.98 9.99 3.63 0.046

Table 6.1 : Frc-y-logic model specifcations of the IRIS orrn CHAPTER SIMUU TlON AND EXPERIMENT

Identification of the most significant input variables for each joint is the next step that was carried out according to the proposed approach introduced in chapter 4 (section 4.2). As a sample of results obtained in this stage, the following values of R (equation 4.3) were obtained for joint 1 :

Obviously, variables q , ,q , ,q, ,q, ,q, are more dominant arnong the twelve candidates. The effective input parameters for each joint are also listed in Table 6.4. This selection is consistent with physicd understanding of the system dynarnics. For ail joints, accelerations and corresponding joint velocities are obtained as more important input variables. Because of the gravity effect, joint 3 also contains its displacement as a significant parameter. However, the effect of q, on joint 3 is not quite understandable although the data clearly indicate this effect. The input membership functions were obtained through thz proposed funy line clustering algorithm (section 4.3 of Chaper 4).

At this point, the structure of the îûzzy logic model of the system has been identified. The next phase is to identify the appropriate reasoning parameters and to tune the inputloutput mernbership functions, as explained in chapter 4. This phase was carried out using the second set of expenmental data. The optimum reasoning parameters are listed in Table 6.4. Figure 6.16 presents the final fuay-logic model of the 1 D.0.F IRIS robot. Compared with the symbolic model (Appendix B), simplicity and capability of expressing the system behavior is obvious from the funy-logic model. CHAPTER SIMULATlON AND EXPERIMENT

1 JOINT #1 1

Figure 6.16 : Frcz-iogic mode1 of the 4 D.O. F IRIS am CRAPTER SIMULA TONAND EXPERIMENT

JOINT #3

LI' "2. .--

Figure 6.16 (cntd.) : Fuu.7-fogic mode1 of the 4 D.O.F IRIS am CHAPTER SlMUiA TION AND EXPERIMENT 145

6.4.3 Fuzzy Mode1 Validation

In order to evaluate the identified hiPy logic model, we use a separate set of expenmental data. In this research, it is suficient to perform a subjective model evaiuation by considering the mode1 output for a new set of expenmental data. We perform a cornparison study for the analytical simulation and the heuristic funy modeling technique of Sugeno-Yasukawa7s algorithm (Sugeno, 1993).

Figures 6.17, 6.18, and 6.19 illustrate joint control torque for different trajectories, obtained fiom the expenment, the proposed model, analytical simulation, and Sugeno- Yasukawa7s algorithm. The better performance of the proposed fuzzy-logic model is clearly observable for al1 joints and trajectories compared with the analytical simulation and heuristics fuzzy modeling. While the capability of modeling system behavior is unifom for al1 joints and trajectones in our fuzzy-logic model, the outcome of the analytical simulation critically depends on Our knowledge of the system phenomena. For instance, the behavior of joints 2 and 3 is more complicated due to the weight effect, undesired backlash and friction. It is difficult to accurately mode1 these phenomena and therefore, the simulation of these joints is quite degraded. By the same token. random and step trajectones are more difficult to mathematically model. since they excite higher modes. Despite simple interpretation of system behavior. Our funy-logic model possesses better accuracy and more capability of capturing the actual system behavior than mathematical simulation. Heuristic inference mechanism, funy clustering, and membership assignment in Sugeno-Yasukawa's algorithm make it inefficient for modeling complex real problems, as concluded fiom the results. By introducing a systematic methodology, the above deficiencies have been eliminated, and as a result, a satisfactory modeling performance is gained. CHAPTER 733 SIMULA TlON AND EXPERIMENT 146

JOINT #1 JOINT #2 loof 1

FU- Model System I-

-8 O 5 10 15 20 25 O 5 10 15 20 25 -. 5 Simulation Simulation 4

-u O 5 1O 15 20 25 10 - Sugeno's Model 8

I I O 5 1O 15 20 2f O 5 1O 15 20 25 TlME (sec) TlME (sec) Figure 6.1 7 : Cornparison of the IRIS nrm experintental data ami differenr modeling approaches for a rundorn imjectory CHAPTER SIMULA TION AND EXPERIMENT 147

JOINT #3 JOINT #4

System

Sugeno's Model 1 Sugeno's Model 1

4 1 O 5 10 15 20 2 5 5 10 15 20 TlME (sec) TlME (sec) Figure 6.17 (cntd.) : Coniparison of the IRIS arm experintental data and different niodeling approaches for a ran dont frnjectory CHAPTER SIMULATlON AND EXPERIMENT 148

JOINT #1 JOINT #2 100 T+.

5 Sugeno's Model 4

1 3- ',

-1 01 1 i fi 8 io ii 14 /6 O 2 4 6 8 10 12 14 16 TlME (sec) TlME (sec) Figure 6.18 : Cornparison of the IRIS arnt experimental data and dif/erent modeling approaches for a sinusuidal tmjectory CHAPTER SIMULA TlON AND EXPERIMENT 149

JOINT #3 JOINT #4

#!

1 Simulation ] -2 O 2 4 6 8 10 12 14 16

*3'51Sugeno's Model [ -4 -2P 1 O 2 4 6 8 10 12 14 16 O 2 4 6 8 10 12 14 16 TlME (sec) TlME (sec) Figure 6.18 (catd.) :Cornparison of the IRlS arm experimenral data and d@erenr mode1ing approaches for a sinusoidaf trajectory CHAPTER SIMULATION AND EXPERIMENT 150

JOINT #1 JOINT #2

Fu- Mode1 )System

7- 8 - Simulation Simulation 15

1 1 Sugeno's Model 1 Sugeno's Model 6

$1 I O 2 4 6 8 10 TlME (sec) TlME (sec) Figure 6.19 :Cornparison of the IRIS orni experimerital data and dflerenr ntodeling opproaches for a siep trajectoty CHAPTER SIMULATION AND EXPERIMENT 151

JOINT #4

15 Sugeno's Mode1 10- i

-25l 1 -e O 2 4 6 8 10 O 2 4 6 8 10 TlME (sec) TlME (sec) Figure 6.19 (cntd.) :Cornparison of the IRIS arm experinretrtal data und dzflerent nrodel ing approachesfor a step trnjectory CHAPTER SIMULA TlON AND EXPERIMENT 152

6.5 FUZZY-LOGIC CONTROL

6.5.1 Design andAnalysis

In the proposed methodology of designing funy control niles, referring to conditions 5.52 of chapter 5, three system parameten should be specified in advance namely p , -m and m. Equations 5.56 and 5.57 indicate the relationships between the values of these parameters. ln order to derive the values we used al1 the expenmental data of the training, tuning and validating procedures. First, we obtain the funy mode1 error vector AF (equation 5.33) and calculate its nom. Figure 6.20 shows the error nom for some of the validating data. According to equation 5.56, the value of p should be the upper bound of the error domain. Theoretically, it is possible to identify p as a function of system states, using the proposed fuuy-logic modeling approach, and then to apply the identified IF-THEN rules for calculating p at each system state. However, in order to avoid complexity, we select a constant value as an upper bound for the most of experimental data. From figure 6.20, a value of 0.5 was assigned to this parameter. Next. we speci. the lower and upper bounds of the inertia tensor M (equation 5.16) from the expenmental data using equation 5.57. For each set of {q . q . q} obtained from the experirnent, the fuuy mode1 output F(q,q. q) and the output F(q.q.0) for the same state but zero acceleration were obtained. and then the following inertia value is calculated:

NUMBER OF DATA Figure 6.20 : Error nom of AFfor some of the validating data CHAPTER SIMULATlON AND EXPERMENT 153

I O 500 1000 1500 2000 2500 NUMBER OF DATA

Figure 6.2 1 : The value of the inerria 7 for sorne of the experimentul dm

va=--ii 'Mq - ii '[qq, q? q) - ~(q,q?~)] Il4 ' lld2

Figure 6.1 1 shows for the expenmental data from which a proper estimation for g and - m is 0.05 and 0.3, respectively.

The next step is to assign suitable values for design parameters hl . qi . and Oi (i=l .....4). We intend to increase the bandwidth hi to reduce the effect of uncenainties in the system. However. it should be far enough from the unrnodeled fiequencies such as the ones due to the time delay of the actuators. and fiom the real-time control loop sarnpling frequency. As explained in chapter 5. a suitable value of Ài is that:

where, r, is the largest unrnodeled time delay. and r, is the control loop sampling rate. The sampling fiequency of the control loop is set to be 500 Hz. which is fast enough such that it is not an actuai limitation for h . The unmodeled time delay is difficult to estirnate from our black-box modeling approach. However. since we filtered the experimental data by a cut-off frequency equal to 50 Hz. it is a reliable start to choose À, = 50/3 for al1 CHAPTER ka SlMULA77ON AND EXPERIMENT 154

joints. During the expenments, we gradually increase )ci, each joint at a time, to reach a maximum possible value. Table 6.5 Iists the final specified values of hi. The design parameter qi , as discussed in chapter 5, controls the duration of the transient response of the system. For fast response, a high value of q, is recornrnended. However, by

increasing qi we also increase the maximum value of u, which is limited by the

amplifier current range. In our application, the total control signal is limited to 20 Nm,

and we consider 20% of this amount to be the robust control signal tic,. Based on this criterion, the highest value of qi for different joints is denved and listed in Table 6.5.

The parameter @, is another design parameter that affects the system stability. A desired critically darnped performance in the dornain of [-ai,+Oi] assigns the values of

to be equal to , as discussed in section 5.2.4 of chapter 5. The adjusted ai (uCi) mM values of ai are also listed in Table 6.5.

Membership functions of the sliding variable s and the robust control signal rd, are obtained based on the selected values of design parameters, and based on discussions in section 5.2.4 of chapter 5. Figure 6.22 shows the stability region of the IRIS joints and the desiçned piece-wise robust control signals and the associated membership fünctions of the hzzy control rules for four joints.

1 JOINT #1 1 20 ( 1.0 ( 3.3 I JOINT #2 20 1.O 3.3 1 JOINT #3 1 25 1 1.5 1 2.76 I

Table 6.5 :Design parameters for the IR/S am CHAPTER SIMULATION AND EXPERIMENT 155

JOINT #l

INT #2

-3 -2 1 O 1 2 3 s (rads) JOINT

Figure 6.22 : Robtutfi<=-~control charac~erisficsand membership fincrions for the IRIS arm CHAPTER SIMULATlON A ND EXPERIMENT 156

6.5.2 Experimen ta1 Results

Similar to the identification phase. several desired traj ectories such as random, sinusoidal, and step were used expenmentally to produce different accelerating, uniform speed, and decelerating motion segments. In order to be able to assign displacement, velocity and acceleration of each path segment, we used fifth-order polynomials for path segments of random and step trajectories. Hence, each segment is planned as follows:

and q, q, , qa and q,, q , q are joint States at the beginning and end of each segment, respectively, and tf is the desired time to pass the segment.

For each trajectory, two control schemes, the proposed fuuy-logic control and a high- gain PID control, were irnplemented and the results were compared. Figures 6.23, 6.24. and 6.25 illustrate the tracking performance of these controllers for typical random. siriusoidal, and step trajectories, respectively. For each trajectory and each joint, the displacement error and velocity error are show with the corresponding applied input control torque. PID gains were designed for each trajectory, separately, and adapted for different trajectories in order to provide high gain performance. On the other hand, the design parameters of the proposed fuzzy controller were fixed for al1 trajectones. CHAPTER SIMULATION AND EXPERIMENT 157

JOINT #1 JOINT #2

-100; 5 1O 15 20 1 -100~ 1 25 5 1O 15 20 25 FU= C ONTROL 1 FUZZY CONTROL

-0.4 1 1 O 5 10 15 20 25 PID CONTROL PID CONTROL 1, i

1 1 5 5 1 O 15 20 25 C FU& CONTROL

, 1 O 5 10 15 20 25 PI0 CONTROL PID CONTROL - 20[ _y> il4 1 I

FUZY CONTROL l FUZZY CONTROL 10 C 1

1 1 5 10 15 20 25 PDCONTROL 1 PID CONTROL

1 O 5 1 O 15 20 25 TlME (sec) TlME (sec)

Figure 6.23 : Cornparison of rhe proposedfrc-?> conirol und PID conrrol of rhe IRE arm for randorn trajectoty CHAPTER SIMULA TlON AND EXPERIMENT 158

JOINT #3 JOINT #4

1 -1wl i O 5 i O 15 20 25 O 5 10 15 20 25 FUZMCONTROL FUZZY CONTROL 0.5.

-0.4 1 O 5 10 15 20 25 O 5 1O 15 20 2: PID CONTROL PID CONTROL 15, 1 2,

-2 1 I O 5 10 15 20 2t FUZZY CONTROL

> -70' 1 O 5 tO 15 20 25 PID CONiROL Pl0 CONTROL 40 rn I - 0 ".m 1

t UUTLUN t KUL

-21 1 O 5 IO 15 20 25 O 5 10 15 20 25 PO CONTROL PID CONTROL - 2, 1

I -2' I O 5 1O 15 20 25 O 5 10 t5 20 25 TlME (sec) TlME (sec)

Figure 6.23 (cntd.) :Cornparison of the proposedfrc-y conrrol and PID contrul of the IRIS armfor random trajectory CHAPTER SlMULATlON AND EXPERIMENT 159

JOINT #1 JOINT #2 100 T 1

I I I Y L , I -1 L 1 -1 O 5 10 15 20 O 5 10 15 20 PD CONTROL PID CONTROL

- O 5 10 15 20 FUZM CONTROL

L -20l 4 O 5 10 1 S 20 PID CONTROL PI0 COMROL

P -50l I l I O 5 10 15 20 FUZZY CONTROL

-201 I I I " O 5 1 O 15 20 O 5 10 1s 20 PlD CONTROL PID CONTROL

I I l I O 5 10 15 20 TlME (sec) TlME (sec)

Figure 6.24 : Cornpurison of rhe proposedJu--? controi and PID control of the IRIS arnr for sinusuidal trajectory CHAPTER SIMULATION AND EXPERIMENT 160

JOINT #3 JOINT #4 100. I 1

5 10 15 20 I i-ULLY CONTROL

-1 1 ' J O 5 10 15 20 PID CONTROL 1 PU) CONTROL

FUZLY CONIROL FUZLY CONTROL

O 5 10 15 Pli3 CONTROL

I

.------.------*----r------.--**------1 I I

I 5 1 O 15 20 O 5 1O 15 2t

- 0 E l 5 IO! ----...... :-..------L -----*---- .: ------

PO CONTROL PID CONTROL - 5 c I I

% I 1 -151 I 1 O 5 10 15 20 O 5 10 1s 20 TlME (sec) TIME (sec) Figure 6.24 (cntd.) : Cornparison of the proposedftcy control and PID control of the IRIS amfor sinusoidaI trajeciory CHAPTER SIMULATION AND EXPERIMENT 161

Figure 6.25 :Comporison of the proposedficy control and PID control of the IRIS amfor siep Irojectory CHAPTER SiMULATION AND EXPERIMENT 162

JOINT #3 JOINT #4

1 -1wl ! 5 1O 15 20 25 O 5 10 15 20 25 1 FUZZY CONTROL l r' FUZMCONTROL

L 1 5 tO 15 20 2! PID CONTROC 4 ,.

-- 5 10 15 20 21 t FUZZY CONTROL 11 FUZZY CONTROL

1 O 5 1O 15 20 25 PID CONTROL II PID CONTROL

A

5 10 15 20 25 FUZZY CONfROL

PID CONTROL

-4 1 1 O 5 10 15 20 25 TlME (sec) TlME (sec)

Figure 6.25 (CU td.) : Cornparison of the proposed fu---y conno[ and PID conmol of the IRIS urm for step trajectory CHAPTER SIMULA T10N A ND EXPERIMENT

6.5.3 Cornparison study of the results

Generally, tracking errors depend on the desired trajectory. As can be observed from the results, the proposed funy-logic controller outperforms the servo controller for al1 different trajectories. For faster trajectories such as the desired step trajectories shown in Figure 6.25 and then the sinusoidai trajectory shown in 6.24, nonlinear dynarnic effects are dominant, and hence, better performance of the funy control becomes more significant thanks to the embedded knowledge of system dynamics. For a ismoothero' trajectory like the random trajectory shown in Figure 6.23. füzzy control still provides better tracking performance, while the servo controller can also perform satisfactonly in the absence of high joint dynarnic interactions. By the sarne token, the control input torque of funy and servo control schemes are cioser to each other when nonlinear dynamic effects are less significant. as we observe for the random trajectory in Figure 6.23. On the other hand, for step and (fast) sinusoidal trajectories. the Fuay control input contains more uncertainty compensation signals and therefore is significantly different from the servo control input. Small oscillations are observed for the fuPy convol torque signal that are due to robust sliding mode characteristics provided to cornpensate friction. flexibility, backlash, and other system uncertainties. The amplitude of these high- frequency signals are quite small so as not to cause chuttering. Therefore. the overall system behavior remains smooth. The best performance was achieved for the sinusoidal trajectory as shown in Figure 6.21. This is mainly due to the complste knowledge of the controller about system sinusoidal behavior as it cm be inferred fkom the outcomr of the identified funy mode1 in Figure 6.18. Displacement and velocity erron of the fkzzy controller response to the step trajectory in Figure 6.25 illustrate a façter and a still more accurate performance than the PID control. However, more torque should be applied in this case which leads to more control signal saturation. This basically implies that the desired step trajectory is sornewhat beyond the physical ability of the system. The first ovenhoot of the joint error at each "'jurnp" illustrates the above fact.

We must emphasize this point that, unlike the parameters of the pioposed fuz~~ control, PID gains were adjusted for each trajectory separately. As an example, the CHAPTER SIMULA TION AND EXPERMENT 164

proportional gain of the servo controller of joint 2 for a step trajectory is three times as high as the one for a random trajectory. Trajectory dependent gain adjustment was performed to assure the best achievable performance for the servo control.

In sumrnary, a better performance was achieved, both in terms of joint displacement and velocity tracking, by the proposed fupy-logic control cornpared to high-gain sento control for al1 desired trajectories implemented in the experiment. The major part of this outperformance is attributed to the embedded knowledge of the system behavior. The simplicity of the proposed controller makes it easily applicable as servo control while the performance resemb les perfect ro bust model-based control schemes. CONCLUSIONS AND FUTURE RESEARCH

7.1 CONCLUSIONS

This research was an attempt to construct a systematic framework for a new paradigm of modeling and control of complex systems. By expioiting the concept of '~iuiness"in the definition of real-world phenomena. and by applying the rnethod of "approximate reasoning" to deduction of results from observations. the new paradigrn provides a strong potential for interpreting and manipulating ill-defined systems- those that are too complicated to be modeled by andytical rnethods. Nevertheless. without a concise methodology. this potential cmnot be iùily exploited. and remains as a heuristic and ad hoc technique it has been so far.

This research was an opening to a new approach of fuzzy modeling and control: a systematic and algorithmic approach. The result is significant: we hypothesized and dernonstrated that, although "approximation" is inherited in fuzzy modeling and control. based on a fm theoretical ground, we can achieve more "accr

our expectations from traditional approaches (analyticai methods) should be limited by the degree of complexity of the system. Beyond a threshold, we must employ new paradigrns such as the fuzzy-logic approach if we demand simple and relevant interpretation, and high accuracy and satisfactory performance, at the same time. However. Our main conclusion is that this is possible only with the help of a systematic framework.

Along this route. we contributed three major efforts:

(i) we proposed an algorithm for modeling and system identification of complex systems,

(ii) we eliminated most of the heuristic aspects of fuuy reasoning and classification in fuzzy modeling and control,

(iii) we constructed a structure for fuzzy-logic control of complex systems by using their fuzzy-logic models, and proved its stability and robustness.

Through the above contributions. we produced results that are very useful in the related fields. These are as follows:

A unified parameterized reasoning formulation which has a continuous range of variation among different known inference formulations.

An improved hzzy c-means clustering algorithm that cm specifj the optimum degree of fuzziness and number of clusters. and is more efficient in finding initial location of cluster centers.

A new stratejq of recognizing the most dominant input variables of a system. and assigning their input membership functions from the output space partition.

A generalized formulation of sliding mode control of a class of nonlinear multi- input multi-output systems.

Application of a methodology to "real" systerns is the best proof of its validiy and usehilness, and robotics is a challenging field for modeling and control approaches. We CHAPTER CONCLUSlONS AND FUTURE RESEARCH

obtained significant results by applying Our methodology to a 4 degree-of-freedom robot manipulator, both in modeling and control. The output of the proposed fuzzy-logic model was supenor to the output of a "complete" simulation and that of a heuristic fuuy model for different kinds of inputs. The fuzzy-logic control system also had a better performance in following different trajectones than high-gain PDcontrollers.

7.2 FUTURE RESEARCH

This work is, by no means. the final destination of the research in rhis subject. Each edge of this thesis has the potential to grow. We mention some of the hure research directions in the following:

* The concept of "fifrtiness" that we applied to modeling and control is the first order of fuzziness in which the definition of membership functions is crisp. The theory of higher order fuzzy sets has been developed in the literature (Turksen. 19953). and it would be a fniitful effort to exploit the results for system modeling and control.

=, The proposed unified reasoning formulation is for physical systems with "crisp"

inputs. We desire to extend this formulation to the case of "fri-" inputs. This extension is particularly useful for medical. environmental. and business applications.

In fuzzy clustering. we chose an Euclidean nom for definition of "distance". There are alternative norms that could be applied to fuzzy clustering. in fact. we intend to develop an index for assigning the optimum nom for the clustering problem based on the data. a An important issue in system modeling and identification is the "robnutness" of the model. Robustness in this context means that how far we can trust the mode1 for new data. and how we can guanntee a satisfactory accuracy for new inputs. in classical system identification. there are some guidelines which we tried to apply in Our application. However. this needs more investigation in the context of hizzy modeling.

* For the robust fuzzy control rules. we applied a simple reasoning formulation because of the simplicity and applicability. and because the main focus in the control structure CHAPTER CONCLUSIONS AND FUTURE RESEARCH 168

was on the system dynamics model. Although the results were satisfactory. it is a useful research to exploit the generalized reasoning formulation for robust control rules to see if we can provide a better performance within the "robnsmess region".

3 Many nonlinear and model-based control algorithrns have been suggested for robotics application (Liu. 1995). We intend to compare the performance of the proposed controller with that of the other algorithrns. Furthemore. we applied the fuzzy controller to a "trajectory" control problem. and it is desirable to extend the results to the "force" control problern.

=, The proposed methodology is a genenc tool that can be applied to modeling and control of any complex systern and process. We look fonvard to exploiting this methodology for more complicated applications.

AND, THIS LIST XEVER ENDS. REFERENCES

Almuallim H.. Dietterich T.G.;"Learning with many irrelevant features"; Proceedings of The Ninth National Conference on Anificiul Intt.lligence: pp. 547-552; 199 1

Aracil J., Garcia-Cerezo A.. Ollero A.; "StabiIity analysis of fuuy control systems: A geometrical approach"; in "AI Expert Systems and Lanpages in Modeling and Simulation", (KuIikovsky C.A.. Huber R.M., Ferrate G.A.. eds.); Amsterdam; North- HoIIand; pp. 323-330; 1988 kacil J.. Garcia-Cerezo A.. Barreiro A., Ollero A.; "Design of expert fuzzy controllers based on stabiIity criteria": Proceedings of the IFSA '91: Brussels; 199 1

Backer E., Iain A. K.; "A clustering performance measure based on fuzzy set decomposition": IEEE Transactions on Pattern Anabsis and 1tfachine Intelligence; Vol. PAMI-3: No. 1; 1981

Balafoutice C.A., Patel R.V.. Misra P.; "Efficient modeling and computation of rnanipulator dynarnies using orthogonal Cartesian trnsor"; IEEE Journal of Robotics and Artornafion: Vot. 4; No. 6;pp. 665-676; 1988

Barone J., Filev D. P.. Yager R. R.: "Mountain mechod-based fuzq clustering: kIethodologicd considerations"; Technical Report #MU-1320: AMachine Intelligence instinite; Ionri College; New RocheIie; -hW;1993

Begon P.. Pierrot F.. Dauchez P.: "Fuzzy sliding mode control of a fast pmllel robot"; Proceedings of IEEE ~nrernationalConference on Robotics and Arrtornation: pp. 1 178- 1183; 1995

Bellman R., Giertz M.; "Ori the analytic formalism of the thcory of fuzzy sets"; Information Sciences; No. 5; pp. 140- 156; 1973

Bezdek J.C.; "Fuzzy Mathematics in Pattern CIassification"; Ph.D. dissertation; Corne11 University; Ithaca; NY; 1973

Bezdek J.C.; "Cluster validity with hzzy sets"; Joirrnal of : Vol. 3; No. 3; pp. 58-72; 1974 Bezdek J.C.; "Mathematical models for systematics and taxonomy"; Proceedings of 8th Inremrional Conference on Numerical Taxonomy; San Feanscisco; pp. 143- 166; 1975

Bezdek J-C., Windham M.. Ehrlich R.; "Statistical parameters of fuzzy cluster validity fùnctionds"; Inrernational Journal cornputarional and Informal Science; Vol. 9; No. 4; pp. 232-236; 1980a

Bezdek J.C.; "A convergence theorem for the fuzzy ISODATA clustering algorithms"; ïEEE Transactions on Purrern Anabsis and Machine Inrelligence; Vo 1. PALMI-2: No. 1 : pp. 1- 8; 1980b

Bezdek J-C.; "Pattern Recognition with Fuzzy Objective Function Algorithms": Plenrrm Press; NY; 1981

BohIin T.; "Interactive System Identification: Prospects and Pitfalls"; Springer-Verlag: pp. 12- 74: 1991

Box G.E.P..fenkins G.M; 'Tirne Series Analysis. Forecasting and Control"; Holden Da!: San Francisco: 1970

Braae M.. Rutherford D.A.; "Theoretical and Iinguistic aspects of the fuzzy [ogic controller": Arrtornatica: No. 15; pp. 553-577; 1979

Brenji H.R.; "Fuuy logic controllers"; in "Introduction to Fuuy Logic Applications in Intelligent Systems": Klrnr.er Acadernic Prtblishers: pp. 69-96; 199 1

Chang -M.. Davison E.J.; "New directions in industrial control: Intelligent control- an experirnental smdy applied to a multivariable hydraulic system"; in "Control Problems in Industry ", (Lasiecka 1.. Morton B .. eds. ): Proceeditzgs of SIAM Synposiurn on Conrroi Problerns; San Diego; CA; pp. 65-95; Jaly 1995

Chen J.S.. Liu C.S.,Wang Y.W.; "Control of robot manipulator using a fuzzy model-based sliding mode control scheme"; Proceedings of the 33rd IEEE Conferrnce on Decisian and Conmi: Lake Buena Vista; FL; U.S.A; Vol. 1;pp. 3506-351 1: December 1994

Cotsaftis M.; "Intelligence in control of complex robotic systems": Proceedings of IEEWRSJ

Internarional Conference on Intelligent Robots and Systerns: Japan: pp. 705-7 1 1 ; 1993

Craig J.J.: "Introduction to Robotics- Mechanics and Control"; Secong Edition: Addison-LVesley: 1989 REFERENCES 171

Dernirli K.. Turksen LB.; "Review of implications and the generalized modus ponens"; lEEE International Conference on Frizcy Sysrems; Orlando; Vol. 2; pp. 1440- 1445; 1994

De Silva C.W.. MacFarlane A.G.J.; "Knowledge-Based Control with Application to Robots"; Springer- Verlag Press; 1989

Di Gesu V., Maccarone M.C.; "Features selection and possibility theory "; Parrern Recognition; Vol. 19; No. 1; pp. 63-72; 1986

Dubois D., Prade H.; "Fuzzy and the generdized modus ponens revisited; Cybernerics

ans Sysrems: An htentarional Journal; No. 15; pp. 293-33 1; 1984

Dubois D.. Pnde H.; "Fuzzy sets in approximate reasoning, Part 1: Inference with possibility distributions"; Fu- Sers and Sysrems: No. 40: pp. 143-202; 199 la

Dubois D.. Prade H.: "Fuzzy sets in approximate reasoning, Part 2: Logicd approaches": Fit- Sers and Systems; No. 40; pp. 203-244; 199 1b

Duda R. O., Hart P. E.; "Pattern Classification and Scene Analysis"; Wilq & Sons. Inc.; 1973

Dunn 1.C.; "A Fuzzy relative of the ISODATA process and its use in derectîng compact wrll- separated clusters"; Jorimnl of fiberneries: Vol. 3: No. 3: pp. 32-57: 1974

Dunn J.C.:"Indices of pattern fuzzinrss and the detection of clusters in la~edata set": in "Fuuy Autornata and Decision Processes" (M. M. Gupta. ed.); Elsevier; W;1976

Draper N.R.,Smith H.; "Applied Regession Analysis": 2nd Edition: John LViiey & Sons. Inc.: New York; 1981

Emarni 1M.R.; "Specification tests on the [RIS m.':RilL Internai Report: 1996

Emelyanov S.V.; "Variable Structure Control Systems"; Nauka; Moscow; 1967

Fei 3.. Isik C.; "Adaptive fuzzy control via modification of linguistic variab les": lEEE Inrernational Conference on Frr:? Systerns; USA; pp. 399406; 1992

Filev D.. Yager R.R.; "A generalized defuuification method under BAD distributions*'; In fernational Jornal of In feiligenr Syxtems; No. 6; pp. 687-697; 199 1

Filev D.P., Yager R.R.; 'Three models of Fuzzy logic controllers": Cybernerics and Systems: Vol. 24; pp. 9 1- 114; 1993 REFERENCES 172

Fowlkes E.B., Gnanadesikan R.. Kettenring J. R.; "Some aigorithms for the selection of variables in hierarchical cluster analysis"; Bell Commtrnications Research Technical Mernorandum; 1985

Fowikes E.B., Gnanadesikan R., Kettenring J.R.: "Variable selection in Clustering and Other Contexts"; in "Design. Data, and Analysis" (Mallows C.L.. ed.): & Sons: 1987

Friedman H.P.. Rubin J.; "On some invariant criteria for grouping data": Journal of the American Sfaristical Association; No. 62; pp. 1159- 1 178; 1967

Fukuyama Y., Sugeno M.; "A new method of choosing the number of clusters for the fuzzy c- means method; Proceedings of 5th Frrzzy Systems Symposi~rrnfin Japanese); pp. 247- 250; 1989

Garcia-Diaz A.. Phillips D.T.; "Principles of Experimrntal Design and Analysis"; Chopman and Hall; 1995

Gautier M.. KhaIiI W.; "Exciting trajectories for the identification of base inertial parameters of robots"; The International Journal of Roborics Research; Vol. 11; No. 4; pp. 362-375: 1992

GhaIia M.B.. Alouani A.T.; "Sliding mode control synthesis using hizzy logic": Proceedings of the American Control Conference: Seattle: Washington: pp. 15%- 1532: 1995

Grace A.: "Optimization Toolbox for Use with LM~ZTLAB":The Mathrr*orkr.Inc.: 1995

Gunderson R.; "Applications of hzzy ISODATA algorithms to star-tracker printing systems"; in Proceedings of 7th Triennial World IFAC Congress; pp. 13 19- 1323; 1973

Gustafson E. E., Kessel W. C.; "Fuzzy clustering with a fuzzy covariance matnx": in Proceedings of lEEE CDC;San Diego: CA; pp.76 1-766; 1979

Hom R.A.; "Matrix Andysis"; Cambridge Universis. Press; London; 1985

Hui R., Kircanski N.M.,Goldenberg A.A.. Zhou C.. Kuzan P., Wiercienski J.. Gershon D.. Sinha P.; "Design of the RIS facility- A modular. reconfigurable and expandable robot test bec; Proceedings of IEEE International Conference on Robotics and Automation: Vol. 3; pp. 155-160; 1993

Hung J.Y..Gao W., Hune J.C.; "Variable structure control: A survey": IEEE Transacriorts on Indrisrrial Electronics; Vol. 40; No. 1; pp. 2-2 1; 1993 Ihara J.; "Group method of data handling towards a modeling of complex systems": Systenrs and Control (in Japanese); Vol. 24; pp. 158-148; 1980

Ismail M. A., Selim S. 2.;"Fuzzy c-means: Optimality of solutions and effective termination of the algorithm"; Panern Recognition: Vol. 19; No. 6; pp. 38 1-485

Istntescu V.I.; "Inner Product Structures: Theory and Application"; D. Reidel Pitblishing Company; Holland; pp. 3 17-3 18; 1987

Itlus U.; "Control Systems of Variable Structure": John Wi[ey:New York; 1976

Jain A. K.. Dubes R. C.; "Algorithms for Clustering Data"; Engfavood Cliffs; NJ; Prentice-Hall; f 988 ffirnel M. S.. Selim S. Z.; "New algorithms for solving the hzzy clustering problem"; Partent Recognition: Vol. 27: No. 3; pp. 42 1 428: 1994

Kawaji S.. Matsunaga M.: "Fuzzy control of VSS type and its robustness": Procerdings of the 3rd IFSA Congress; Bmssels; pp.8 1-88; 199 1

KeIIer J-LM.. Gray M. R., Givens J.A.: "A fuzzy k-nearest algorithm": lEEE Transacrio~isor1 5ysrems. Man, and Cybenzetics: Vol. SMC-15; No. 1: pp. 580-585; 1985

Kickert W.J. M., -Marnda.ni E.H.; "Analysis of a fuzzy Iogic controller": Fu=? Sets adS~srents: Vol. 1: No. 1: pp.29-44; 1978

Kim S.. Park M.; 'Fuzzy cornpliance robot control using multi rule-base'': lEEE I~~trrnariortal Conference on Fu:? Systems; pp. 1343- 1348; 1992

Kircanski N.M., Goldenberg A.A., Zhou C.: "A risc processor based architecture for control and evaluation of grasping and manipulation with dexterous hands": Procrrdings of IEEE Paclflc RIM Conference on Commrtnications, Computers and Signal Processi~zg:1993

Kircanski N.M.. Hui R.. Shirnoga K.. Goldenberg A.A.: "Real-time cornputational aspects of multiple manipufator systems"; Jottrnal of lnrelfigent and Robotic Syszems: Theon mid Application; L 994

Kircanski N.M.. Goldenberg A.A.. Jia S.; "An experimental study of nonlinear stiffness. hystersis, and friction effects in robot joints with hmonic drives and torque sensors": International Journal of Roborics Research: 1996 REFERENCES 174

Langari R.; "A nonlinear formulation of a class of fuuy linguistic control algorithms"; Proceedings of 1992 American Conrrol Conference: Chicago; pp. 2273-2378: 1992

Lee C. C.; "Fuzq logic in control systems: Fu- logic controller, Part II"; IEEE Transaction on Systems, Man, and Cybemerics; No. 20; pp. 419-435; 1990

Libert G., Roubens M.; "New expenmental results in cluster validity of fuzzy clustering algorithms"; in "New Trends in Data Analysis and Applications" (J. Janssen. J.F. Macrotorchino, I.M. Proth, Eds.); Amsterdam; North-Hollmd; pp. 205-2 18; 1983

Lin Y.. Cunningham G.A.; "A fuuy approach to input variable identification"; Proceedings of 1994 IEEE Conference Fu- Sysrems; Orlando, Florida. USA; pp. 203 1-7036; 1994

Lin Y., Cunningham G.A.: "A new approach to fuzzy-neural system rnodeling"; [EEE Transactions on Fu:,- Systems; Vol. 3; No. 2: pp. 190- 198; 1995

Liu G., Goldenberg A.A.; "Comparative study of robust satutation-based control methods of robot manipulaton: Analysis and experiment": Intentational Jonmal of Robotics Research; 1995

Mamdani E. H.; "Application of fuzzy algorithms for control of simple dynamic plant": Proceedings of IEEE 121; pp. 1585- 1588; 1974

Mamdani E.H.,Assilian S.; "An experiment in linguistic synthesis with a fuzzy iogic controllet": I~ttentationalJotrrnai of Man-Machine Strrdies: Vol. 7; pp. 1 - 13; 1975

Miller D.E.. Chang M.. Davison E.J.; "An approach to switching control: Throry and application": in "Lecture Notes in Conrrol and information Sciences". (Morse AS.. rd.): Vol. 222; Proceedings of Block Island Workstiop on Conrrol Using Logic-Bused Slrirching; pp. 234-247; 1996

Mizumoto M.; "Improvement methods of hzzy controls"; Proceedings of of the 3rd IFSA Congress; Seattle; pp. 60-62; 1989

Nakamon Y., Ryoke M.; "Identification of hzzy prediction rnodels through hyprrellipsoidal clustering"; lEEE Transacrions on Sv~terns,Man. and Cybenterics; Vol. 23; No. 8: pp. 1153-1173; 1994

Nakanishi H., Turksen 1. B.. Sugeno M.; "A review and cornparison of six reasoning methods": F~cySets and Systems; No. 57; pp. 257-294; 1993 Pal N. R., Bezdek J. C.; "On ciuster validity for the fuuy c-rneans model"; IEEE Transactions on Fu~ySystems; 1996 (to appear)

Pal S.K., Chakraborty B.; "Fuzzy set theoretic measure for automatic feature evaluation"; IEEEE Transactions on Systerns, Man. and Cybemerics; Vol. SMC-16; No. 5; pp. 754-760; 1986

PaIm R.; "Control of a redundant manipulator using fuzzy rules"; Fiizz~Sets and Systerns; Vol. 45; pp. 279-298; 1992a

Palm R.; "Sliding mode hizzy control"; Proceedings of the 1" IEEE Irztemationai Conference on Ftczy Sysrems; San Diego; pp. 5 19-526; 1992b

Paul R.F.; "Robot ManipuIators- Mathematics, Progmmming and Control": MIT Press; 198 1

Pedrycz W.; "Identification in fuzzy systems"; IEEE Trarzsacrions on on Systems, Man. and Cybernetics; No. 14; pp. 36 1-366; 1984

Qu Z., Dawson D.M.;"Robust Tracking Control of Robot Manipulators"; IEEE Press; New York; 1996

Ray K.S., Majumder D.D.; "Application of the circle criteria for stability analysis of linear SIS0 and MIMO systems associated with fuzzy Iogic controller"; IEEE Transactiorts on Systems. Man. and Cybentetics; Vol. 14; No. 2; pp. 345-349; 1984

Ruan D., Kerre E.E.; "On the extension of the compositional rule of inference"; /nterriariorzai Jortrrral of intelligent Sysrems; Vol. 8; pp. 807-8 17; 1993

Ruspini E. H.; "A new approach to clustering"; Ilformation Conrrol; VoI. 15; No. 1; pp. 22-32: 1969

Seber G.A.F.; "Multivariate Observations"; Wiley & Sons, Irzc.; New York; Section 6.10; 1984

Schweizer B., Sklar A.; "Associative functions and statistical triangle inequalities": Publications Mathernaticae Debrecen; No. 8; pp. 169- 186; 196 1

Schweizer B., Sklar A.; "Probabilistic Metric Spaces"; North-ltolland; Amsterdorn; 1983

Slotine f J., Li W.; "Applied Nonlinear Control"; Prertrice Hai1:Engle- Wood Cliffs: NJ; 1990

Smets P.; "Elementary semantic operators"; in "Fuzzy Set and Possibility Theory. Recent Developments" (Yager R. R., ed.); Pergarno!l Press; Oxford; pp. 247-256; 1982 REFERENCES 176

Sugeno M.; "An introductory survey of fuzzy control"; information Science; Vol. 36; No. 1; 1985

Sugeno M., Kang G.T.;"Structure identification of of fuzzy model"; Fu~ySets and Systems: Vol. 28; No. 1; pp. 15-33; 1988

Sugeno M., Yasukawa T.; "A fuuy-logic-based approach to qualitative rnodeling"; IEEE Transactions on Frcy Systems; No. 1; pp. 7-3 1 : 1993

Takagi H., Hayashi 1.; "NN-Driven fuzzy reasoning"; International Journal of Approximare Reasoning; Vol. 5;No. 3; pp. 19 1-2 12; 199 1

Takagi T., Sugeno M.; "Fuzzy identification of systems and its application to rnodeling and control": IEEE Trans. on Systems. Man. and Cybernerics; No. 15; pp. 1 16- 133: 1985

Tanaka K., Sugeno M.; "Stability analysis and design of fuzzy control systerns": Fu- Sers and Systems; Vol. 45; No. 1; pp. 135- 156: 1992

Tong R.M.; "Analysis of fuzzy control algorithms usirig the relation matrix"; Inremarional Joztrnal of Man-Machine Sizidies; No. 8; pp. 679-686; 1976

Tong R.M.; 'The construction and evaluation of fuzzy rnodels": in "Advmces in Fuzzy Set Theory and Applications", (Gupta M.M.. Regade R.K.. Yager R.R., ed.); North-Holiand; Amsterdom; pp. 559-576: 1979

Trillas E.. Valverde L.; "On mode and implication in approximate reasoning": in "Approximate Reasoning in Expert Systems", (Bandler W.. Gupta MM..Kandek A.. Kiszka J.B.. sds.); Elsevier Science Priblishers; North-Holland; pp. 157- 167; 1985

Trojan G.J., Kiszka J.B., Gupta M.M., Nikiforuk P.N.; "Soloution of multivariable fuuy equations"; Fuzy Sets and Systems; No. 22; pp. 27 1-279; 1987

Tsay T.I.J.. Huang J.H.;"Robust nonlinear control of robot manipulators": Proceedings of IEEE Intenzational Conference on Robotics and Automation; pp. 2083-2058; 1994

Turksen I.B.. Lucas C.; "A pattern matching inference mrthod and its cornpaison wirh hown inference methods"; Proceedings of IFSA '91; Brussels; Belgium: pp. 23 1-234; 199 1

Turksen I.B.. Tian Y.;"Combination of mlrs and their consequences in fuzzy expert systerns": Frrzp Sets and Systems; No. 58; pp. 3-40; 1993a REFERENCES 177

Turksen I.B., Demirli K.: "Rule and operation decomposition in CW': in "Advances in Fuzzy Theory and ". (Wang P.P., ed.); Boohrights Press: Durham: North Carolina; ; Vol. 1; pp. 2 19-256; 1993b

Turksen I.B., Tian Y.; "Constraints on membership functions of rules in fuzzy expert systems": Second IEEE International Conference Fuzy Systems; San Francisco; U.S.A; pp. 845- 850; 1993c

Turksen I.B.; 'Type 1 and interval-valued type II fuzzy sets and logics"; "Advances in Fu- Theory and Thechnology". (Wang P.P.. ed.); Duke LI. Press: Vol. ID;pp. 3 1-8 1: 199%

Turksen I.B.; "Fuuy normal forrns": Fuzy Sers and Syterns; No. 69: pp. 3 19-336; 199%

Uragami M. Mizumoto M., Tanaka K.: 'Tuuy robot controls"; Jorrrnai of Qbemerics: Vol. 6: pp. 39-64; 1976

Vafaie H., De long K.; "Robust feature selection algonthrns": Proceedings of International Conference Tools wirh Anificial ?nrelligence; Piscaraway. W.USA: pp. 356-363: 1993

Van Den Bosch P.P.J., Van Der Klaw A.C.; "Modeling. Identification and SinuIation of Dynamical Systems"; CRC Press: pp. 1 1 1- 1 15; 1994

Ward J. H.; "Hierarchical grouping to optirnize an objective function": Journal of jlrnericatz Smisrics Association; No. 58; pp. 236-241; 1 963

Windharn M. P.; "Cluster validity for fuzzy cIustering algorithms"; F1rz.7 Sers und Sysrerns: No. 5; pp. 177-185; 198 1

Windharn M. P.; "Cluster validity for fuzzy c-means clustering algorithm": IEEE Transactions on Pattern Anabis and Machine Inrelligence; VoI. PAVI-4: Xo. 1: pp. 357-363; 1982

Windharn M. P., Bock H., Wdker H. F.; "Clustering information from convergence rate": Proceedings of Second Conference of International Federarion Classification Socierÿ; Washington D.C.:pp. 143; 1989

Wohlke G.. Fatikow S.; "A systern architecture for the intelligent control of micro robotic systems"; Proceedings of JSME International Conference on Advanced Mecharronics: Tokyo; Japan; pp. 239-254; 1993

Wu J-C..Liu T.S.: "A sliding-mode approach to fuzzy control design": IEEE Transucrions o~z Conrrol Sysrerns and Technology; Vol. 4; No. 2; 1996 Xie X. L.. Beni G.; "A validity measure for fuzzy clustering"; IEEE Transactions on Pattern Analysis and Machine Intelligence: Vol. PAMI- 13; No. 8; pp. 84 1-847; 199 1

Xu Y.. Paul R.P., Shum H.; ''Fuzzy control of robot and cornpliant wrist system": IEEE industry Application Society Annual Meeting; pp. 143 I - 1337: 199 1

Yager R.R.: "On a general calss of hzzy comectives"; Fuzy Sets and Systerns: No. 4; pp. 235- 242; 1980

Yager R.R.; "A general approach to mle aggregation in hzzy logic control": Appfied Intelligence; No. 2; pp. 333-35 1 ; 1992

Yager R.R.. Filev D.P.; "Essentials of Fuzzy Modeling and Control"; John Wifev& Sons; 1994

Yager R. R., Filev D. P.; "Approximate ciustering via the mountain method"; iEETransacrions

on Systerns. Mun, and Cybernetics: 1996 (CO appear)

Yarnakawa T.;"Fuzzy controller hardware system": Proceedings of 2nd iFSA Congress; Tokyo: .lapan: July 1987

Yarnakawa Y.: "Fuzzy microprocesson- Rule chip and defuuifier chip": Irztenzarional Workrhop on FUUZ Sysrern applications: Iizuka; Japan; pp. 5 1-52; 1988

Yen J., Pfluger N.; 'Desiping an adaptive path execution system"; Procerdin,gs of IEEE lnternarional Conference on Sysrems. hfan and fiberneries: Vol. 3 : pp. 1459- 1164: 199 1

Zadeh L: "Outline of a nrw approach to the analysis of cornplex systems and decision processes". IEEE Transactions on Systems. Man, and Cybernetics. SMC-3. pp. 25-U. 1973

Zhou J.. Coiffet P.: 'Fuuy control of robots "; IEEE International Conference ori FU;? Sysrerns: pp. 1357-1364; 1992 AN OVERVIEW OF SLlDlNG MODE CONTROL

The main idea of sliding mode control is to define a "well-behaved scalar hnction of the tracking error called "siding variable" S. and then to select the feedback control Iaw such that s' remains a Lyapunov-like function of the closed-loop system despite the presence of sysrem uncenainties and disturbances. The theory of sliding mode control is based on the concept of changing the structure of the controller in response to the changing states of the systern to obtain a desired performance. This task is accomplished by a switchng control law which forces trajectories of the system onto a pre-selected manifold where they are maintained thereafter. Whde the trajectories are on the manifold. system behavior is insensitive to parameter variation. uncertainty and other dis turbances.

Consider the following single-input dynamic system:

where. q(t) = [q. cj,. .. . q'"-"Ir is the state vector. u(q; t) is the control input. and d(t) is the disturbance function. In a typical control problem. the goal of the control action is to follow (or more precisely. to converge asymptotically to) a desired state vector T qd(t) = [qd, cid,... . q l;'"], in spite of system uncertainty. parameter variation. and disturbance. The tracking error is denoted by vector e = q - q, = [e. 6.. .. . e'"-"1. A time- varying surface called sliding srirface is defined in the state space by the following scalar equation: By the above definition. an alternative geometric formulation of the tracking problem is to keep the error vector e on the surface s(q; t) = 0 . Equation A.2 represents an (n-1)" order stable linear differentid equation irnplying that the tracking error e converges exponentially to zero on the sliding surface. The scalar s is dso called the generaliced error. Bounds on s can be directly vanslated into bounds on the uacking error vector e. Assurning zero initial condition for e (the effect of non-zero initial condition can be added separately.), it cm be proved that (Slotine and Li. 1990):

As a result, the problem of tracking the n-dimensional vector qd (Le.. the original nChorder tracking problem in q) cm be replaced by a 1" order stabilization problern in S. and the corresponding transformations of performance measures are quantified by equation A.4. in the case of an arbitrary initial condition e(0) s 0. the L" order problem of keeping the scalar s at zero can be achieved by choosing control input ri such that the following

"sliding condition" is satisfied outside the surface s(q: t) = O :

or, by simple manipulations: s.sgn(s) < -q : q > O . (A.6)

4-1 : s>o where, sgn(s) is the sign function: -1 : SC0

Condition A.5 states that the squared distance to the sliding surface. measured by s'. should decrease dong al1 system trajectories resüicting them to point towards the surface s(q; t) = O. In other words, if we express the dynamics of the "slidittg mode" ( Le.. when the system moves on the sliding surface) as: s=o then having s2(q;t) as a Lyapunov function associated with the dynarnic system. equation AS is equivalent to the Lyapunov stability of the system A. 1.

The time for reaching to the sliding surface from e(0) (or equivalently. s(0)) is determined by q as:

Furthemore. as it can be observed from equations A.3 and A.8. once on the sliding surface. the tracking error exponentially converges to zero with a time constant of (n - l)/k .

In order to denve the control Iaw which satisfies the sliding condition (equation AS), without loss of generality, we consider the case of a 2ndorder system (n=2). The generaiized error and its time derivative for thiç case are

(A.1 1)

Inserting system dynamics (equation A. 1 j into equation A. 1 1 results:

s = u+ ~e+[-~,+f(qt),d(t)] . (A. 12)

In order ta maintain the dynamics 5 = 0. the control input should be:

where. u, = (ii, - Le)- f(q; t)- d(t) . (Li. 14)

Equation A. 14 is the "inverse dyamics" of the system for the case when the state acceleration q is equal to q, - Xe. in practice, Iack of knowledge. parameter variation. and other uncertainties prevent us to have the "exact' inverse dynamics mode1 of the system. Hence. the best approximation Û, of a continuous control Iaw that would achieve s = O is:

(A.15) where. f and 2 are the estimated functions off and d. respectively. However. the extent of the imprecision of û, should be bounded by a known of q and t :

where, ~f =f-f and ~d=G-d.

In order to satisQ the sliding condition despite the uncertainties. due to the discontinuous nature of equation A.6, a discontinuous term ri, should be added to the control law as: u = û, + u, = û, - K(q: t).sgn(s) (A. 17) where. K is a strictly positive function. Using this control law, the sliding condition can be rewritten as:

S. sgn(s) = (û, - u, ). sgn(s) - ~(q;t ) 5 -q (A. 18)

Installing the upper bounds of equation A. 16 in A. 18, the lower limit of K is obtained as:

Therefore. by choosing a large enough K. we cm guarantee that frorn any initial condition. the control law A.17 will take and maintain the tracking trajectory on the sliding surface approaching to the desired trajectory.

The discontinuous part ri, in A.17, which is cornrnon in robust control. reflects uncertainty and imprecision of the system. In fact, u, maintains the intuitive feedback control suategy, basically holds for the lStorder system, as: ''ifthe error is >zegative.push hard enorrgh in the positive direcrion, and vice versa". From this point we can observe a similarity between the discontinuous part of the sliding control and a fuuy-logic controller.

The discontinuous part, on the other hand, requires switching action in the control process. Due to the imperfection of switching in real life, this action will cause undesired high level of control activity such as chatterinp. Therefore, it is desired to make a "smoother" control action by introducing a "borindary iayer*' ihat contains the sliding surface. This is implemented by replacing sgn(s) by the saturation hinction sat(s/@) defined as follows:

Variable 0 is calIed the layer thickness. As a result, instead of "hard" sliding control, an improved sliding control law with boundary layer is obtained as:

where. Km> K(q: t) ; tft 2 O.

Equation A. 13. A. 14, and A.2 1 indicate that inside the boundary layer. the following filter operaùon is performed with the mode1 uncertainties and disturbances as the input and s as the output:

Furthemore, equation A.10 is also a filter with input s and output e. Combinin,* tWO filters. we will reach to a second order filter as follows:

The best tracking performance is achieved for critical darnping where the following balance condition holds:

The natural frequency )c specifies the rate of convergence on the sliding surface. and it should be less than the minimum frequency associated with the largest unmodeled time delay T, and the frequency associated with the sarnpling rate r,. A suggested criterion for selecting h is (Slotine and Li, 1990): The above two criteria for assigning k have an inverse relation: the more accurate the mode1 developed, the more computational time is required and hence the larger sampling rate should be applied. An ideal solution is to implement modeling paradi,ms that provide simple interpretation with high accuracy. This is perfectly satisfied in our hzzy-Iogic rnodeling approach.

The Inverse Dynamics Symbolic Formulation Of The 4 D.0.F IRIS Arm

Tl = ( - .2311986800 cos(q2) cos(q3) sin(q2) - .06094000000 cos(q4) cos(q2) cos(q3) sin(q2) + -004437280000 cos(q4) cos(q2) cos(q3) sin(q2) + .06094000000 cos(q2) cos(q3) sin(q4) + .O04437280000 sin(q4) cos(q4) cos(q3) - .O08874560000 cos(q4) cos(q2) cos(q3) sin(q4) t .O04437280000 sin(q2) cos(q4) cos(q2) - .O03923048000 cos(q2) sin(q2) - ,05552160000 cos(q2) cos(q3) sin(q2) sin(q3) - .03047000000 sin(q4) cos(q3)) qdl qd2 + ( - .O5552160000 cos(q3) + .O3596800000 sin(q3) - .O2776080000 cos(q2) + ,02776080000 + .06094000000 cos(q4) sin(q3) cos(q3) + .OS552160000 cos(q2) cos(q3) + ,231 1986800 sin(q3) cos(q3) - .06094000000 cos(q4) cos(q2) cos(q3) sin(q3) + .O04437280000 sin(q2) sin(q4) cos(q4) cos(q2) sin(q3) - .03047000000 sin(q2) sin(q4) cos(q2) sin(q3) + ,004437280000 cos(q4) cos(q2) cos(q3) sin(q3) - .O04437280000 cos(q4) sin(q3) cos(q3) + .4769728000 cos(q3) + .O39OOl6OOOO cos(q4) cos(q3) - .2311986800 cos(q2) cos(q3) sin(q3)) qd 1 qd3 + ( - .O04437280000 cos(q4) sin(q4) cos(q3) - .O3900160000 sin(q4) sin(q3) + -004437280000cos(q4) cos(q2) cos(q3) sin(q4) - .03047000000 sin(q4) + .O3047000000 cos(q2) cos(q3) sin(q2) cos(q4) + .03047000000 sin(q4) cos(q3) - .03047000000 cos(q2) cos(q3) sin(q4) + .O04437280000 cos(q4) cos(q2) sin(q4) - .O08874560000 cos(q4) cos(q2) cos(q3) sin(q2) + .O04437280000 sin(q2) cos(q2) cos(q3)) qdl qd4 + ( - -01950080000 cos(q4) cos(q2) cos(q3) + .O1 814026200 sin(q2) + .O02218640000 cos(q4) sin(q3) cos(q2) cos(q3) - .O1 388040000 cos(q2) - -01523500000 sin(q3) sin(q2) sin(q4) - .Il55993400 sin(q3) cos(q2) cos(q3) - .2384864000 cos(q2) cos(q3) + .O02218640000 cos(q4) sin(q3) sin(q2) sin(q4) - -01950080000 sin(q2) sin(q4) - .O1798400000 cos(q2) sin(q3) + .O2776080000 cos(q3) cos(q2) - .O3047000000 cos(q4) sin(q3) cos(q2) cos(q3)) qd2 + (.4769728000 sin(q2) sin(q3) - .O5552160000 sin(q3) sin(q2) cos(q3) - ,231 1986800 cos(q3) sin(q2) + -3142466800 sin(q2) - .O04437280000 sin(q2) cos(q4) - .O3596800000 sin(q2) cos(q3) + .O04437280000 sin(q2) cos(q4) cos(q3) + .O3900160000 sin(q3) sin(q2) cos(q4) - .06094000000 cos(q4) sin(q2) cos(q3) + .06094000000 sin(q2) cos(q4)) qd2 qd3 + (.O1 260000000 cos(q2) sin(q3) - .O04437280000 cos(q4) sin(q3) sin(q4) sin(q2) cos(q3) + .O39001 60000 cos(q2) cos(q4) - .O04437280000 cos(q4) sin(q3) cos(q2) + .O39001 60000 sin(q2) cos(q3) sin(q4) + .03047000000 sin(q3) sin(q4) sin(q2) cos(q3) + .03047000000 cos(q4) cos(q2) sin(q3)) qd2 qd4 + ( - .O02218640000 cos(q4) sin(q3) sin(q2) sin(q4) - -2384864000 cos(q2) cos(q3) - .O1 950080000 cos(q4) cos(q2) cos(q3) + -01523500000 sin(q3) sin(q2) sin(q4) - .O1798400000 cos(q2) sin(q3)) qd3 + (-008162720000 sin(q2) cos(q3) + -004437280000 sin(q2) cos(q4) cos(q3) + .O39001 60000 sin(q3) cos(q2) sin(q4) qd4 - .O04437280000 cos(q4) cos(q2) sin(q4) + .03047000000 cos(q2) sin(q4)) qd3 + ( - .O1950080000 cos(q4) cos(q2) cos(q3) - .O1 950080000 sin(q2) sin(q4) - .O1 523500000 sin(q3) sin(q2) sin(q4)) qd4 + ( - .03047000000 cos(q4) cos(q3) - .O02218640000 COS(^^) COS(^^) COS(^^) + .03047000000 cos(q4) cos(q2) cos(q3) + .4769728000 sin(q3) + .O01 961 524000 cos(q2) + .O02218640000 cos(q4) cos(q3) - .O04437280000 cos(q4) cos(q2) cos(q3) sin(q2) sin(q4) + .03047000000 sin(q2) sin(q4) cos(q2) cos(q3) + -02776080000cos(q2) cos(q3) sin(q3) - -03596800000cos(q3) + .881093038O + .O3900160000 cos(q4) sin(q3) - -002218640000 cos(q2) cos(q4) - -02776080000sin(q3) cos(q3) - .llS5WZ4OO cos(q3) + .03047000000 cos(q4) + -11 55993400 cos(q2) cos(q3) ) qddl + (-01523500000 sin(q3) cos(q2) sin(q4) - .03047000000 cos(q4) sin(q3) sin(q2) cos(q3) + .O1950080000 cos(q2) sin(q4) - .O1 950080000 sin(q2) cos(q3) cos(q4) - -0181 4026200 cos(q2) - -01798400000 sin(q2) sin(q3) + -002218640000 cos(q4) sin(q3) sin(q2) cos(q3) - -01388040000 sin(q2) - -002218640000 cos(q4) sin(q3) cos(q2) sin(q4) - -1155993400 sin(q3) sin(q2) cos(q3) - .2384864000 sin(q2) cos(q3) 7 .O2776080000 cos(q3) sin(q2)) qdd2 + ( - .O1 950080000 cos(q4) cos(q2) sin(q3) + .O1 7984OOOOO cos(q2) cos(q3) - .03047000000 cos(q2) cos(q4) + .O0221 8640000 cos(q4) COS(^^) - .O1 523500000 sin(q2) cos(q3) sin(q4) - .1986473400 cos(q2) + .O0221 8640000 sin(q2) sin(q4) cos(q4) cos(q3) - .2384864000 cos(q2) sin(q3)) qdd3 + (.O1 038136000 sin(q2) sin(q3) + .O1 950080000 sin(q2) cos(q4) + -01523500000 sin(q3) sin(q2) cos(q4) - .019S0080000 sin(q4) cos(q2) cos(q3)) qdd4

T2 = (.03047000000 cos(q4) cos(q2) cos(q3) sin(q2) - .O0221 8640000 sin(q4) cos(q4) cos(q3) - .O02218640000 sin(q2) cos(q4) cos(q2) + .1lS59934OO cos(q2) cos(q3) sin(q2) + .O04437280000 cos(q4) cos(q2) cos(q3) sin(q4) + .O01 961524000 cos(q2) sin(q2) - .03047000000 cos(q2) cos(q3) sin(q4) - -002218640000 cos (q4) cos(q2) cos(q3) sin(q2) + .O1 523SOOOOO sin(q4) cos(q3) + .O2776080000 cos(q2) cos(q3) sin(q2) sin(q3) ) qdl + ( - .O8304800000 sin(q2) - .2311986800 cos(q3) sin(q2) + .O3047000000 sin(q4) cos(q2) cos(q3) - .O04437280000 cos(q2) sin(q4) cos(q4) cos (q3) + -004437280000 sin(q2) cos(q4) cos(q3) - .06094000000 cos(q4) sin(q2) cos(q3) - .O5552160000 sin(q3) sin(q2) cos(q3)) qd1 qd3 + ( - .O04437280000 cos(q4) sin(q3) cos(q2) + .03047000000 sin(q3) sin(q4) sin(q2) cos(q3) - -008162720000 cos(q2) sin(q3) - .O04437280000 cos(q4) sin(q3) sin(q4) sin(q2) cos(q3)) qdl qd4 + ( - .O2776080000 + .O04437280000 cos(q4) sin(q3) cos(q3) - .O6094000000 cos(q4) sin(q3) cos(q3) - .2311986800 sin(q3) cos(q3) + .O5552160000 cos(q3) ) qd2 qd3 + ( - .03047000000 sin(q4) cos(q3) 4 .O04437280000 cos(q4) sin(q4) cos(q3) - .O04437280000 sin(q4) cos(q4)) qd2 qd4 + (.O0221 8640000 sin(q4) cos(q4) cos(q3) - .O1 523500000 sin(q4) cos(q3)) qd3 + (.O081 62720000 sin(q3) + .O04437280000 cos(q4) sin(q3)) qd3 qd4 + -01SZ35OOOOO cos(q3) sin(q4) qd4 + (.O1 523500000 sin(q3) cos(q2) sin(q4) - .03047000000 cos(q4) sin(q3) sin(q2) cos(q3) + .O1 950080000 cos(q2) sin(q4) - -01950080000 sin(q2) cos(q3) cos(q4) - -0181 4026200 cos(q2) - -017984ClOOOO sin(q2) sin(q3) + .O0221 8640000 cos(q4) sin(q3) sin(q2) cos(q3) - .O1388040000 sin(q2) - -002218640000 cos(q4) sin(q3) cos(q2) sin(q4) - -11 55993400 sin(q3) sin(q2) cos(q3) - .2384864000 sin(q2) cos(q3) + .O2776080000 cos(q3) sin(q2)) qddl + (.122686476O + .O3047000000 cos(q4) cos(q3) - .O02218640000 cos(q4) COS(@) + .11559934OO cos(q3) + .O2776080000 sin(q3) cos(q3) + .O02218640000 cos(q4) ) qdd2 +( - .O1 523500000 sin(q4) sin(q3) + .O0221 8640000 sin(q4) cos(q4) sin(q3)) qdd3 + ( - .O1 523500000 cos(q4) cos(q3) - -010381 36000 cos(q3)) qdd4 + 7.31 1098700 cos(q2) cos(q3) + .S978214OOO cos(q4) cos(q2) cos(q3) + -5513220000 cos(q2) sin(q3) + S978214000 sin(q2) sin(q4) - .5588364600 sin(q2) --~-*---*-_-____~------

T3 = (. 11 55993400 cos(q2) cos(q3) sin(q3) - .O022 18640000 cos(q4) cos(q2) cos(q3) sin(q3) - .O0221 8640000 sin(q2) sin(q4) cos(q4) cos(q2) sin(q3) - .IlSSW34OO sin(q3) cos(q3) - .O2776080000 cos(q2) cos(q3) - .O1 950080000 cos(q4) cos(q3) + .O1 523500000 sin(q2) sin(q4) cos(q2) sin(q3) + .O2776080000 cos(q3) + .O1 388040000 cos(q2) + -002218640000 cos(q4) sin(q3) cos(q3) - .2384864000 cos(q3) - .O1 7984OOOOO sin(q3) + .03047000000 cos(q4) cos(q2) cos(q3) sin(q3) - .03047000000 cos(q4) sin(q3) cos(q3) - .01388040000) qdl +( .O5552160000 sin(q3) sin(q2) cos(q3) + -2311986800 cos(q3) sin(q2) - .03047000000 sin(q4) cos(q2) cos(q3) - -004437280000sin(q2) cos(q4) cos(q3) + .06094000000 cos(q4) sin(q2) cos(q3) + .O04437280000 cos(q2) sin(q4) cos(q4) cos(q3) + .O8304800000 sin(q2)) qdl qd2 + ( - -0126OOOOOOO sin(q2) cos(q3) - .03047000000 sin(q2) cos(q3) cos(q4) + .O04437280000 sin(q2) cos(q4) cos(q3) - .O04437280000 cos(q4) cos(q2) sin(q4) + .03047000000 cos(q2) sin(q4)) qdl qd4 + (.O1 388040000 - .O2776080000 COS(^^) + .03047000000 cos(q4) sin(q3) cos(q3) - .O0221 8640000 cos(q4) sin(q3) cos(q3) + -1155993400 sin(q3) cos(q3)) qd2 + (.O04437280000 cos(q4) sin(q3) - .03047000000 cos(q4) sin(q3) - .O1 260000000 sin(q3)) qd2 qd4 + (.O04437280000 sin(q4) cos(q4) - .03047000000 sin(q4)) qd3 qd4 + ( - -01950080000 cos(q4) cos(q2) sin(q3) + .O1798400000 cos(q2) cos(q3) - .03047000000 COS(^^) COS(^^) + .O02218640000 COS(^^) COS(^^) - .O1 523500000 sin(q2) cos(q3) sin(q4) - .1986473400 cos(q2) + ,00221 8640000 sin(q2) sin(q4) cos(q4) cos(q3) - .2384864000 cos(q2) sin(q3)) qddl + ( - -01SZ35OOOOO sin(q4) sin(q3) + .O02218640000 sin(q4) cos(q4) sin(q3)) qdd2 + (.1986473400 - .O02218640000 cos(q4) + .03047000000 cos(q4)) qdd3 + .5513220000 sin(q2) cos(q3) - 7.31 1098700 sin(q2) sin(q3) - S978214000 sin(q3) sin(q2) cos(q4)

IMAGE EVALUATION TEST TARGET (QA-3)

APPLIED -4 IMAGE.lnc = 1653 East Main Street --A --A - Rochester. NY 14609 USA ------Phone: ilW482-03M) ------Fa: il61288-5989

Q 1993. Applied Image. Inc.. All Rights Reserved