12- FUZZY ARITMETIC AND THE EXTENSION PRINCIPLE 2 EXTENSION PRINCIPLE FIGURE 12-1 A simple single-input, single-output mapping (function). variable as shown in Figure 12.1. This relationship is a singleinput, single-output process where the transfer function (the box in Figure 12.1) represents the mapping provided by the general function f . In the typical case, f is of analytic form, for example, y = f (x),the input, x, is deterministic, and the resulting output, y, is also deterministic. 3 Crisp Functions, Mapping, and Relations Functions (also called transforms), such as the logarithmic function, y = log(x), or the linear function y = ax + b, are mappings from one universe, X, to another universe,Y. Symbolically, this mapping (function, f ) is sometimes denoted f: X → Y . Other terminology calls the mapping y = f (x) the image of x under f and the inverse mapping, x = f−1(y) , is termed the original image of y. A mapping can also be expressed by a relation R (as described in Chapter 3), on the Cartesian space X × Y. Such a relation (crisp) can be described symbolically as R = (x, y)|y = f (x), with the characteristic function describing the membership of specific x, y pairs to the relation R as 4 Crisp Functions, Mapping, and Relations Now, since we can define transform functions, or mappings, for specific elements of one universe (x) to specific elements of another universe (y), we can also do the same thing for collections of elements in X mapped to collections of elements in Y. Such collections have been referred to in this text as sets. Presumably, then, all possible sets in the power set of X can be mapped in some fashion (there may be null mapping formany of the combinations) to the sets in the power set of Y, that is, f : P(X) → P(Y). For a set A defined on universe X, its image, set B on the universe Y, is found fromthe mapping, B = f (A) = y| for all x ∈ A , y = f (x), where B will be defined by its characteristic valu 5 Crisp Functions, Mapping, and Relations Example 1. Suppose we have a crisp set A = 0, 1, or, using Zadeh’s notation and a simple mapping find the resulting crisp set B on an output universe Y using the extension principle. From the mapping, we can see that the universe Y will be Y = {2, 6, 10}. The mapping described in Equation will yield the following calculations for the membership values of each of the elements in universe Y: 6 Crisp Functions, Mapping, and Relations Notice that there is only one way to get the element 2 in the universe Y, but there are two ways to get the elements 6 and 10 in Y. Written in Zadeh’s notation this mapping results in the output or, alternatively, B = {2, 6}. Suppose we want to find the image B on universe Y using a relation that expresses the mapping. 7 Crisp Functions, Mapping, and Relations The image B can be found through composition (since X and Y are finite) : that is, B = A ◦ R (we note here that any set, say A, can be regarded as a one dimensional relation), where, again using Zadeh’s notation, and B is found by means of Equation (3.9) to be or in Zadeh’s notation on Y, 8 Functions of Fuzzy Sets – Extension Principle The membership functions describing A∼ and B∼ will now be defined on the universe of a unit interval [0, 1] and for the fuzzy case Equation. A convenient shorthand for many fuzzy calculations that utilize matrix relations involves the fuzzy vector. Basically, a fuzzy vector is a vector containing fuzzy membership values. Suppose the fuzzy set A∼ is defined on n elements in X, for instance on x1, x2, . . . , xn, and fuzzy set B∼ is defined on m elements in Y, say on y1, y2, . . . , ym. The array of membership functions for each of the fuzzy sets A∼and B∼ can then be reduced to fuzzy vectors by the following substitutions: 9 Functions of Fuzzy Sets – Extension Principle The image of fuzzy set A∼ can be determined through the use of the compositionm operation, or B∼=A ∼ ◦ R∼, or when using the fuzzy vector form, b∼=a∼◦ R∼ where R∼ is an n × m fuzzy relation matrix. More generally, suppose our input universe comprises the Cartesian product of many universes. Then, the mapping f is defined on the power sets of this Cartesian input space and the output space, or Let fuzzy sets A∼1,A∼2, . . . ,A∼n be defined on the universes X1,X2, . . .,Xn. The mapping for these particular in put sets can now be defined as B∼= f(A∼1,A∼2, . . . ,A∼n), where the membership function of the image B∼ is given by 10 Fuzzy Transform (Mapping) Formally, let a mapping exist from an element x in universe X(x ∈ X) to a fuzzyset B∼ in the power set of universe Y, P(Y). Such a mapping is called a fuzzy mapping, f∼, where the output is no longer a single element, y, but a fuzzy set B∼, that is, B∼=f∼(x). If X and Y are finite universes, the fuzzy mapping expressed in Equation B∼=f∼(x). can be described as a fuzzy relation, R∼ , or, in matrix form, 11 Fuzzy Transform (Mapping) For a particular single element of the input universe, say xi , its fuzzy image, B∼i =f∼(xi ), is given in a general symbolic form as or, in fuzzy vector notation, Suppose we now further generalize the situation where a fuzzy input set, say A∼,maps to a fuzzy output through a fuzzy mapping, or The extension principle again can be used to find this fuzzy image, B∼ , by the following expression: 12 Fuzzy Transform (Mapping) The preceding expression is analogous to a fuzzy composition performed on fuzzy vectors, or b∼=a∼◦R∼ , or, in vector form, where b∼j is the j th element of the fuzzy image B∼. 13 Fuzzy Transform (Mapping) Example 2. Suppose we have a fuzzy mapping, f∼, given by the following fuzzy relation,R∼: which represents a fuzzy mapping between the length and mass of test articles scheduledfor flight in a space experiment. The mapping is fuzzy because of the complicated relationship between mass and the cost to send the mass into space, the constraints on length of the test articles fitted into the cargo section of the spacecraft, and the scientific value of the experiment. Suppose a particular experiment is being planned for flight, but specific mass requirements have not been determined. For planning purposes, the mass (kilograms) is presumed to be a fuzzy quantity described by the following membership function: 14 Fuzzy Transform (Mapping) or, as a fuzzy vector, a∼= {0.8, 1, 0.6, 0.2, 0} kg. The fuzzy image B∼ can be found using the extension principle (or, equivalently, composition for this fuzzy mapping), b∼=a∼◦R∼ (recall that a set is also a one-dimensional relation). This composition results in a fuzzy output vector describing the fuzziness in the length of the experimental object (meters), to be used for planning purposes, or b∼={0.8, 1, 0.8, 0.6, 0.2} m. 15 Practical Considerations Suppose there is a mapping between elements, u, of one universe, U, onto elements, v, of another universe, V, through a function f . Let this mapping be described by f : u → v. Define A∼ to be a fuzzy set on universe U; that is, A∼⊂ U. This relation is described bythe membership functio The mapping in Equation is said to be one-toone. 16 Practical Considerations Example 3. Let a fuzzy set A∼ be defined on the universe U = {1, 2, 3}. We wish to map elements of this fuzzy set to another universe, V, under the function We see that the elements of V are V = {1, 3, 5}. Suppose the fuzzy set A∼is given as Then, the fuzzy membership function for v = f (u) = 2u − 1 would be For cases where this functional mapping f maps products of elements from two universes, say U1 and U2, to another universe V, and we define A∼ as a fuzzy set on the Cartesian space U1 × U2, then 17 Practical Considerations Example 4. Suppose we have integers 1–10 as the elements of two identical but different universes. Let Then, define two fuzzy numbers U2,respectively: A∼and B∼ on universe U1 and The product of (“approximately 2”) × (“approximately 6”) should map to a fuzzy number “approximately 12,” which is a fuzzy set defined on a universe, say V, of integers, V = 5, 6, . . . , 18, 21, as determined by the extension principle, or 18 Practical Considerations The complexity of the extension principle increases when we consider more than one of the combinations of the input variables, U1 and U2, mapped to the same variable in the output space, V, that is, the mapping is not one-to-one. In this case, we take the maximum membership grades of the combinations mapping to the same output variable, or, for the following mapping, we get 19 Practical Considerations Example 5. We want to map ordered pairs from input universes X1 = {a, b} and X2 ={1, 2, 3} to an output universe, Y = {x, y, z}. The mapping is given by the crisp relation, R, We note that this relation represents a mapping, and it does not contain membership values. We define a fuzzy set A∼ on universe X1 and a fuzzy set B∼on universe X2 as 20 Practical Considerations We wish to determine the membership function of the output, C∼= f(A∼,B∼ ), whose relational mapping, f , is described by R. This is accomplished with the extension principle, Hence, 21 Practical Considerations Example 6. Suppose we have a nonlinear system given by the harmonic function x∼= cos(ω∼t ), where the frequency of excitation, ω∼, is a fuzzy variable described by the membership function shown in Figure 12.2a. The output variable, x∼, will be fuzzy because of the fuzziness provided in the mapping from the input variable, ω∼. This function represents a one-to-one mapping in two stages, ω∼→ ω∼t → x∼. The membership function of x∼ will be determined through the use of the extension principle, which for this example will take on the following form: To show the development of this expression, we will take several time points, such as t = 0, 1, . . . . For t = 0, all values of ω∼ map into a single point in the ω∼t domain, that is, ω∼t = 0, and into a single point in the x universe, that is, x = 1. Hence, the membership of 22 Practical Considerations FIGURE 12.2 Extension principle applied to x∼= cos(ω∼t ), at t = 23 Practical Considerations x∼is simply a singleton at x = 1, that is, 24 Practical Considerations FIGURE 12.3 Extension principle applied to x∼= cos(ω∼t ) showing (a) uncertainty in w, (b) uncertainty in wt, and (c) the overlap in the support of x as t increases. 25 FUZZY ARITHMETIC Let I∼ and J∼ be two fuzzy numbers, with I∼ defined on the real line in universe X andJ∼ defined on the real line in universe Y, and let the symbol * denote a general arithmetic operation, that is, * ≡ {+, −, ×, ÷}. An arithmetic operation (mapping) between these two number, denoted I∼∗J∼ , will be defined on universe Z, and can be accomplished usingthe extension principle, as 26 FUZZY ARITHMETIC FIGURE 12.4 Extension principle applied to x∼= cos(ω∼t ) when t causes complete fuzziness Equation top results in another fuzzy set, the fuzzy number resulting from the arithmeticoperation on fuzzy numbers I∼and J∼ 27 FUZZY ARITHMETIC Example 7. We want to perform a simple addition (∗ ≡ +) of two fuzzy numbers. Define a fuzzy one by the normal, convex membership function defined on the integers, Now, we want to add “ fuzzy one” plus “fuzzy one,” using the extension principle 28 FUZZY ARITHMETIC Note that there are two ways to get the resulting membership value for a 1 (0 + 1 and 1 +0), three ways to get a 2 (0 + 2, 1 + 1, 2 + 0), and two ways to get a 3 (1 + 2 and 2 +1). These are accounted for in the implementation of the extension principle.The support for a fuzzy number, say I∼ (Chapter 4), is given as we can find the support of the fuzzy number resulting from the arithmetic operation,I∼∗J∼, that is, also valid for general arithmetic operations: 29 INTERVAL ANALYSIS IN ARITHMETIC When a = b and c = d, these interval numbers degenerate to a scalar real number. We again define a general arithmetic property with the symbol *, where * ≡ {+, −, ×, ÷}. 30 INTERVAL ANALYSIS IN ARITHMETIC Symbolically, the operation for three intervals, I, J, and K, 31 INTERVAL ANALYSIS IN ARITHMETIC Example 8. Consider the following example of subdistributivity. For I = [1, 2], J = [2, 3], K = [1, 4], 32 APPROXIMATE METHODS OF EXTENSION A serious disadvantage of the discretized form of the extension principle in propagating fuzziness for continuous-valued mappings is the irregular and erroneous membership functions determined for the output variable if the membership functions of the input variables are discretized for numerical convenience. The reason for this anomaly is that the solution to the extension principle, is really a nonlinear programming problem for continuous-valued functions. It is well known that, in any optimization process, discretization of any variables can lead to an erroneous optimum solution because portions of the solution space are omitted in the calculations. For example, try to plot a 10th-order curve with a series of equally spaced points; some local minimum and maximum points on the curve are going to be missed if the discretization is not small enough. Again, these problems do not arise because of any inherent problems in the extension principle itself; they arise when continuous-valued functions are discretized, then allowed to propagate from the input domain to the output domain using the extension principle. Other methods have been proposed to ease the computational burden in implementing the extension principle for continuous-valued functions and mappings. Among the alternative methods proposed in the literature to avoid this disadvantage for continuous fuzzy variables are three approaches that are summarized here along with illustrative numerical examples. All of these approximate methods make use of intervals, at various λ-cut levels, in defining membership functions. 33 Vertex Method The algorithm works as follows. Any continuous membership function can be represented by a continuous sweep of λ-cut intervals from λ = 0+ to λ = 1. Figure 12.5 shows a typical membership function with an interval associated with a specific value of λ . Suppose we have a single-input mapping given by y = f (x) that is to be extended for fuzzy sets, or B∼= f (A∼), and we want to decompose A∼ into a series of λ-cut intervals, say Iλ. When the function f (x) is continuous and monotonic on Iλ = [a, b], the interval representing B∼at a particular value of λ , say Bλ, can be obtained as 34 Vertex Method FIGURE 12.5 Interval corresponding to a λ-cut level on fuzzy set A∼. 35 Vertex Method FIGURE 12.6 Three-dimensional Cartesian region involving intervals for three input variables, x1, x2, and x3. Figure 12.6. Each of the input variables can be described by an interval, say Iiλ, at a specific λ-cut, where 36 Vertex Method The value of the interval function for a particular λ-cut can be obtained as where cj is the coordinate of the j th vertex representing the n-dimensional Cartesian region. where j = 1, 2, . . . , N and k = 1, 2, . . . , m for m extreme points in the region 37 Vertex Method Example 9. We wish to determine the fuzziness in the output of a simple nonlinear mapping given by the expression y = f (x) = x(2 − x), seen in Figure 12.7a, where the fuzzy input variable, x, has the membership function shown in Figure 12.7b. We shall solve this problem using the fuzzy vertex method at three λ-cut levels, for λ = 0+, 0.5, 1. As seen in Figure 12.7b, the intervals orresponding to these λ-cuts are I0+ =[0.5, 2], I.5 = [0.75, 1.5], I1 = [1, 1] (a single point). Since the problem is one dimensional, the vertices, cj , are described by a single coordinate; there are N = 21 = 2 vertices (j = 1,2). In addition, an extreme point does exist within the region of the membership function and is determined using a derivative of the function, df (x)/dx = 2− 2x = 0, x0 = E1 = 1 (Ek, where k = 1). This extreme point is within each of the three λ-cut intervals, so will beinvolved in all the following calculations for Bλ: FIGURE 12.7 Nonlinear function and fuzzy input membership. 38 Vertex Method 39 Vertex Method Figure 12.8 provides a plot of the intervals B0+,B0.5, and B1 to form the fuzzy output, y. FIGURE 12.8 Fuzzy membership function for the output to y = x(2 − x). 40 DSW Algorithm The Dong, Shah, and Wong (DSW) algorithm (Dong, follShah, and Wong, 1985) also makes use of the λ-cut representation of fuzzy sets, but, unlike the vertex method, it uses the full λ-cut intervals in a standard interval analysis. The DSW algorithm consists of the owing steps: 1. Select a λ value where 0 ≤ λ ≤ 1. 2. Find the interval(s) in the input membership function(s) that correspond to this λ . 3. Using standard binary interval operations, compute the interval for the output membership function for the selected λ-cut level. 4. Repeat steps 1–3 for different values of λ to complete a λ-cut representation of the solution. 41 DSW Algorithm Example 10. Let us consider a nonlinear, 1D expression similar to the previous example, or y = x(2 + x) = 2x + x2, where we again use the fuzzy input variable shown in Figure 12.7b. The new function is shown in Figure 12.9a, along with the fuzzy input in Figure 12.9b. Again, if we decompose the membership function for the input into three λ-cut intervals, for λ = 0+, 0.5, and 1, we get the intervals I0+ = [0.5, 2] , I0.5 = [0.75, 1.5], and FIGURE 12.9 Nonlinear function and fuzzy input membership. 42 DSW Algorithm I1 = [1, 1] (a single point). In terms of binary interval operations, the functional mapping on the intervals would take place as follows for each λ-cut level: FIGURE 12.10 Fuzzy membership function for the output to y = x(2 + x). 43 Restricted DSW Algorithm This method, proposed by Givens and Tahani (1987), is a slight restriction of the original DSW algorithm. Suppose we have two interval numbers, I = [a, b] and J = [c, d]. For the special case where neither of these intervals contains negative numbers, that is, a, b, c, d ≥0, and none of the calculations using these intervals involves subtraction, the definitions of interval multiplication, and interval division, can be simplified as follows: 44 Restricted DSW Algorithm Example 11. Let us consider the function in Example 10, y = x(2 + x) and another nonlinear, 1D expression of the form y = x/(2 + x), where we again use the fuzzy input variable shown in Figure 12.7b in both functions. In interval calculations, we can represent the scalar value 2 by the interval [2, 2]. The λ-cut interval calculations using the restricted DSW calculations are now as follows: Note that these three intervals for the output B∼ are identical to those in the previous example 45 Restricted DSW Algorithm 46 Comparisons It will be useful at this point to compare the three methods discussed so far – the extension principle, the vertex method, and the DSW algorithm – by applying them to the same problem.This comparison will illustrate the problems faced with using the extension principle on discretized membership functions, as compared to the other two methods 47 Comparisons Example 12. We define fuzzy sets X∼and Y∼ with the membership functions as shown in Figure 12.13. We will use the following methods to compute X∼∗Y∼ and to demonstrate the similarity of results: • the extension principle • the vertex method • the DSW algorithm. FIGURE 12.13 Fuzzy sets X∼and Y∼. 48 Comparisons the extension principle: and Their product would then give us The result of the operation X∼×Y∼ for a discretization level of seven points is plotted in Figure 12.14a. 49 Comparisons Vertex method: I0+: Support for X is the interval [1, 7] and support for Y is the interval [2,8]. Therefore, min = 2, max = 56, and B0+ = [2, 56]. I0.33 : X[2, 6], Y[3, 7]. Therefore, min = 6, max = 42, 6]. and B0.33 = [6, 42]. Therefore, min = 12, max = 30, and B0.66 = [12, 30]. 5]. I0.66 : X[3, 5],Y[4, I1.0 : X[4, 4], Y[5, Therefore, min = 20, max = 20, and B1.0 = [20, 20]. 50 Comparisons FIGURE 12.14 X∼×Y∼ for increasing discretization of both X and Y (both variables are discretized for the same number of points): (a) 7 points; (b) 13 points; (c) 23 points; (d) 63 points. 51 Comparisons DSW method: FIGURE 12.15 Output profile of X∼×Y∼determined using the vertex method. FIGURE 12.16 Output profile of X∼×Y∼ determined using the DSW algorithm. 52