of fuzzy controller inputs and outputs places an upper limit on the number of elements in the premises and consequents Note that there does not need to be a premise(consequent)term for each input(output)in each rule, although often there Rule-Bases Using the above approach, we could continue to write down rules for the pendulum problem for all possible cases(the this for practice, at least for a few more rules). Note that since we only specify a finite number of linguistic variables and linguistic values, there is only a finite number of possible rules For the pendulum problem, with two inputs and five linguistic values for each of these, there are at most 5=25 possible rules(all possible combinations of premise linguistic values for two inputs) A convenient way to list all possible rules for the case where there are not too many inputs to the fuzzy controller (less than or equal to two or three)is to use a tabular representation. a tabular representation of one possible set of rules or the inverted pendulum is shown in Table 2. 1. Notice that the body of the table lists the linguistic-numeric consequents of the rules, and the left column and top row of the table contain the linguistic-numeric premise terms Then, for instance, the(2, -1)position( where the 2 represents the row having" 2 for a numeric-linguistic value and the"-1"represents the column having"-1"for a numeric-linguistic value) has a-1("negsmall")in the body of the table and represents the rule If error is poslarge and change-in-error is negsmall Then force is negsmall which is rule 3 above. Table 2. 1 represents abstract knowledge that the expert has about how to control the pendulum given the error and its derivative as inputs. Table 2.1 Rule Table for Inverted Pendulum “ change-in-eror”e orce 0 2 2 0 2 2 0 -1 0 0 0 0 -2 The reader should convince him- or herself that the other rules are also valid and take special note of the pattern of rule consequents that appears in the body of the table. Notice the diagonal of zeros and viewing the body of the table as a matrix we see that it has a certain symmetry to it. This symmetry that emerges when the rules are tabulated is no accident and is actually a representation of abstract knowledge about how to control the pendulum; it arises due to a symmetry in the systems dynamics. We will actually see later that similar patterns will be found when constructing rule-bases for more challenging applications, and we will show how to exploit this symmetry in implementing fuzzy controllers 2.2.3 Fuzzy Quantification of Knowledge How do we quantify the knowledge in fuzzy controller design? why do that?
of fuzzy controller inputs and outputs places an upper limit on the number of elements in the premises and consequents. Note that there does not need to be a premise (consequent) term for each input (output) in each rule, although often there is. Rule-Bases Using the above approach, we could continue to write down rules for the pendulum problem for all possible cases (the reader should do this for practice, at least for a few more rules). Note that since we only specify a finite number of linguistic variables and linguistic values, there is only a finite number of possible rules. For the pendulum problem, with two inputs and five linguistic values for each of these, there are at most = 25 possible rules (all possible combinations of premise linguistic values for two inputs). 2 5 A convenient way to list all possible rules for the case where there are not too many inputs to the fuzzy controller (less than or equal to two or three) is to use a tabular representation. A tabular representation of one possible set of rules for the inverted pendulum is shown in Table 2.1. Notice that the body of the table lists the linguistic-numeric consequents of the rules, and the left column and top row of the table contain the linguistic-numeric premise terms. Then, for instance, the (2, -1) position (where the "2" represents the row having "2" for a numeric-linguistic value and the "-1" represents the column having "-1" for a numeric-linguistic value) has a -1 ("negsmall") in the body of the table and represents the rule: If error is poslarge and change-in-error is negsmall Then force is negsmall which is rule 3 above. Table 2.1 represents abstract knowledge that the expert has about how to control the pendulum given the error and its derivative as inputs. Table 2.1 Rule Table for Inverted Pendulum “change-in-error” e i “force” u -2 -1 0 1 2 -2 2 2 2 1 0 -1 2 2 1 0 -1 0 2 1 0 -1 -2 1 1 0 -1 -1 -2 “error” e 2 0 -1 -2 -2 -2 The reader should convince him- or herself that the other rules are also valid and take special note of the pattern of rule consequents that appears in the body of the table. Notice the diagonal of zeros and viewing the body of the table as a matrix we see that it has a certain symmetry to it. This symmetry that emerges when the rules are tabulated is no accident and is actually a representation of abstract knowledge about how to control the pendulum; it arises due to a symmetry in the system's dynamics. We will actually see later that similar patterns will be found when constructing rule-bases for more challenging applications, and we will show how to exploit this symmetry in implementing fuzzy controllers. 2.2.3 Fuzzy Quantification of Knowledge How do we quantify the knowledge in fuzzy controller design? Why do that?
Up to this point we have only quantified, in an abstract way, the knowledge that the human expert has about how to control the plant. Next, we will show how to use fuzzy logic to fully quantify the meaning of linguistic descriptions so that we may automate, in the fuzzy controller, the control rules specified by the expert a Membership functions Fuzzification Membership functions First, we quantify the meaning of the linguistic values using"membership functions. "Consider, for example, Figure 2.6 This is a plot of a function versus e(t) that takes on special meaning. The function n quantifies the certainty that e(t) can be classified linguistically as"possmall To understand the way that a membership function works, it is best to perform a case analysis where we show how to interpret it for various values of e() ) .lf elt I-0 indicating that we are certain thate(t) Is not" p 丌 .lf e(t) o then A(o)=0.5, indicating that we are halfway certain thate()2 possmall"(we are only halfway certain since it could also be" zero" with some degree of certainty this value is in a"gray area"in terms of linguistic interpretation re()=4 en u(=1.0, indicating that we are absolutely certain that e(t)=is what we mean by rossall . lf e(t)= then u(r)=0, indicating that we are certain that e(t)= is not"possmall"(actually, it is possmall 1.0 0.5 The membership function quantifies, in a continuous manner, whether values of e(t) belong to(are members of) the set of values that are"possmall, "and hence it quantifies the meaning of the linguistic statement"error is possmall, "This is why it is called a membership function. It is important to recognize that the membership function in Figure 2.6 is only one possible definition of the meaning of "error is possmall", you could use a bell-shaped function, a trapezoid, or many others
Up to this point we have only quantified, in an abstract way, the knowledge that the human expert has about how to control the plant. Next, we will show how to use fuzzy logic to fully quantify the meaning of linguistic descriptions so that we may automate, in the fuzzy controller, the control rules specified by the expert. Membership functions Fuzzifiction Membership Functions First, we quantify the meaning of the linguistic values using "membership functions." Consider, for example, Figure 2.6. This is a plot of a function versus e(t) that takes on special meaning. The function n quantifies the certainty1 that e(t) can be classified linguistically as "possmall." To understand the way that a membership function works, it is best to perform a case analysis where we show how to interpret it for various values of e(t): •If ( ) 2 e t π = − then ( ) 2 0 π μ − = , indicating that we are certain that ( ) 2 e t π = − is not "possmall." •If ( ) 8 e t π = then ( ) 0.5 8 π μ = , indicating that we are halfway certain that ( ) 8 e t π = is"possmall" (we are only halfway certain since it could also be "zero" with some degree of certainty this value is in a "gray area" in terms of linguistic interpretation). •If ( ) 4 e t π = then ( ) 1.0 4 π μ = , indicating that we are absolutely certain that ( ) 4 e t π = is what we mean by "possmall." •If e t( ) = π then μ() 0 π = , indicating that we are certain that e t( ) = π is not "possmall" (actually, it is "poslarge"). Figure 2.6 Membership function for linguistic value "possmall." The membership function quantifies, in a continuous manner, whether values of e(t) belong to (are members of) the set of values that are "possmall," and hence it quantifies the meaning of the linguistic statement "error is possmall." This is why it is called a membership function. It is important to recognize that the membership function in Figure 2.6 is only one possible definition of the meaning of "error is possmall"; you could use a bell-shaped function, a trapezoid, or many others
≤ 1.0 osama11” 0.5 Figure 2.7(a) A few membership function choices for representing"error is possmall For instance, consider the membership functions shown in Figure 2.7. For some application someone may be able to argue that we are absolutely certain that any value of e(t) near t is still"possmall "and only when you get sufficiently far from r do we lose our confidence that it is"possmall. One way to characterize this understanding of the meaning of"possmall"is via the trapezoid-shaped membership function in Figure 2.7(a) For other applications you may think of membership in the, set of "possmall"values as being dictated by the Gaussian-shaped membership function(not to be confused with the Gaussian probability density function) shown in Figure 2.7(b). For still other applications you may not readily accept values far a. 1as being"possmall, "so you may use the membership function in Figure 2.7(c)to represent this. Finally, while we often think of symmetric characterizations of the meaning of linguistic values, we are not restricted to these symmetric representations posse11” 1.0 0.5 Figure 2.7(b) A few membership function choices for representing"error is possmall rossall 1.0 0.5 (),(rad) Figure 2.7(c) A few membership function choices for representing"error is possmall
Figure 2.7(a) A few membership function choices for representing "error is possmall." For instance, consider the membership functions shown in Figure 2.7. For some application someone may be able to argue that we are absolutely certain that any value of e(t) near 4 π is still "possmall" and only when you get sufficiently far from 4 π do we lose our confidence that it is "possmall." One way to characterize this understanding of the meaning of "possmall" is via the trapezoid-shaped membership function in Figure 2.7(a). For other applications you may think of membership in the, set of "possmall" values as being dictated by the Gaussian-shaped membership function (not to be confused with the Gaussian probability density function) shown in Figure 2.7(b). For still other applications you may not readily accept values far away from 4 π as being "possmall," so you may use the membership function in Figure 2.7(c) to represent this. Finally, while we often think of symmetric characterizations of the meaning of linguistic values, we are not restricted to these symmetric representations. Figure 2.7 (b) A few membership function choices for representing "error is possmall." Figure 2.7(c) A few membership function choices for representing "error is possmall
For instance, in Figure 2.7(d)we nt that we believe that as e(t) moves to the left of we are very quick to reduce our confidence that it is"possmall, "but if we move to the right of our confidence that e(t) is"possmall, diminishes at a slower rate In summary, we see that depending on the application and the designer (expert), many, different choices of membership functions are possible. We will further discuss other ways to define membership functions in Section 2.3.2 It is important to note here, however, that for the most part the definition of a membership function is subjective rather than objective. That is, we simply quantify it in a manner that makes sense to us, but others, may quantify it in a different “ possmal1” 0.5 Figure 2.7(d) A few membership function choices for representing"error is possmall The set of values that is described by as being"positive small"is called a"fuzzy set. " Let a denote this fuzzy set Notice that from Figure 26. we are absolutely certain that e(t=-is an element of A, but we are less certain that e(b) 16s an element of A. Membership in the set, as specified by the membership function, is fuzzy, hence we use the term"fuzzy set A" crisp"(as contrasted to"fuzzy")quantification of "possmall "can also be specified, but via the membership function shown in Figure 2. 8. This membership function is simply an alternative representation for the interval on the 丌 3丌 real line se(0)s-, and it indicates that this interval of numbers represents"possmall"Clearly, this characterization of crisp sets is simply another way to represent a normal interval (set)of real numbers a(o),(rad. Figure 2.8 Membership function for a crisp set
For instance, in Figure 2.7(d) we represent that we believe that as e(t) moves to the left of 4 π we are very quick to reduce our confidence that it is "possmall," but if we move to the right of 4 π our confidence that e(t) is "possmall," diminishes at a slower rate. In summary, we see that depending on the application and the designer (expert), many, different choices of membership functions are possible. We will further discuss other ways to define membership functions in Section 2.3.2. It is important to note here, however, that for the most part the definition of a membership function is subjective rather than objective. That is, we simply quantify it in a manner that makes sense to us, but others, may quantify it in a different manner. Figure 2.7(d) A few membership function choices for representing "error is possmall." The set of values that is described by as being "positive small" is called a "fuzzy set." Let A denote this fuzzy set. Notice that from Figure 2.6. we are absolutely certain that e(t) = 4 π is an element of A, but we are less certain that e(t) = 16 π is an element of A. Membership in the set, as specified by the membership function, is fuzzy; hence we use the term "fuzzy set." A "crisp" (as contrasted to "fuzzy") quantification of "possmall" can also be specified, but via the membership function shown in Figure 2.8. This membership function is simply an alternative representation for the interval on the real line 3 ( ) 8 8 e t π π ≤ ≤ , and it indicates that this interval of numbers represents "possmall." Clearly,this characterization of crisp sets is simply another way to represent a normal interval (set) of real numbers. Figure 2.8 Membership function for a crisp set
While the vertical axis in Figure 2represents certainty, the horizontal axis is also given a special name. It is called universe of discourse"for the input e(t since it provides the range of values of e(t) that can be quantified with linguistics and fuzzy sets. In conventional terminology, a universe of discourse for an input or output of a fuzzy system simply the range of values the inputs and outputs can take on Now that we know how to specify the meaning of a linguistic value via a membership function(and hence a fuzz set), we can easily specify the membership functions for all 15 linguistic values(five for each input and five for the output)of our inverted pendulum example. See Figure 2.9for one choice of membership functions Notice that( for our later convenience)we list both the linguistic values and the linguistic-numeric values associated with each membership function. Hence, we see that the membership function in Figure 2.6 for "possmall"is embedded among several others that describe other sizes of values(so that, for instance, the membership function to the right of the one for"possmall "is the one that represents"error is poslarge"). Note that other similarly shaped membership functions make sense(e.g, bell-shaped membership functions) The membership functions at the outer edges in Figure 2.9 deserve special attention. For"the inputs and we see that the outermost membership functions"saturate"at a value of one. This makes intuitive sense as at some point the human expert would just group all large values together in a linguistic description such as"poslarge. The membership functions at the outermost edges appropriately characterize this phenomenon since they characterize"greater than"(for the right side )and"less than"(for the left side) n8gtar88 ngalA pos snal“ polare" (),(44.) - nessa zero al l posTage neglarge"“aeg8all“zero Doa8all年 DoS1at88 (),() for For the output u, the membership functions at the outermost edges cannot be saturated for the fuzzy system to be properly defined. The basic reason for this is that in decision-making processes of the type we study, we seek to take actions that specify an exact value for the process input. We do not generally indicate to a process actuator, "any value It is important to have a clear picture in your mind of how the values of the membership functions change as, for
While the vertical axis in Figure 2.6represents certainty, the horizontal axis is also given a special name. It is called the "universe of discourse" for the input e(t) since it provides the range of values of e(t) that can be quantified with linguistics and fuzzy sets. In conventional terminology, a universe of discourse for an input or output of a fuzzy system is simply the range of values the inputs and outputs can take on.. Now that we know how to specify the meaning of a linguistic value via a membership function (and hence a fuzzy set), we can easily specify the membership functions for all 15 linguistic values (five for each input and five for the output) of our inverted pendulum example. See Figure 2.9for one choice of membership functions. Notice that (for our later convenience) we list both the linguistic values and the linguistic-numeric values associated with each membership function. Hence, we see that the membership function in Figure 2.6 for "possmall" is embedded among several others that describe other sizes of values (so that, for instance, the membership function to the right of the one for "possmall" is the one that represents "error is poslarge"). Note that other similarly shaped membership functions make sense (e.g., bell-shaped membership functions). The membership functions at the outer edges in Figure 2.9 deserve special attention. For "the inputs and we see that the outermost membership functions "saturate" at a value of one. This makes intuitive sense as at some point the human expert would just group all large values together in a linguistic description such as "poslarge." The membership functions at the outermost edges appropriately characterize this phenomenon since they characterize "greater than" (for the right side) and "less than" (for the left side). Figure 2.9 Membership functions for an inverted pendulum on a cart. For the output u, the membership functions at the outermost edges cannot be saturated for the fuzzy system to be properly defined. The basic reason for this is that in decision-making processes of the type we study, we seek to take actions that specify an exact value for the process input. We do not generally indicate to a process actuator, "any value bigger than, say, 10, is acceptable." It is important to have a clear picture in your mind of how the values of the membership functions change as, for