Fuzzification and Defuzzification Tutorial

fuzzification and defuzzification code for matlab and fuzzification of set inclusion theory and applications and difference between fuzzification and defuzzification
Dr.NaveenBansal Profile Pic
Dr.NaveenBansal,India,Teacher
Published Date:25-10-2017
Your Website URL(Optional)
Comment
CHAPTER 4 PROPERTIES OF MEMBERSHIP FUNCTIONS, FUZZIFICATION, AND DEFUZZIFICATION ‘‘Let’s consider your age, to begin with – how old are you?’’ ‘‘I’m seven and a half, exactly.’’ ‘‘You needn’t say ‘exactually,’ ’’ the Queen remarked; ‘‘I can believe it without that. Now I’ll give you something to believe. I’m just one hundred and one, five months, and a day.’’ ‘‘I can’t believe that’’ said Alice. ‘‘Can’t you?’’ the Queen said in a pitying tone. ‘‘Try again; draw a long breath, and shut your eyes.’’ Alice laughed. ‘‘There’s no use trying,’’ she said; ‘‘one can’t believe impossible things.’’ LewisCarroll Through the Looking Glass, 1871 It is one thing to compute, to reason, and to model with fuzzy information; it is another to apply the fuzzy results to the world around us. Despite the fact that the bulk of the information we assimilate every day is fuzzy, like the age of people in the Lewis Carroll example above, most of the actions or decisions implemented by humans or machines are crisp or binary. The decisions we make that require an action are binary, the hardware we use is binary, and certainly the computers we use are based on binary digital instructions. For example, in making a decision about developing a new engineering product the eventual decision is to go forward with development or not; the fuzzy choice to ‘‘maybe go forward’’ might be acceptable in planning stages, but eventually funds are released for development or they are not. In giving instructions to an aircraft autopilot, it is not possible to turn the plane ‘‘slightly to the west’’; an autopilot device does not understand the natural language Fuzzy Logic with Engineering Applications, Second Edition T. J. Ross  2004 John Wiley & Sons, Ltd ISBNs: 0-470-86074-X (HB); 0-470-86075-8 (PB) www.MatlabSite.comFEATURES OF THE MEMBERSHIP FUNCTION 91 ◦ of a human. We have to turn the plane by 15 , for example, a crisp number. An electrical circuit typically is either on or off, not partially on. The bulk of this textbook illustrates procedures to ‘‘fuzzify’’ the mathematical and engineering principles we have so long considered to be deterministic. But in various applications and engineering scenarios there will be a need to ‘‘defuzzify’’ the fuzzy results we generate through a fuzzy systems analysis. In other words, we may eventually find a need to convert the fuzzy results to crisp results. For example, in classification and pattern recognition (see Chapter 11) we may want to transform a fuzzy partition or pattern into a crisp partition or pattern; in control (see Chapter 13) we may want to give a single-valued input to a semiconductor device instead of a fuzzy input command. This ‘‘defuzzification’’ has the result of reducing a fuzzy set to a crisp single-valued quantity, or to a crisp set; of converting a fuzzy matrix to a crisp matrix; or of making a fuzzy number a crisp number. Mathematically, the defuzzification of a fuzzy set is the process of ‘‘rounding it off’’ from its location in the unit hypercube to the nearest (in a geometric sense) vertex (see Chapter 1). If one thinks of a fuzzy set as a collection of membership values, or a vector of values on the unit interval, defuzzification reduces this vector to a single scalar quantity – presumably to the most typical (prototype) or representative value. Various popular forms of converting fuzzy sets to crisp sets or to single scalar values are introduced later in this chapter. FEATURESOFTHEMEMBERSHIPFUNCTION Since all information contained in a fuzzy set is described by its membership function, it is useful to develop a lexicon of terms to describe various special features of this function. For purposes of simplicity, the functions shown in the following figures will all be continuous, but the terms apply equally for both discrete and continuous fuzzy sets. Figure 4.1 assists in this description. The core of a membership function for some fuzzy set A is defined as that region of ∼ the universe that is characterized by complete and full membership in the set A.Thatis,the ∼ core comprises those elements x of the universe such that µ (x) = 1. A ∼ The support of a membership function for some fuzzy set A is defined as that region ∼ of the universe that is characterized by nonzero membership in the set A.Thatis, the ∼ support comprises those elements x of the universe such that µ (x) 0. A ∼ Core µ µ(x) 1 0 x Support Boundary Boundary FIGURE4.1 Core, support, and boundaries of a fuzzy set. www.MatlabSite.com92 PROPERTIES OF MEMBERSHIP FUNCTIONS m µ (x) m µ (x) A 1 1 A 0 x 0 x (a)(b) FIGURE4.2 Fuzzy sets that are normal (a) and subnormal (b). The boundaries of a membership function for some fuzzy set A are defined as ∼ that region of the universe containing elements that have a nonzero membership but not complete membership. That is, the boundaries comprise those elements x of the universe such that 0µ (x) 1. These elements of the universe are those with some degree of A ∼ fuzziness, or only partial membership in the fuzzy set A. Figure 4.1 illustrates the regions ∼ in the universe comprising the core, support, and boundaries of a typical fuzzy set. A normal fuzzy set is one whose membership function has at least one element x in the universe whose membership value is unity. For fuzzy sets where one and only one element has a membership equal to one, this element is typically referred to as the prototype of the set, or the prototypical element. Figure 4.2 illustrates typical normal and subnormal fuzzy sets. A convexfuzzysetisdescribedbyamembership function whose membership values are strictly monotonically increasing, or whose membership values are strictly monotoni- cally decreasing, or whose membership values are strictly monotonically increasing then strictly monotonically decreasing with increasing values for elements in the universe. Said another way, if, for any elements x, y,and z in a fuzzy set A, the relationxy z implies ∼ that µ (y) ≥ minµ (x), µ (z) (4.1) A A A ∼ ∼ ∼ then A is said to be a convex fuzzy set Ross, 1995. Figure 4.3 shows a typical convex ∼ fuzzy set and a typical nonconvex fuzzy set. It is important to remark here that this definition of convexity is different from some definitions of the same term in mathematics. In some areas of mathematics, convexity of shape has to do with whether a straight line through any part of the shape goes outside the boundaries of that shape. This definition of convexity is not used here; Eq. (4.1) succinctly summarizes our definition of convexity. µ(x) µ(x) A A 11 00 xy zxx xy z (a)(b) FIGURE4.3 Convex, normal fuzzy set (a) and nonconvex, normal fuzzy set (b). www.MatlabSite.comVARIOUS FORMS 93 m µ (x) AB 1 0 x FIGURE4.4 The intersection of two convex fuzzy sets produces a convex fuzzy set. A special property of two convex fuzzy sets, say A and B, is that the intersection of ∼ ∼ these two convex fuzzy sets is also a convex fuzzy set, as shown in Fig. 4.4. That is, for A ∼ and B, which are both convex, A ∩ B is also convex. ∼ ∼ ∼ The crossover points of a membership function are defined as the elements in the universe for which a particular fuzzy set A has values equal to 0.5, i.e., for which ∼ µ (x) = 0.5. A ∼ The height of a fuzzy set A is the maximum value of the membership function, i.e., ∼ hgt(A) = maxµ (x). If the hgt(A) 1, the fuzzy set is said to be subnormal. The hgt(A) A ∼ ∼ ∼ ∼ may be viewed as the degree of validity or credibility of information expressed by A Klir ∼ and Yuan, 1995. If A is a convex single-point normal fuzzy set defined on the real line, then A is often ∼ ∼ termed a fuzzy number. VARIOUSFORMS The most common forms of membership functions are those that are normal and convex. However, many operations on fuzzy sets, hence operations on membership functions, result in fuzzy sets that are subnormal and nonconvex. For example, the extension principle to be discussed in Chapter 12 and the union operator both can produce subnormal or nonconvex fuzzy sets. Membership functions can be symmetrical or asymmetrical. They are typically defined on one-dimensional universes, but they certainly can be described on multidimensional (or n-dimensional) universes. For example, the membership functions shown in this chapter are one-dimensional curves. In two dimensions these curves become surfaces and for three or more dimensions these surfaces become hypersurfaces. These hypersurfaces, or curves, are simple mappings from combinations of the parameters in the n-dimensional space to a membership value on the interval 0, 1. Again, this membership value expresses the degree of membership that the specific combination of parameters in the n-dimensional space has in a particular fuzzy set defined on the n-dimensional universe of discourse. The hypersurfaces for an n-dimensional universe are analogous to joint probability density functions; but, of course, the mapping for the membershipfunctionistomembershipina particular set and not to relative frequencies, as it is for probability density functions. www.MatlabSite.com94 PROPERTIES OF MEMBERSHIP FUNCTIONS m = 1.0 0.5 a 2 a 1 0 z x FIGURE4.5 An interval-valued membership function. Fuzzy sets of the types depicted in Fig. 4.2 are by far the most common ones encountered in practice; they are described by ordinary membership functions. However, several other types of fuzzy membership functions have been proposed Klir and Yuan, 1995 as generalized membership functions. The primary reason for considering other types of membership functions is that the values used in developing ordinary membership functions are often overly precise. They require that each element of the universe x on which the fuzzy set A is defined be assigned a specific membership value, µ (x). Suppose A ∼ ∼ the level of information is not adequate to specify membership functions with this precision. For example, we may only know the upper and lower bounds of membership grades for each element of the universe for a fuzzy set. Such a fuzzy set would be described by an interval-valued membership function, such as the one shown in Fig. 4.5. In this figure, for a particular element, x = z, the membership in a fuzzy set A, i.e., µ (z), would be expressed A ∼ ∼ by the membership interval α , α . Interval-valued fuzzy sets can be generalized further 1 2 by allowing their intervals to become fuzzy. Each membership interval then becomes an ordinary fuzzy set. This type of membership function is referred to in the literature as a type-2 fuzzy set. Other generalizations of the fuzzy membership functions are available as well see Klir and Yuan, 1995. FUZZIFICATION Fuzzification is the process of making a crisp quantity fuzzy. We do this by simply recognizing that many of the quantities that we consider to be crisp and deterministic are actually not deterministic at all: They carry considerable uncertainty. If the form of uncertainty happens to arise because of imprecision, ambiguity, or vagueness, then the variable is probably fuzzy and can be represented by a membership function. In the real world, hardware such as a digital voltmeter generates crisp data, but these data are subject to experimental error. The information shown in Fig. 4.6 shows one possible range of errors for a typical voltage reading and the associated membership function that might represent such imprecision. www.MatlabSite.comFUZZIFICATION 95 µ 1 Reading – + 1% 1% Voltage FIGURE4.6 Membership function representing imprecision in ‘‘crisp voltage reading.’’ µ Low voltage 1 Reading (crisp) 0.3 Membership Voltage (a) µ Reading (fuzzy) 1 Medium voltage 0.4 Membership Voltage (b) FIGURE4.7 Comparisons of fuzzy sets and crisp or fuzzy readings: (a) fuzzy set and crisp reading; (b) fuzzy set and fuzzy reading. The representation of imprecise data as fuzzy sets is a useful but not mandatory step when those data are used in fuzzy systems. This idea is shown in Fig. 4.7, where we consider the data as a crisp reading, Fig. 4.7a, or as a fuzzy reading, as shown in Fig. 4.7b.InFig.4.7a we might want to compare a crisp voltage reading to a fuzzy set, say ‘‘low voltage.’’ In the figure we see that the crisp reading intersects the fuzzy set ‘‘low voltage’’ at a membership of 0.3, i.e., the fuzzy set and the reading can be said to agree at a membership value of 0.3. In Fig. 4.7b the intersection of the fuzzy set ‘‘medium voltage’’ and a fuzzified voltage reading occurs at a membership of 0.4. We can see in Fig. 4.7b that the set intersection of the two fuzzy sets is a small triangle, whose largest membership occurs at the membership value of 0.4. www.MatlabSite.com96 PROPERTIES OF MEMBERSHIP FUNCTIONS We will say more about the importance of fuzzification of crisp variables in Chapters 8 and 13 of this text. In Chapter 8 the topic is simulation, and the inputs for any nonlinear or complex simulation will be expressed as fuzzy sets. If the process is inherently quantitative or the inputs derive from sensor measurements, then these crisp numerical inputs could be fuzzified in order for them to be used in a fuzzy inference system (to be discussed in Chapter 5). In Chapter 13 the topic is fuzzy control, and, again, this is a discipline where the inputs generally originate from a piece of hardware, or a sensor and the measured input could be fuzzified for utility in the rule-based system which describes the fuzzy controller. If the system to be controlled is not hardware based, e.g., the control of an economic system or the control of an ecosystem subjected to a toxic chemical, then the inputs could be scalar quantities arising from statistical sampling, or other derived numerical quantities. Again, for utility in fuzzy systems, these scalar quantities could first be fuzzified, i.e., translated into a membership function, and then used to form the input structure necessary for a fuzzy system. DEFUZZIFICATIONTOCRISPSETS We begin by considering a fuzzy set A, then define a lambda-cut set, A ,where 0 ≤ λ ≤ 1. λ ∼ The set A is a crisp set called the lambda (λ)-cut (or alpha-cut) set of the fuzzy set A, λ ∼ where A =xµ (x) ≥ λ. Note that the λ-cut set A does not have a tilde underscore; λ A λ ∼ it is a crisp set derived from its parent fuzzy set, A. Any particular fuzzy set A can be ∼ ∼ transformed into an infinite number of λ-cut sets, because there are an infinite number of values λ on the interval 0, 1. Any element x ∈ A belongs to A with a grade of membership that is greater than or λ ∼ equal to the value λ. The following example illustrates this idea. Example4.1. Let us consider the discrete fuzzy set, using Zadeh’s notation, defined on universe X=a,b,c,d,e,f ,   1 0.9 0.6 0.3 0.01 0 A = + + + + + ∼ a b c d e f This fuzzy set is shown schematically in Fig. 4.8. We can reduce this fuzzy set into several λ-cut sets, all of which are crisp. For example, we can define λ-cut sets for the values of λ = 1, + 0.9, 0.6, 0.3, 0 , and 0. A =a, A =a,b 1 0.9 A =a,b,c, A =a,b,c,d 0.6 0.3 A + =a,b,c,d,e, A = X 0 0 µ 0.9 1 0.6 0.3 0.01 0.0 FIGURE4.8 0 ab c d e f x A discrete fuzzy set A. ∼ www.MatlabSite.comDEFUZZIFICATION TO CRISP SETS 97 χ χ 1 1 A A 1 0.3 0 ab c d e f x 0 ab c d e f x χ χ 1 1 A + A 0.9 0 0 ab c d e f x 0 ab c d e f x χ χ 1 1 A A 0.6 0 0 ab c d e f x 0 ab c d e f x FIGURE4.9 + Lambda-cut sets for λ = 1, 0.9, 0.6, 0.3, 0 ,0. + The quantity λ = 0 is defined as a small ‘‘ε’’ value 0, i.e., a value just greater than zero. By definition, λ = 0 produces the universe X, since all elements in the universe have at least a 0 membership value in any set on the universe. Since all A are crisp sets, all the λ elements just shown in the example λ-cut sets have unit membership in the particular λ-cut set. For example, for λ = 0.3, the elements a, b, c,and d of the universe have a membership of 1inthe λ-cut set, A , and the elements e and f of the universe have a membership of 0 0.3 in the λ-cut set, A . Figure 4.9 shows schematically the crisp λ-cut sets for the values λ = 1, 0.3 + 0.9, 0.6, 0.3, 0 , and 0. Notice in these plots of membership value versus the universe X that the effect of a λ-cut is to rescale the membership values: to one for all elements of the fuzzy set A having membership values greater than or equal to λ, and to zero for all elements of the ∼ fuzzy set A having membership values less than λ. ∼ We can express λ-cut sets using Zadeh’s notation. For the example, λ-cut sets for the values λ = 0.9 and 0.25 are given here:     1 1 0 0 0 0 1 1 1 1 0 0 A = + + + + + A = + + + + + 0.9 0.25 a b c d e f a b c d e f λ-cut sets obey the following four very special properties: 1. (A ∪ B) = A ∪ B (4.1a) λ λ λ ∼ ∼ 2. (A ∩ B) = A ∩ B (4.1b) λ λ λ ∼ ∼ 3. (A) = A except for a value of λ = 0.5 (4.1c) λ λ ∼ 4. For any λ ≤ α, where 0 ≤ α ≤ 1, it is true that A ⊆ A , where A = X (4.1d) α λ 0 www.MatlabSite.com98 PROPERTIES OF MEMBERSHIP FUNCTIONS µ Fuzzy set A 1 λ λ = 0.6 = λ λ 0.3 x 0 A 0.6 A 0.3 FIGURE4.10 Two different λ-cut sets for a continuous-valued fuzzy set. These properties show that λ-cuts on standard operations on fuzzy sets are equivalent with standard set operations on λ-cut sets. The last operation, Eq. (4.1d), can be shown more conveniently using graphics. Figure 4.10 shows a continuous-valued fuzzy set with two λ-cut values. Notice in the graphic that for λ = 0.3 and α = 0.6,A has a greater domain 0.3 than A , i.e., for λ ≤α(0.3 ≤ 0.6),A ⊆ A . 0.6 0.6 0.3 In this chapter, various definitions of a membership function are discussed and illustrated. Many of these same definitions arise through the use of λ-cut sets. As seen in Fig. 4.1, we can provide the following definitions for a convex fuzzy set A. The core of A is ∼ ∼ + the λ = 1 cut set, A . The support of A is the λ-cut set A +,where λ = 0 , or symbolically, 1 0 ∼ A + =x µ 0. The intervals A +,A form the boundaries of the fuzzy set A, i.e., 0 A(x) 0 1 ∼ ∼ those regions that have membership values between 0 and 1 (exclusive of 0 and 1): that is, for 0λ 1. λ-CUTSFORFUZZYRELATIONS In Chapter 3, a biotechnology example, Example 3.11, was developed using a fuzzy relation that was reflexive and symmetric. Recall this matrix,   10.80 0.10.2   0.81 0.40 0.9     R = 00.4 100 ∼     0.1 001 0.5 0.20.90 0.51 We can define a λ-cut procedure for relations similar to the one developed for sets. Consider a fuzzy relation R, where each row of the relational matrix is considered a fuzzy ∼ set, i.e., the jth row in R represents a discrete membership function for a fuzzy set, R . j ∼ ∼ Hence, a fuzzy relation can be converted to a crisp relation in the following manner. Let us define R =(x, y) µ (x, y) ≥ λ as a λ-cut relation of the fuzzy relation, R.Since λ R ∼ ∼ in this case R is a two-dimensional array defined on the universes X and Y, then any pair ∼ (x, y) ∈ R belongs to R with a ‘‘strength’’ of relation greater than or equal to λ.These λ ∼ ideas for relations can be illustrated with an example. www.MatlabSite.comDEFUZZIFICATION TO SCALARS 99 Example4.2. Suppose we take the fuzzy relation from the biotechnology example in Chapter 3 (Example 3.11), and perform λ-cut operations for the values of λ = 1, 0.9, 0. These crisp relations are given below:   1 000 0   0 100 0   λ = 1, R =0 010 0 1   0 001 0 0 000 1   100 00 010 01   λ = 0.9, R = 001 00   0.9   000 10 010 01 λ = 0, R = E (whole relation; see Chapter 3) 0 ∼ λ-cuts on fuzzy relations obey certain properties, just as λ-cuts on fuzzy sets do (see Eqs. (4.1)), as given in Eqs. (4.2): 1.(R ∪ S) = R ∪ S (4.2a) λ λ ∼ ∼ λ 2.(R ∩ S) = R ∩ S (4.2b) λ λ ∼ ∼ λ 3.(R) = R (4.2c) λ ∼ λ 4. For any λ ≤ α, 0 ≤ α ≤ 1, then R ⊆ R (4.2d) α λ DEFUZZIFICATIONTOSCALARS As mentioned in the introduction, there may be situations where the output of a fuzzy process needs to be a single scalar quantity as opposed to a fuzzy set. Defuzzification is the conversion of a fuzzy quantity to a precise quantity, just as fuzzification is the conversion of a precise quantity to a fuzzy quantity. The output of a fuzzy process can be the logical union of two or more fuzzy membership functions defined on the universe of discourse of the output variable. For example, suppose a fuzzy output is comprised of two parts: the first part, C , a trapezoidal shape, shown in Fig. 4.11a, and the second part, C , a triangular 1 2 ∼ ∼ membership shape, shown in Fig. 4.11b. The union of these two membership functions, i.e., C = C ∪ C , involves the max operator, which graphically is the outer envelope of 1 2 ∼ ∼ ∼ the two shapes shown in Figs. 4.11a and b; the resulting shape is shown in Fig. 4.11c.Of course, a general fuzzy output process can involve many output parts (more than two), and the membership function representing each part of the output can have shapes other than triangles and trapezoids. Further, as Fig. 4.11a shows, the membership functions may not always be normal. In general, we can have k C = C = C (4.3) k i ∼ ∼ ∼ i=1 www.MatlabSite.com100 PROPERTIES OF MEMBERSHIP FUNCTIONS µ µ 1 1 0.5 0 24 68 10 z 0 68 10 z (a) (b) µ 1 0.5 z 0 24 6 8 10 (c) FIGURE4.11 Typical fuzzy process output: (a) first part of fuzzy output; (b) second part of fuzzy output; (c) union of both parts. Among the many methods that have been proposed in the literature in recent years, seven are described here for defuzzifying fuzzy output functions (membership functions) Hellendoorn and Thomas, 1993. Four of these methods are first summarized and then illustrated in two examples; then the additional three methods are described, then illustrated in two other examples. 1. Max membership principle: Also known as the height method, this scheme is limited to peaked output functions. This method is given by the algebraic expression ∗ µ (z ) ≥ µ (z) for all z ∈Z(4.4) C C ∼ ∼ ∗ where z is the defuzzified value, and is shown graphically in Fig. 4.12. µ 1 z z FIGURE4.12 Max membership defuzzification method. www.MatlabSite.comDEFUZZIFICATION TO SCALARS 101 µ 1 FIGURE4.13 z z Centroid defuzzification method. 2. Centroid method: This procedure (also called center of area, center of gravity) is the most prevalent and physically appealing of all the defuzzification methods Sugeno, 1985; Lee, 1990; it is given by the algebraic expression µ (z) · z dz C ∼ ∗ z = (4.5) µ (z) dz C ∼ where denotes an algebraic integration. This method is shown in Fig. 4.13. 3. Weighted average method: The weighted average method is the most frequently used in fuzzy applications since it is one of the more computationally efficient methods. Unfortunately it is usually restricted to symmetrical output membership functions. It is given by the algebraic expression µ (z) · z C ∼ ∗ z = (4.6) µ (z) C ∼ where denotes the algebraic sum and where z is the centroid of each symmetric membership function. This method is shown in Fig. 4.14. The weighted average method is formed by weighting each membership function in the output by its respective maximum membership value. As an example, the two functions shown in Fig. 4.14 would result in the following general form for the defuzzified value: a(0.5) + b(0.9) ∗ z = 0.5 + 0.9 µ 1 0.9 0.5 0 ab z FIGURE4.14 Weighted average method of defuzzification. www.MatlabSite.com102 PROPERTIES OF MEMBERSHIP FUNCTIONS µ 1 0 az z b FIGURE4.15 Mean max membership defuzzification method. Since the method is limited to symmetrical membership functions, the values a and b are the means (centroids) of their respective shapes. 4. Mean max membership: This method (also called middle-of-maxima) is closely related to the first method, except that the locations of the maximum membership can be nonunique (i.e., the maximum membership can be a plateau rather than a single point). This method is given by the expression Sugeno, 1985; Lee, 1990 a + b ∗ z = (4.7) 2 where a and b are as defined in Fig. 4.15. Example4.3. A railroad company intends to lay a new rail line in a particular part of a county. The whole area through which the new line is passing must be purchased for right-of-way considerations. It is surveyed in three stretches, and the data are collected for analysis. The surveyed data for the road are given by the sets, B ,B ,and B , where the sets are defined on 1 2 3 ∼ ∼ ∼ the universe of right-of-way widths, in meters. For the railroad to purchase the land, it must have an assessment of the amount of land to be bought. The three surveys on right-of-way width are ambiguous, however, because some of the land along the proposed railway route is already public domain and will not need to be purchased. Additionally, the original surveys are so old (circa 1860) that some ambiguity exists on boundaries and public right-of-way for old utility lines and old roads. The three fuzzy sets, B ,B ,and B , shown in Figs. 4.16, 4.17, and 4.18, 1 2 3 ∼ ∼ ∼ respectively, represent the uncertainty in each survey as to the membership of right-of-way width, in meters, in privately owned land. We now want to aggregate these three survey results to find the single most nearly representative right-of-way width (z) to allow the railroad to make its initial estimate of the µ 0.3 015 234 z(m) FIGURE4.16 Fuzzy set B : public right-of-way width (z) for survey 1. 1 ∼ www.MatlabSite.comDEFUZZIFICATION TO SCALARS 103 µ 1 0.5 z(m) 2 34567 FIGURE4.17 Fuzzy set B : public right-of-way width (z) for survey 2. 2 ∼ µ 1 0.5 3 45678 z(m) FIGURE4.18 Fuzzy set B : public right-of-way width (z) for survey 3. 3 ∼ right-of-way purchasing cost. Using Eqs. (4.5)–(4.7) and the preceding three fuzzy sets, we ∗ want to find z . ∗ According to the centroid method, Eq. (4.5), z can be found using µ (z) · z dz B ∼ ∗ z = µ (z) dz B ∼    1 3.6 4 5.5 z − 3.6 = (0.3z)z dz + (0.3z) dz + z dz + (0.5)z dz 2 0 1 3.6 4    6 7 8 7 − z + (z − 5.5)z dz + z dz + z dz 2 5.5 6 7    1 3.6 4 5.5 z − 3.6 ÷ (0.3z) dz + (0.3) dz + dz + (0.5) dz 2 0 1 3.6 4      6 7 8 z − 5.5 7 − z + dz + dz + dz 2 2 5.5 6 7 = 4.9 meters www.MatlabSite.com104 PROPERTIES OF MEMBERSHIP FUNCTIONS µ 1 0.5 0.3 z 0 z 18 234567 FIGURE4.19 ∗ The centroid method for finding z . ∗ where z is shown in Fig. 4.19. According to the weighted average method, Eq. (4.6), (0.3 × 2.5) + (0.5 × 5) + (1 × 6.5) ∗ z = = 5.41 meters 0.3 + 0.5 + 1 ∗ and is shown in Fig. 4.20. According to the mean max membership method, Eq. (4.7), z is given by (6 + 7)/2 = 6.5 meters, and is shown in Fig. 4.21. µ 1 0.5 0.3 z z 018 234567 FIGURE4.20 ∗ The weighted average method for finding z . µ 1 0.5 0.3 z 018 234567 z FIGURE4.21 ∗ The mean max membership method for finding z . www.MatlabSite.comDEFUZZIFICATION TO SCALARS 105 Example4.4. Many products, such as tar, petroleum jelly, and petroleum, are extracted from crude oil. In a newly drilled oil well, three sets of oil samples are taken and tested for their viscosity. The results are given in the form of the three fuzzy sets B ,B ,and B ,all defined 1 2 3 ∼ ∼ ∼ on a universe of normalized viscosity, as shown in Figs. 4.22–4.24. Using Eqs. (4.4)–(4.6), we want to find the most nearly representative viscosity value for all three oil samples, and ∗ hence find z for the three fuzzy viscosity sets. µ 1 0.5 z 0 12345 FIGURE4.22 Membership in viscosity of oil sample 1, B . 1 ∼ µ 1 0.5 z 0 12345 FIGURE4.23 Membership in viscosity of oil sample 2, B . 2 ∼ µ 1 0.5 0 z 12345 FIGURE4.24 Membership in viscosity of oil sample 3, B . 3 ∼ www.MatlabSite.com106 PROPERTIES OF MEMBERSHIP FUNCTIONS µ 1 0.5 z 0 12345 z FIGURE4.25 Logical union of three fuzzy sets B ,B ,andB . 1 2 3 ∼ ∼ ∼ ∗ To find z using the centroid method, we first need to find the logical union of the three fuzzy sets. This is shown in Fig. 4.25. Also shown in Fig. 4.25 is the result of the max ∗ membership method, Eq. (4.4). For this method, we see that µ (z ) has three locations where B ∼ the membership equals unity. This result is ambiguous and, in this case, the selection of the intermediate point is arbitrary, but it is closer to the centroid of the area shown in Fig. 4.25. There could be other compelling reasons to select another value in this case; perhaps max membership is not a good metric for this problem. According to the centroid method, Eq. (4.5), µ (z)z dz B ∼ ∗ z = µ (z) dz B ∼  1.5 1.8 2 2.33 = (0.67z)z dz + (2 − 0.67z)z dz + (z − 1)z dz + (3 − z)z dz 0 1.5 1.8 2  3 5 + (0.5z − 0.5)z dz + (2.5 − 0.5z)z dz 2.33 3  1.5 1.8 2 2.33 ÷ (0.67z) dz + (2 − 0.67z) dz + (z − 1) dz + (3 − z) dz 0 1.5 1.8 2  3 5 + (0.5z − 0.5) dz + (2.5 − 0.5z) dz 2.33 3 = 2.5 meters ∗ The centroid value obtained, z , is shown in Fig. 4.26. According to the weighted average method, Eq. (4.6), (1 × 1.5) + (1 × 2) + (1 × 3) ∗ z = = 2.25 meters 1 + 1 + 1 andisshowninFig.4.27. Three other popular methods, which are worthy of discussion because of their appearance in some applications, are the center of sums, center of largest area, and first of maxima methods Hellendoorn and Thomas, 1993. These methods are now developed. www.MatlabSite.comDEFUZZIFICATION TO SCALARS 107 µ 1 0.5 z 0 12345 z FIGURE4.26 ∗ Centroid value z for three fuzzy oil samples. µ 1 0.5 ac b z 0 12345 z FIGURE4.27 ∗ Weighted average method for z . 5. Center of sums: This is faster than many defuzzification methods that are presently in use, and the method is not restricted to symmetric membership functions. This process involves the algebraic sum of individual output fuzzy sets, say C and C , instead of their 1 2 ∼ ∼ union. Two drawbacks to this method are that the intersecting areas are added twice, and the method also involves finding the centroids of the individual membership functions. ∗ The defuzzified value z is given by the following equation: n z µ (z) dz C k ∼ Z k=1 ∗ z = (4.8) n µ (z) dz C k ∼ z k=1 where the symbol z is the distance to the centroid of each of the respective membership functions. This method is similar to the weighted average method, Eq. (4.6), except in the center of sums method the weights are the areas of the respective membership functions whereas in the weighted average method the weights are individual membership values. Figure 4.28 is an illustration of the center of sums method. www.MatlabSite.com108 PROPERTIES OF MEMBERSHIP FUNCTIONS µ 1.0 C 1 0.5 0 2468 10 z (a) µ µ 1.0 1.0 C 2 0.5 0.5 z z 0 2468 10 0 2468 10 z (b) (c) FIGURE4.28 Center of sums method: (a) first membership function; (b) second membership function; and (c) defuzzification step. 6. Center of largest area: If the output fuzzy set has at least two convex subregions, then ∗ the center of gravity (i.e., z is calculated using the centroid method, Eq. (4.5)) of the ∗ convex fuzzy subregion with the largest area is used to obtain the defuzzified value z of the output. This is shown graphically in Fig. 4.29, and given algebraically here: µ (z)z dz C m ∼ ∗ z = (4.9) µ (z) dz C m ∼ where C is the convex subregion that has the largest area making up C . This condition m k ∼ ∼ applies in the case when the overall output C is nonconvex; and in the case when C is k k ∼ ∼ ∗ convex, z is the same quantity as determined by the centroid method or the center of largest area method (because then there is only one convex region). 7. First (or last) of maxima: This method uses the overall output or union of all individual output fuzzy sets C to determine the smallest value of the domain with maximized k ∼ ∗ membership degree in C . The equations for z are as follows. k ∼ First, the largest height in the union (denoted hgt(C )) is determined, k ∼ hgt(C ) = supµ (z) (4.10) k C k ∼ ∼ z∈Z www.MatlabSite.comDEFUZZIFICATION TO SCALARS 109 µ 1.0 0.5 0 246 8 10 z z FIGURE4.29 Center of largest area method (outlined with bold lines), shown for a nonconvex C . k ∼ Then the first of the maxima is found,   z∗= inf z ∈ Z µ (z) = hgt(C ) (4.11) C k k ∼ ∼ z∈Z An alternative to this method is called the last of maxima, and it is given by   ∗ z = sup z ∈ Z µ (z) = hgt(C ) (4.12) C k k ∼ ∼ z∈Z In Eqs. (4.10)–(4.12) the supremum (sup) is the least upper bound and the infimum (inf) is the greatest lower bound. Graphically, this method is shown in Fig. 4.30, where, in the case illustrated in the figure, the first max is also the last max and, because it is a distinct max, is also the mean max. Hence, the methods presented in Eqs. (4.4) (max or height), (4.7) (mean max), (4.11) (first max), and (4.12) (last max) all provide the same ∗ defuzzified value, z , for the particular situation illustrated in Fig. 4.30. µ 1.0 0.5 0 246 8 10 z z FIGURE4.30 First of max (and last of max) method. www.MatlabSite.com

Advise: Why You Wasting Money in Costly SEO Tools, Use World's Best Free SEO Tool Ubersuggest.