• No results found

Dealing with uncertainty

3.4 Possibility theory: fuzzy sets and fuzzy logic

3.4.3 Defuzzification

In the above example, at a temperature of 350°C the possibilities for the pressure being high and medium, µHP and µMP, are set to 0.75 and 0.25,

respectively, by the fuzzy rules 3.6f and 3.7f. It is assumed that the possibility for the pressure being low, µLP, remains at 0. These values can be passed on to

other rules that might have pressure is high or pressure is medium in their condition clauses without any further manipulation. However, if we want to interpret these membership values in terms of a numerical value of pressure, they would need to be defuzzified. Defuzzification is particularly important when the fuzzy variable is a control action such as “set current,” where a specific setting is required. The use of fuzzy logic in control systems is

0 300 100 1 0 0 Temperature / o C Membership, µ (b) (a) 200 400

low DOR medium

300 100 1 0 Temperature / o C Membership, µ 200 400 low OR medium

discussed further in Chapter 14. Defuzzification takes place in two stages, described below.

Stage 1: scaling the membership functions

The first step in defuzzification is to adjust the fuzzy sets in accordance with the calculated possibilities. A commonly used method is Larsen’s product operation rule [12, 13], in which the membership functions are multiplied by their respective possibility values. The effect is to compress the fuzzy sets so that the peaks equal the calculated possibility values, as shown in Figure 3.10. Some authors [14] adopt an alternative approach in which the fuzzy sets are truncated, as shown in Figure 3.11. For most shapes of fuzzy set, the difference between the two approaches is small, but Larsen’s product operation rule has the advantages of simplifying the calculations and allowing fuzzification

300 100 1 0 0 Temperature / o C Membership, µ high (b) (a) 200 400 low medium 1 0 0 Pressure / MNm−2 Membership, µ medium high 0.2 0.4 0.6 0.8

Figure 3.10 Larsen’s product operation rule for calculating membership functions from fuzzy rules.Membership functions for pressure are shown, derived from Rules 3.6f and 3.7f, for a temperature of 350°C

300 100 1 0 0 Temperature / o C Membership, µ high (b) (a) 200 400 low medium 1 0 0 Pressure / MNm−2 high medium 0.2 0.4 0.6 0.8 Membership, µ

Figure 3.11 Truncation method for calculating membership functions from fuzzy rules. Membership functions for pressure are shown, derived from Rules 3.6f and 3.7f, for a temperature of 350°C

followed by defuzzification to return the initial value, except as described in A defuzzification anomaly below.

Stage 2: finding the centroid

The most commonly used method of defuzzification is the centroid method, sometimes called the center of gravity, center of mass, or center of area method. The defuzzified value is taken as the point along the fuzzy variable axis that is the centroid, or balance point, of all the scaled membership functions taken together for that variable (Figure 3.12). One way to visualize this is to imagine the membership functions cut out from stiff card and pasted together where (and if) they overlap. The defuzzified value is the balance point along the fuzzy variable axis of this composite shape. When two membership functions overlap, both overlapping regions contribute to the mass of the composite shape. Figure 3.12 shows a simple case, involving neither the low

nor high fuzzy sets. The example that we have been following concerning boiler pressure is more complex and is described in Defuzzifying at the extremes below.

If there are N membership functions with centroids ci and areas ai then the combined centroid C, i.e., the defuzzified value, is:

¦

¦

N i i N i i i a c a C 1 1 (3.38) Balance point = 0.625 m3s−1 0 0.5 1.5 1 0 Flow / m3s−1 Membership, µ 1.0 2.0

lowish Overlapping area makes a double contribution to the mass

medium

When the fuzzy sets are compressed using Larsen’s product operation rule, the values of ci are unchanged from the centroids of the uncompressed shapes, Ci, and aiis simply PiAi where Ai is the area of the membership function prior to compression. (This is not the case with the truncation method shown in Figure 3.11, which causes the centroid of asymmetrical membership functions to shift along the fuzzy variable axis.) The use of triangular membership functions or other simple geometries simplifies the calculations further. For triangular membership functions, Ai is one half of the base length multiplied by the height. For isosceles triangles Ci is the midpoint along the base, and for right- angle triangles Ci is approx. 29% of the base length from the upright.

Defuzzifying at the extremes

There is a complication in defuzzifying whenever the two extreme membership functions are involved, i.e., those labeled high and low here. Given the fuzzy sets shown in Figure 3.8b, any pressure above 0.7MNm–2 has a membership of

high of 1. Thus the membership function continues indefinitely toward the right and we cannot find a balance point using the centroid method. Similarly, any pressure below 0.1MNm–2 has a membership of low of 1, although in this case the membership function is bounded because the pressure cannot go below 0.

One solution to these problems might be to specify a range for the fuzzy variable, MINMAX, or 0.1–0.7MNm–2 in this example. During fuzzification, a value outside this range can be accepted and given a membership of 1 for the fuzzy sets low or high. However, during defuzzification, the low and high

fuzzy sets can be considered bounded at MIN and MAX and defuzzification by the centroid method can proceed. This method is shown in Figure 3.13(a) using the values 0.75 and 0.25 for µHP and µMP, respectively, as calculated in Section 3.4.2, yielding a defuzzified pressure of 0.527MNm–2. A drawback of this

(a) 1 0 0 Pressure / MNm−2 Membership, µ 0.2 0.4 0.8

Overlapping area makes a double contribution to the 'mass'

(b) 1 0 0 Pressure / MNm−2 Membership, µ 0.2 0.4 0.8 1.0 Balance point = 0.625 MNm−2

Overlapping area makes a double contribution to the 'mass'

Balance point = 0.527 MNm−2

solution is that the defuzzified value can never reach the extremes of the range. For example, if we know that a fuzzy variable has a membership of 1 for the fuzzy set high and 0 for the other fuzzy sets, then its actual value could be any value greater than or equal to MAX. However, its defuzzified value using this scheme would be the centroid of the high fuzzy set, in this case 0.612MNm–2, which is considerably below MAX.

An alternative solution is the mirror rule. During defuzzification only, the

low and high membership functions are treated as symmetrical shapes centered on MIN and MAX respectively. This is achieved by reflecting the low

and high fuzzy sets in imaginary mirrors. This method has been used in Figure 3.13(b), yielding a significantly different result, i.e., 0.625MNm–2, for the same possibility values. The method uses the full range MINMAX of the fuzzy variable during defuzzification, so that a fuzzy variable with a membership of 1 for the fuzzy set high and 0 for the other fuzzy sets would be defuzzified to MAX. In the example shown in Figure 3.13(b), all values of Ai became identical as a result of adding the mirrored versions of the low and high fuzzy sets. Because of this, and given that the fuzzy sets have been compressed using Larsen’s product operation rule, the equation for defuzzification (3.38) can be simplified to:

¦

¦

N i i N i i iC C 1 1 P P (3.39) A defuzzification anomaly

It is interesting to investigate whether defuzzification can be regarded as the inverse of fuzzification. In the example considered above, a pressure of 0.625MNm–2 would fuzzify to a membership of 0.25 for medium and 0.75 for

high. When defuzzified by the method shown in Figure 3.13(b), the original value of 0.625MNm–2 is returned. This observation provides strong support for defuzzification based upon Larsen’s product operation rule combined with the mirror rule for dealing with the fuzzy sets at the extremes (Figure 3.13(b)). No such simple relationship exists if the membership functions are truncated (Figure 3.11) or if the extremes are handled by imposing a range (Figure 3.13(a)).

However, even the use of Larsen’s product operation rule and the mirror rule cannot always guarantee that fuzzification and defuzzification will be straightforward inverses of each other. For example, as a result of firing a set

of fuzzy rules, we might end up with the following memberships for the fuzzy variable pressure:

Low membership = 0.25 Medium membership = 0.0 High membership = 0.25

Defuzzification of these membership values would yield an absolute value of 0.4MNm–2 for the pressure (Figure 3.14(a)). If we were now to look up the

fuzzy memberships for an absolute value of 0.4MNm–2, i.e., to fuzzify the

value, we would obtain: Low membership = 0.0 Medium membership = 1.0 High membership = 0.0

The resulting memberships values are clearly different from the ones we started with, although they still defuzzify to 0.4MNm–2, as shown in Figure

3.14(b). The reason for this anomaly is that, under defuzzification, there are many different combinations of membership values that can yield an absolute value such as 0.4MNm–2. The above sets of membership values are just two

examples. However, under fuzzification, there is only one absolute value, namely 0.4MNm–2, that can yield fuzzy membership values for low, medium,

and high of 0.0, 1.0, and 0.0, respectively. Thus, defuzzification is said to be a “many-to-one” relationship, whereas fuzzification is a “one-to-one”

(a) 0 Pressure / MNm−2 0.2 0.6 0.8 (b) 1 0 0 Pressure / MNm−2 Membership, µ 0.2 0.8 1.0 Balance point = 0.4 MNm−2 Balance point = 0.4 MNm−2 0.6 1 0 Membership, µ

membership values could be used depending on whether or not it is defuzzified and refuzzified before being passed on to those rules.

A secondary aspect of the anomaly is the observation that in the above example we began with possibility values of 0.25 and, therefore, apparently rather weak evidence about the pressure. However, as a result of defuzzification followed by fuzzification, these values are transformed into evidence that appears much stronger. Johnson and Picton [14] have labeled this “Hopgood’s defuzzification paradox.” The paradox arises because, unlike probabilities or certainty factors, possibility values need to be interpreted relative to each other rather than in absolute terms.

3.5 Other techniques

Possibility theory occupies a distinct position among the many strategies for handling uncertainty, as it is the only established one that is concerned specifically with uncertainty arising from imprecise use of language. Techniques have been developed for dealing with other specific sources of uncertainty. For example, plausibility theory [15] addresses the problems arising from unreliable or contradictory sources of information. Other techniques have been developed in order to overcome some of the perceived shortcomings of Bayesian updating and certainty theory. Notable among these are the Dempster–Shafer theory of evidence and Quinlan’s Inferno, both of which are briefly reviewed here.

None of the more sophisticated techniques for handling uncertainty overcomes the most difficult problem, namely, obtaining accurate estimates of the likelihood of events and combinations of events. For this reason, their use is rarely justified in practical knowledge-based systems.