A critical element in deciding reasoning type is to decide what we want to do if two or more rules have the same consequent discrete fuzzy set member or linguistic term, firing with different antecedent confidences.
Suppose we have two rules with the same consequent:
:rule r1
IF (speed is Slow AND distance is Medium) THEN (power is Medium);
:rule r2
IF (speed is Medium AND distance is Short) THEN (power is Medium);
and that rule r1 fires with antecedent confidence 0.8, and that rule r2 fires with ante- cedent confidence 0.6. With monotonic reasoning, rule r1 would succeed in setting the grade of membership of Medium to 0.8, even if rule r2 fires after rule r1. If we allow each rule to set truth values regardless of their existing value, the last rule to fire would succeed.
There are, however, occasions when we wish to modify grades of membership in different ways, employing non-monotonic reasoning; these will be discussed in Section 7.7.
7.4 FUZZIFICATION AND DEFUZZIFICATION
We review briefly fuzzification and defuzzification, discussed more fully in Chapter 3, from the point of view of the choices to be made and their specification in an expert system language.
Overall, we have these steps to carry out; fuzzification and evaluation of antece- dent confidence; modification of consequent membership functions; aggregation of membership functions for each consequent linguistic variable; and defuzzification of the aggregated membership functions.
7.4.1 Fuzzification and Evaluation of Antecedent Confidence
Fortunately, almost everyone agrees on how fuzzification should be carried out; in a working expert system. Also, combination of truth values of two or more antecedent clauses is almost always carried out using the Zadehian min – max AND and OR operations. It is probably satisfactory to take the conventional methods as defaults, and not necessary to permit specifying any other choices here.
7.4.2 Modification of Consequent Membership Functions
The modification of membership functions can carried out by
B0j¼P AND Bj (7:7)
but there is not general agreement as to which AND operator should be used. Common choices are the Zadehian min operator (which yields the Mamdani
method) and the product operator. The min operator is widely accepted, and is prob- ably a good default, but it lends flexibility to a system if other operators can be specified.
7.4.3 Aggregation of Consequent Membership Functions for Each Consequent Linguistic Variable
Aggregation of all the modified membership functions belonging to a single linguis- tic variable is usually carried out using the Zadehian max OR operator, and this is probably acceptable as a default at present. However, an argument can be made for employing a different OR operator. Let us take an example and follow it through. Suppose we have a linguistic variable control in the consequent of a rule, with three members N, Z, and P with these membership functions (Fig. 7.1):
We fire rules that give grades of membership 0 for N, 0.8 for Z and 0.6 for P, and modify the membership functions using the Zadeh AND operator, giving these modified membership functions (Fig. 7.2):
We now aggregate these modified functions using the Zadehian OR operator (Fig. 7.3):
The aggregated membership functions in Figure 7.3 represent a new membership function. We may ask—Membership in what? The answer is that Figure 7.3 rep- resents the truth value that a number between21 andþ1 is valid for this particular instance of the linguistic variable control. But the resulting membership function is
Figure 7.1 Membership functions for linguistic variable control.
not convex, and the notch in Figure 7.3 at an argument 0.5 seems quite counterin- tuitive. Why should 0.5 have a lower grade of membership in control than arguments of 0 and 1?
In Chapter 3 we showed that when ORing fuzzy numbers arelogically incompa-
tible, such as 2 and NOT 2, there is a mathematical (and practical) argument for
using the bounded sum OR operator. In aggregating membership functions, we deal with fuzzy numbers that aresemantically incompatible.
Unfortunately, we do not have a mathematical argument to justify using the bounded sum operator in this, but from a practical viewpoint it seems to work out, at least in this case. In Figure 7.4, we aggregate the membership functions of Figure 7.2 using the bounded sum operator with intuitively pleasing results; the resulting membership function is convex and the annoying notch in Figure 7.3 has been removed.
Figures 7.3 and 7.4 indicate that it might be desirable to furnish a choice of other OR operators than the Zadehian for aggregation of membership functions, provided that the memberships of the unweighted aggregated membership functions satisfy appropriate conditions, such as their sum being one at any point. More research is needed on this point.
7.4.4 Determination of Defuzzified Value for Consequent Attribute
We denote the argument of the membership functions, the number whose defuzzi- fied value is to be obtained by z; its grade of membership bym(z); and the defuzzi- fied value by zdef.
Figure 7.3 Aggregated membership functions using Zadehian OR operator for linguistic
variablecontrol.
Figure 7.4 Aggregated membership functions for linguistic variable control. using the
bounded sum OR operator.
Here again different methods are used, described in Klir and Yuan (1996) (books on.fuzzy control). Here, we will describe only the most commonly used defuzzifica- tion method, thecentroidmethod.
Probably the most commonly used defuzzification method is the centroid
method, equivalent to calculating the center of area of the aggregated membership function, as shown in Figure 7.3 or 7.4. Analytically, we divide the integral over the range of the membership function of the product of the argument and its grade of membership, and divide this by the integral of the grade of membership; this is very useful when the membership functions are given as parameterized continuous functions, such as piecewise linear, piecewise quadratic or normalized Gaussian: zdefuzzified ¼ Ð Zzm(z)dz Ð Zm(z)dz (7:8)
The discrete version of this, when the membership functions are given as a discrete set of values, is to sum the products of the arguments and their grade of membership, and divide this by the sum of the grades of membership:
zdefuzzified ¼zdefuzzified¼ P izim(zi) P im(zi) (7:9)
In the case where the membership functions are singletons, equation (7.9) becomes a very fast and simple calculation.