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 Iferror is poslarge and change-in-error is negsmall Then force is negsmall ch 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 hange-in-eror”e fo 2 0 2 2 2 2 2 0 error e 0 2 0 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 accider 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? 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 ■ Fuzzifictio 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 PDF文件使用" pdffactory Pro"试用版本创建ww. fineprint,com,cn
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 “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. n Membership functions n 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." PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn
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(y) .lf e(t u(=0, indicating that we are certain thate(t) fe(1) then r(3 =0.5, indicating that we are halfway certain thate() 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 e(t)=then u=1.0, indicating that we are absolutely certain that e(t)== is what we mean by 4 4 If e(t)=t then u(r)=0, indicating that we are certain that e(t)=T is not"possmall"(actually, it is l.0 possma112 so)(ad. 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 othe “ pOs Sha11” 1.0 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 PDF文件使用" pdffactory Pro"试用版本创建ww, fineprint,com,cn
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 p = - then ( ) 0 2 p m - = , indicating that we are certain that ( ) 2 e t p = - is not "possmall." •If ( ) 8 e t p = then ( ) 0.5 8 p m = , indicating that we are halfway certain that ( ) 8 e t p = 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 p = then ( ) 1.0 4 p m = , indicating that we are absolutely certain that ( ) 4 e t p = is what we mean by "possmall." •If e t( ) = p then m p( ) 0 = , indicating that we are certain that e t( ) = p 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. 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 PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn
argue that we are absolutely certain that any value of e(v) near is still "possmall"and only when you get sufficientl far from t 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 ofpossmall"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 -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 possmall 1.0 0.5 igure 2.7(b) A few membership function choices for representing"error is possmall 0.5 Figure 2.7(c) A few membership function choices for representing"error is possmall For instance, in Figure 2.7(d)we represent that we believe that as e(y moves to the left of we are very quick to educe our confidence that it is"possmall, " but if we move to the right of 4 confidence that e(y 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 PDF文件使用" pdffactory Pro"试用版本创建ww. fineprint,com,cn
argue that we are absolutely certain that any value of e(t) near 4 p is still "possmall" and only when you get sufficiently far from 4 p 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 p 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 represent that we believe that as e(t) moves to the left of 4 p we are very quick to reduce our confidence that it is "possmall," but if we move to the right of 4 p 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. PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn
1.0 “ possa11 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(t a 6S 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 se(t)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 ().【ra2 Figure 2.8 Membership function for a crisp set While the vertical axis in Figure 2 represents certainty, the horizontal axis is also given a special name. It is called the universe of discourse"for the input e(y 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 PDF文件使用" pdffactory Pro"试用版本创建ww. fineprint,com,cn
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 p is an element of A, but we are less certain that e(t) = 16 p 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 p p £ £ , 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 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 PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn
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 卫gEr3e e"“ regnal eco Stare T厂 -1 agoNal l n吕4rg n98 91a 879 :91211 Pesiar8e r),(x) Figure 2 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 example, e(b) changes its value over time. For instance, as e(y changes from- to we see that various membership functions will take on zero and nonzero values indicating the degree to which the linguistic value appropriately describes the current value of e(t). For example, at e(y=-- we are certain that the error is "neglarge, "and as the value of e(n) moves toward- we become less certain that it is"neglarge"and more certain that it is"negsmall. We see that the membership functions quantify the meaning of linguistic statements that describe time-varying signals Finally, note that often we will draw all the membership functions for one input or output variable on one graph hence, we often omit the label for the vertical axis with the understanding that the plotted functions are membership PDF文件使用" pdffactory Pro"试用版本创建ww. fineprint,com,cn
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 example, e(t) changes its value over time. For instance, as e(t) changes from 2 p - to 2 p we see that various membership functions will take on zero and nonzero values indicating the degree to which the linguistic value appropriately describes the current value of e(t). For example, at e(t) = 2 p - we are certain that the error is "neglarge," and as the value of e(t) moves toward 4 p - we become less certain that it is "neglarge" and more certain that it is "negsmall." We see that the membership functions quantify the meaning of linguistic statements that describe time-varying signals. Finally, note that often we will draw all the membership functions for one input or output variable on one graph; hence, we often omit the label for the vertical axis with the understanding that the plotted functions are membership PDF 文件使用 "pdfFactory Pro" 试用版本创建 www.fineprint.com.cn