Fuzzy systems theory and its applications

fuzzy systems engineering theory and practice and extreme fuzzy dynamic systems theory and applications and fuzzy sets and systems theory and applications
Dr.NaveenBansal Profile Pic
Dr.NaveenBansal,India,Teacher
Published Date:25-10-2017
Your Website URL(Optional)
Comment
CHAPTER 9 RULE-BASE REDUCTION METHODS In spite of the insurmountablecomputationallimits, we continue to pursue the many problems thatpossessthecharacteristicsoforganizedcomplexity.Theseproblemsaretooimportantfor our well being to give up on them. The main challenge in pursuing these problems narrows downfundamentallytoonequestion:howcanwedealwiththeseproblemsifnocomputational power alone is sufficient? GeorgeKlir Professorof Systems Science, SUNY Binghamton, 1995 The quote, above, addresses two main concerns in addressing large, complex problems. First, organized complexity is a phrase describing problems that are neither linear with a small number of variables nor random with a large number of variables; they are typical in life, cognitive, social, environmental sciences, and medicine. These problems involve nonlinear systems with large numbers of components and rich interactions which are usually non-random and non-deterministic Klir and Yuan, 1995. Second, the matter of computational power was addressed by Hans Bremermann 1962 when he constructed a computational limit based on quantum theory: ‘‘no data processing system, whether 47 artificial or living, can process more than 2 × 10 bits per second per gram of its mass.’’ In other words, some problems involving organized complexity cannot be solved with an algorithmic approach because they exceed the physical bounds of speed and mass-storage. How can these problems be solved? Such problems can be addressed by posing them as systems that are models of some aspect of reality. Klir and Yuan 1995 claim that such systems models contain three key characteristics: complexity, credibility, and uncertainty. Two of these three have been addressed in the previous chapters. Uncertainty is presumed to play a key role in any attempts to make a model useful. That is, the allowance for more uncertainty tends to 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.comNEW METHODS 275 reduce complexity and increase credibility; Chapter 1 discusses how a model can be more robust by accommodating some levels of uncertainty. In a sense, then, fuzzy logic models provide for this robustness because they assess in a computational way the uncertainty associated with linguistic, or human, information expressed in terms of rules. However, even here there is a limit. A robust and credible fuzzy system would be represented by a very large rule-base, and as this rule-base gets more robust, and hence larger, the pressure on computational resources increases. This chapter addresses two methods to reduce the size of typical fuzzy rule-bases. FUZZYSYSTEMSTHEORYANDRULEREDUCTION Fuzzy systems theory provides a powerful tool for system simulation and for uncertainty quantification. However, as powerful as it is, it can be limited when the system under study is complex. The reason for this is that the fuzzy system, as expressed in terms of a rule-base, grows exceedingly large in terms of the number of rules. Most fuzzy rule-bases are implemented using a conjunctive relationship of the antecedents in the rules. This has been termed an intersection rule configuration (IRC) by Combs and Andrews 1998 because the inference process maps the intersection of antecedent fuzzy sets to output consequent fuzzy sets. This IRC is the general exhaustive search of solutions that utilizes every possible combination of rules in determining an outcome. Formally, this method of searching is described as a k-tuple relation. A k-tuple is an ordered collection of k objects each with l possibilities Devore, 1995. In the present situation k represents the input i variables with l linguistic labels for each. The product of these possible labels for each i input variable gives the number of possible combinations for such k-tuples as l l ...l . i i+1 k This IRC method is not efficient since it uses significant computational time and results in the following exponential relation: n R = l or R = l l ... (9.1) i i+1 where R = the number of rules l = the number of linguistic labels for each input variable (assumed a constant for each variable) n = the number of input variables Equation (9.1) represents a combinatorial explosion in rules. Conceptually, this rule for- mulation can be thought of as a hypercube relating n input variables to single-output consequences. In the literature this is termed a fuzzy associative mapping (see Chapter 8). This chapter discusses two rule-reduction schemes. These methods attempt to amelio- rate the combinatorial explosion of rules due to the traditional IRC approach. The benefits of these methods are to simplify simulations and to make efficient use of computation time. NEWMETHODS Two relatively recent methods of rule reduction are described and compared here. These two methods operate on fundamentally different premises. The first, singular value decom- position (SVD), uses the concepts of linear algebra and coordinate transformation to www.MatlabSite.com276 RULE-BASE REDUCTION METHODS produce a reduced mapping in a different coordinate system. The second method, the Combs method for rapid inference (called the Combs method), is a result of a logical Boolean set-theoretic proof that transforms a multi-input, single-output system to a series of single-input, single-output rules. The advantages of each are different and they address different needs for model development. The SVD method allows the practitioner to choose the amount of reduction based on error analysis. The Combs method gives good scalability; by this we mean that as new antecedents are added the number of rules grows linearly not exponentially. Therefore, the Combs method allows the user quick simulation times with transparent rules. Transparent rules are single-input, single-output rules making rule-base relations transparent. The simulations in this chapter use triangular membership functions with a sum/product inference scheme on zero-order Takagi–Sugeno output functions. In other words, the output sets are singleton values. Furthermore, the weighted average defuzzification method is used to calculate the final output value, Z, from i = 1 to R output subsets, z , weighted by input fuzzy set membership values, µ ,for j = 1 to n, i j antecedents as R n   z µ i j i=1 j=1 Z = (9.2) R n  µ j i=1 j=1 The t-norm and t-conorm aggregators of this system are, respectively, the operators product and addition (sum). These reside in the numerator of Eq. (9.2) and are shown in Eq. (9.3). The product operator aggregates rule antecedent sets linguistically with ‘‘and,’’ an intersection of input sets. And the addition operator (sum) aggregates the individual rules themselves linguistically with ‘‘or,’’ a union of rules:   z µ = sum/product inference (9.3) i j i j SingularValueDecomposition The basic idea of the singular value decomposition (SVD) on a rule-base is to perform a coordinate transformation of the original rule-base, Z. This transformation uses singular values to illuminate information regarding rule importance within the rule-base because the largest singular values show their associated rules as column vectors having the biggest influence on the aggregated output of the rule-base. This method can be used to condense information from a rule-base by eliminating redundant or weakly contributing rules. This process allows the user to select and use the most contributing (important) rule antecedents forming a new reduced rule-base, Z , shown schematically in Fig. 9.1. r The effectiveness of the SVD on reducing fuzzy systems that model functions has been well documented Yam, 1997. SVD is used for diagonalization and approximation of linear maps in linear algebra typically defined as T Z = U  V (9.4) www.MatlabSite.comNEW METHODS 277 Z r Z FIGURE9.1 Coordinate transformation via the SVD method. where U and V are orthogonal matrices and  is a diagonal matrix of singular values. Here the SVD is used to reduce fuzzy systems that approximate functions or other mappings. However, application of the SVD on the rule-base does not directly yield a fuzzy system with properly scaled membership functions. A few additional steps are necessary to supplement the SVD in order to produce properly scaled membership functions. The foundation of a fuzzy system lies with the definitions of membership functions that relate the fuzzy sets that make up the system. The following three conditions define the membership functions and must be satisfied in order for an SVD application to a fuzzy system to be successful. First, the membership functions must have some degree of overlap  such that µ = 1.0 for each x in the universe of discourse of the variable. Second, i the membership functions must map membership values on the unit interval. And third, each membership function should have a prototypical value. Once these requirements are met, the fuzzy system will have resulted in a reduced system as desired. To meet these requirements, three sequential steps of linear algebra will be applied to the decomposed system of matrices. The reduced-rule system is developed around the column vectors of the orthogonal T matrices U and V from Z = UV . Each matrix contains the fuzzy sets of an input variable. More specifically, each column vector represents individual fuzzy sets or labels for that input variable. As such, conditioning and conforming will take place on each column. Overlappingmembershipfunctions This conditioning will be the first step in the process that establishes a compact mapping of the input space to the output space. One reason why overlapping membership functions,  where µ = 1.0, ∀x in X, is important is because this allows for a good interpolation of i x i the input values. In other words, the entire input space is accommodated. A proof showing how a series of column vectors representing membership functions sum to unity is given in Lucero 2004. The orthogonal matrix, U, is separated according to the desired number of retained singular values, r, into two matrices, the reduced matrix U and the discarded matrix U : r d U = U U (9.5) r d where d = n − r for n total singular values. www.MatlabSite.com278 RULE-BASE REDUCTION METHODS The reduced matrix, U , represents the input columns we wish to retain in our r simulation. And the discarded matrix represents the collection of discarded columns of the orthogonal matrix U from the initial SVD. The objective in this separation process is to form a reduced matrix that includes the retained columns plus one column representing the discarded columns, condensed into one. Shown here is a brief justification that the matrix product of two matrices, one partitioned as reduced and discarded column vectors and the other partitioned as row sums of their transpose, gives this desired condition of row sums equaling one, and hence overlapping membership functions   T sum(U ) r U U = 1 (9.6) r d nx1 T sum(U ) d It is important to note that the discarded set as a whole represents the last remaining column supplementing the retained columns. Completing this first step is another matrix product to get the first conditioned matrix, U : 1 ∗ T ∗  U = U U sum(U ) C (9.7) 1 r d d where   T sum(U ) r  C = diag (9.8) 1 More explicitly, the matrix is transformed as            sum(u3 ) d u1 u2 u3 u4 u5 r r d d d       U = ∗   sum(u4 ) 1 . . . . . d . . . . .  . . . . . sum(u5 ) d    sum(u1 ) 00 r    ∗ (9.9)   0 sum(u2 ) 0 r 00 1 T However, if sum(U ) = 0 then the last column can be omitted since there will be no nx1 d information to condense from the discarded columns. As a result, Eq. (9.8) simply becomes T  C = diagsum(U ). Again, we need a conditioned matrix, U , in this process to give us 1 r overlapping membership functions. Non-negativemembershipvalues The next step of the procedure is required because of the constraint that membership values must range from 0 to 1.0; hence, the values must also be ‘‘non-negative.’’ A matrix is formed by replacing the minimum element of U with δ,by 1  1, if min U ≥−1  1 m,n 1 δ = (9.10) , otherwise  min U 1 m,n www.MatlabSite.comNEW METHODS 279  A doubly stochastic matrix D with the same dimension as U can then be found, 1   (1 + δ) 1 ··· 1   1 (1 + δ) ··· 1 1    D =   (9.11) . . . . . . . . (n + δ)  . . . . 11 ··· (1 + δ) where n is the number of columns of U . The doubly stochastic matrix is needed to shift 1 the membership values from U to the unit interval. 1  The matrix product U D generates the matrix U , which is now conditioned for both 1 2 overlapping with non-negative elements.  U = U ∗ D (9.12) 2 1 Prototypicalvalue Here, the third step in the SVD process creates prototypical values for the fuzzy sets. A prototypical value is the value in the universe of a specific fuzzy set that has the highest membership value, usually a value of unity. This allows for ease of interpretation, especially for linguistic variables where the fuzzy set can be defined according to the input value that gives the maximum membership. In other words, having a prototypical value establishes a center value on the membership function that also helps to define the ‘‘nearness’’ of prototypical values of adjacent fuzzy sets. The convex hull, a concept necessary to achieve this third condition, is next defined. Definition Considerpointsonatwo-dimensionalplane;aconvexhull(Fig. 9.2)isthesmallestconvex set (Fig. 9.3) that includes all of the points. This is the tightest polygon containing all the points. In other words, imagine a set of pegs. Stringing a rope around the extreme pegs suchthatallthepegsareenclosedformsaconvexhull.However,stringingtheropearound virtual pegs outside this set may give a convex set, but not a convex hull since it does not represent the smallest set. Notice that a line drawn between any two points in either Figs. 9.2 or 9.3 does not exit the area created by the convex set. The convex hull becomes useful to rescale the columns of U , thus producing valid membership functions. 2 y 0 x FIGURE9.2 Convex hull. www.MatlabSite.com280 RULE-BASE REDUCTION METHODS y 0 x FIGURE9.3 Convex set.    Let U be defined as U = u u ... u consisting of n column vectors and i = 2 2 1 2 n 1, 2,...,m row vectors. Formn,U has rank equal to n and is therefore of dimension 2    n. As such, each row vector U = u u ... u represents a point in n-dimensional 2 i,1 i,2 i,n i space. In other words, each row is a coordinate in n-dimensional space. The convex hull now becomes the n − 1 dimensional space onto which U is projected, where the 2 vertices represent the new prototypical values Yam, 1997. These vertices comprise a new  matrix, E,   −1 U (∗, : ) 2 j    E = U (∗, : ) j = 1, 2,...,n (9.13) 2 j+1 U (∗, : ) 2 n The product of this matrix with the conditioned matrix of the second step, U , becomes the 2 final matrix U , of the conditioned membership functions, 3  U = U ∗ E (9.14) 3 2 By rescaling the columns of U as is accomplished in Eq. (9.14), this final operation allows 2 for interpolation between the input column vectors and the new reduced rule-base. In a similar fashion, steps 1, 2, and 3 are conducted on the orthogonal matrix V. After the conditioning of both matrices is complete the reduced rule-base is developed. Reducedmatrixofruleconsequentvalues In effect three matrix products are conducted on a reduced orthogonal matrix, i.e.,    U = U · C · D · E. Since these products are not made on the original system, Z, in 3 r T ∼ Z = U  V , a left-sided triple inverse matrix product must be made on  , the diagonal r r r r matrix of singular values to account for the conditioning of U . Likewise, a right-sided r triple inverse matrix product must be made to  accounting for those matrix products r T T ∼ made to V . Doing these multiplications leaves the system Z = U  V unchanged since r r r r all matrix products cancel. A matrix multiplied by its inverse returns the identity matrix. This results in the following: −1 −1 −1 −1 −1 −1 T T T       Z = E D C  C D E (9.15) r r U U U V V V which now becomes our new reduced matrix of rule consequent values. And thus our SVD procedure is complete providing a reduced rule-base approximation to the original rule-base. www.MatlabSite.comNEW METHODS 281 Having obtained the reduced matrix of rule consequent values along with the conditioned column vectors, the system can then be implemented as the new reduced rule-base fuzzy system. However, sometimes the constraints from conditioning are only closely met, but are still effective as seen in Simon 2000 since the system is in a new coordinate system. Moreover, this new coordinate system might have negative values as a result of the numerical approximation of the convex hull and its inverse. Still, since the input sets are orthogonal, the interpolation will still yield a good approximation to the original system. In other words, some intuitive interpretation might be lost, but the procedure remains sound mathematically. It is important to emphasize that keeping the entire set of singular values will give back the original rule-based system; but, retaining the most influential singular values and the corresponding column vectors will keep the essential features of the system (mapping). The most influential rules are those which are associated with the largest singular values of the initial decomposition. The singular values are positioned along the diagonal in descending order of impact from greatest to least. The largest (first) value will give the most important rule, then decreasing in importance to the least contributing rule to the system. Since this method reduces an already developed rule-base or matrix of function samplings, an error analysis can be conducted on the difference between the original system and the reduced system. If a user-specified error tolerance is not met, then one can include more singular values in the approximation resulting in more reduced rules to the system. This method is analogous to a grid point function sampling. What this means is that the rule-base or function samplings must be taken from an evenly spaced grid. In fuzzy systems theory, the grid is the partition of variables into labels. So the labels (membership functions) must be evenly spaced. Summary of operations Given a rule-base or matrix of sampled function values, Z, the rules generalize to Rule: If (A(x ) and B(x )) then Z 1 2 ∼ ∼ where A and B are fuzzy sets for the input values x and x . Z, the rule consequent matrix, 1 2 ∼ ∼ is decomposed using SVD. This becomes T Z = U V (9.16) After choosing the most important or most contributing r singular values, Z gets approxi- mated as T Z ≈ Z = U  V (9.17) r r r Following the procedures described previously, the matrices U and V are conditioned so r r that U becomes A and V becomes B and  is updated to become Z . This yields the r r r r r r new approximation, T Z ≈ Z = A Z B (9.18) r r r Now the columns of matrices A and B are the new fuzzy sets, membership functions, or r r labels for input values x and x .And Z is the reduced-rule consequent matrix of this new 1 2 r system, i.e., New Rule: If (A (x ) and B (x )) then Z r 1 r 2 r www.MatlabSite.com282 RULE-BASE REDUCTION METHODS CombsMethod Combs and Andrews 1998 discovered a classical logic equivalent to the traditional conjunctive fuzzy system rule-base, a disjunctive relation that inspired a new approach to fuzzy systems modeling. In other words, a traditional system that connects multi-antecedent subsets using an intersection operator, which Combs and Andrews called an intersection rule configuration or IRC, has been transformed to a system of single antecedent rules that use a union operator, which Combs and Andrews termed a union rule configuration or URC, as given in the proof table of Fig. 9.4. ∼ IRC −→ (p ∩ q) ⇒ r⇔(p ⇒ r) ∪ (q ⇒ r) ← URC (9.19) In Eq. (9.19), p and q are the antecedents, r is the consequent, ∩ is intersection, ∼ ∪ is union, ⇒ represents implication, and ⇔ represents equivalence but not necessarily equality for fuzzy systems. This means that for certain conditions equality between the IRC and URC can be achieved directly. These cases for which equality holds are defined asadditively separable systems in Weinschenk, et al. 2003. Additively separable systems are systems that satisfy the following condition:    F = x ⊕ x ⊕···⊕ x , ⊕ is the outer sum (9.20) 1 2 n where x are input vectors; in other words, the set of labels for each variable i. The outer i sum of input vectors is analogous to the outer product; however, the sum operation is used in place of the product operator. When this is not the case, i.e., when the system of rules is not additively separable, the URC must be augmented with additional rules. The Combs method uses a series of single-input to single-output (SISO) rules to model the problem space with one powerful advantage: the avoidance of an explosion in the rule-base as the number of input variables increases. This method turns an exponential increase in the number of rules into a linear increase with the number of input variables. The benefits of the Combs method are the following: the solution obtained is equivalent to the IRC in many cases, it is simple to construct, and it is fast computationally. In the IRC approach it is the intersection of the input values that is related to the output. This intersection is achieved with an ‘‘and’’ operation. In the URC, accumulation of SISO rules is achieved with an ‘‘or’’ operation. An important but subtle feature of the ‘‘or’’ operation is that it is not an ‘‘exclusive or’’ (see Chapter 5) but an ‘‘inclusive or.’’ This is important to satisfy the additively separable condition just described where each rule (p and q) then r IRC not (p and q) or r Classical implication not p or not q or r De Morgan’s principle not p or not q or (r or r) Idempotency (not p or r) or (not q or r) Commutativity Classical implication, (p then r) or (q then r) URC FIGURE9.4 Proof table of the IRC–URC equivalence. www.MatlabSite.comNEW METHODS 283 Output IRC Input fuzzy sets Output Output Output URC Output Output Input fuzzy sets FIGURE9.5 Schematic of IRC and URC input to output relations. may contribute to the outer sum of input vectors. This accumulation of SISO rules gives the problem space representation, and is shown schematically in Fig. 9.5. Specifically, an IRC rule such as Rule: If (A and B) then Z now becomes structured to the form Rule: If (A then Z) or If (B then Z) Unlike the IRC, which is described by a hypercube, relating n input variables to single- output consequences (also termed a fuzzy associative mapping), this method can use a union rule matrix (URM) or a network of SISO relations. This matrix (URM) has as its cells the SISO rules. Product inference occurs in these individual cells as in Eq. (9.3) where only one antecedent membership value µ is multiplied by an output subset, z. Hence, each column in the URM is a series of such products as rules. Aggregating these rules is achieved by the union aggregator as in Eq. (9.3), an algebraic sum. An accumulator array accounts for this union of the rules as a summation ∗ of SISO products, µ z. This array is the last row of the matrix in Fig. 9.6. This is basically an accounting mechanism that results in a similar centroidal defuzzification as previously described in Eq. (9.2). The Combs method generalizes to a system of double summations, as described in Eq. (9.21) Weinschenk et al., 2003. It becomes a double summation because the entries www.MatlabSite.com284 RULE-BASE REDUCTION METHODS Input A If A is Low then z If A is Medium then z If A is High then z 1 2 3 Input B If B is Low then z If B is Medium then z If B is High then z 1 2 3 Accumulator µ z µ z µ z Σ Σ Σ 1 2 3 FIGURE9.6 Union rule matrix (URM) showing the accounting mechanism for rules. µ z µ z µ z Input 1, A(x ) 1,1 1,1 1,2 1,2 1,3 1,3 1 µ z µ z µ z Input 2, B(x ) 2,1 2,1 2,2 2,2 2,3 2,3 2 2 2 2 Accumulator µ z µ z µ z Σ Σ Σ i,1 i,1 i,2 i,2 i,3 i,3 i=1 i=1 i=1 FIGURE9.7 A typical URM with cells replaced by membership values and output values according to Eq. (9.21). of the accumulator array are summed. For each output subset there corresponds a sum of i = 1 to P (variables) as SISO rules. Consequently these sums are themselves summed over j = 1 to N fuzzy labels: i N i P  µ (x )z i,j i i,j j=1 i=1 Z = (9.21) URC N P i  µ (x ) i,j i j=1 i=1 where x is the input crisp value to fuzzy variable i, µ is the membership value of x i i,j i in fuzzy set j for variable i,and z is the zero-order Takagi–Sugeno output function for i,j fuzzy set j in variable i. Figure 9.7 demonstrates this in the general URM form of Fig. 9.6 and the system is updated according to Eq. (9.21). Each cell in Fig. 9.7 represents a rule. The double sum takes place when summing the final row of Fig. 9.7 which has been defined in Combs and Andrews 1998 as the accumulator array in the URM format. It is important to note that not all input antecedents will have the same number of sets. This is what is meant by the summation from j = 1 to N where N is the total number of labels for the ith variable. i i SVDANDCOMBSMETHODEXAMPLES Example9.1. Fuzzy rule-bases will be developed to simulate the additively separable function f(x,y) = x + y (9.22) shown in Fig. 9.8. This function is additively separable conforming to Eq. (9.20) where the solution surface represents an outer sum of the vectors x and y in the range −5.0, 5.0. The first rule-base simulation will be a traditional IRC rule-base. The simulations to follow this will www.MatlabSite.comSVD AND COMBS METHOD EXAMPLES 285 Analytical solution 10 8 6 4 2 0 −2 −4 −6 −8 −10 5 4 3 5 2 4 1 3 2 0 1 −1 0 −2 −1 −2 −3 −3 −4 −4 −5 −5 y x FIGURE9.8 Solution surface for Eq. (9.22). be reduced rule-bases using the SVD and the Combs method for rapid inference. This trivial linear example will highlight the essential features of each method. IRC rule-base simulation The IRC system begins by partitioning the input space into a representative number of fuzzy sets. Here five sets are chosen. This is an arbitrary selection and is based only on the user’s judgment. Figures 9.9 and 9.10 show these five triangular membership functions representing the linguistic labels, i.e., fuzzy sets for the two input variables, x and y. Figure 9.11 is the FAM table listing the 25 rules that will be used to simulate the function. The values in the cells represent the rule consequent prototypical values and are chosen based on the output of Eq. (9.22) and can be regarded as observations. Since the output sets are singleton values and not fuzzy sets, numbers are used to show the direct relationship to the analytical function values. The input fuzzy sets account for the interpolation between these output values. Stepping along the x and y axes, the input x and y values map to the solution surface of Fig. 9.12. SVD simulation Now the number of rules shown in the previous IRC table, Fig. 9.11, is reduced using the SVD. First the original FAM is represented as matrix Z along orthogonal vectors x and y. µ x, distance 1.0 NegS Zero PosS NegB PosB −5.0 −2.5 0.0 2.5 5.0 x FIGURE9.9 Fuzzy sets for the variable x represented by triangular membership functions. www.MatlabSite.com286 RULE-BASE REDUCTION METHODS y, distance µ 1.0 NegS Zero PosS NegB PosB −5.0 −2.5 0.0 2.5 5.0 y FIGURE9.10 Fuzzy sets for the variable y represented by triangular membership functions. y 25 fuzzy rules NegB NegS Zero PosS PosB NegB −10.0 −7.5 −5.0 −2.5 0.0 NegS −7.5 −5.0 −2.5 0.0 2.5 −5.0 −2.5 0.0 2.5 5.0 Zero PosS −2.5 0.0 2.5 5.0 7.5 PosB 0.0 2.5 5.0 7.5 10.0 FIGURE9.11 FAM table for the IRC simulation. 25-rule fuzzy IRC simulation 10 8 6 4 2 0 −2 −4 −6 −8 −10 5 4 3 5 2 4 1 3 2 0 1 −1 0 −2 −1 −2 −3 −3 −4 −4 −5 −5 y x FIGURE9.12 Fuzzy IRC simulation using 25 rules. Here, like the previous IRC case, the rule consequent values are stored in each cell of matrix Z. Additionally, the fuzzy sets for x and y have been replaced with their prototypical values to emphasize the requirement of an evenly spaced grid as seen in Fig. 9.13. Therefore, it is seen that this system degenerates to a system of sampled points along the x and y axes. The matrix Z is decomposed according to the SVD procedure previously described (see Eq. (9.4)). The initial decomposition results in three matrices. Matrices U and V are orthogonal and represent the input variables. Matrix  is the diagonal matrix of singular values. These singular values are used to relate the importance of the input sets yielding the most important www.MatlabSite.com xSVD AND COMBS METHOD EXAMPLES 287 y Z = f (x, y) −5 −2.5 0 2.5 5.0 −5 −10 −7.5 −5 −2.5 0 −2.5 −7.5 −5 −2.5 0 2.5 0 −5 −2.5 0 2.5 5 2.5 −2.5 0 2.5 5 7.5 5 0 2.5 5 7.5 10 FIGURE9.13 Output of Eq. (9.22) to be used for SVD simulation. rules of a reduced set to approximate the rule-based system. The singular values and the U and V matrices are in a new coordinate space. All the subsequent calculations occur in this space. For this simple example, i.e., for the data in Fig. 9.13, we get   −0.7303 0.2582 −0.4620 −0.3644 −0.2319   −0.5477 0.00.8085 0.1624 −0.1411   T   Z = UV = −0.3651 −0.2582 −0.1260 0.1537 0.8721     −0.1826 −0.5164 −0.3255 0.6629 −0.3932 0.0 −0.7746 0.1050 −0.6146 −0.1059     T 17.6777 0 0 0 0 0.7746 0.0 −0.0047 0.5588 0.2961     017.6777 0 0 0 0.5164 −0.1826 0.1155 −0.8092 0.1782         ∗ 00 000 ∗ 0.2582 −0.3651 0.2545 0.0958 −0.8520         00 000 0.0 −0.5477 −0.8365 0.0008 −0.0150 00 000 −0.2582 0.7303 0.4712 0.1538 0.3927 Before the matrices are conditioned to become a reduced fuzzy system, singular values are selected to simulate the system. This example yields only two singular values because this system is a rank 2 system. Only two independent vectors are necessary to define the space. However, the simulation continues as if there were more singular values from which to select, and the procedure uses the two largest singular values. The column vectors for the fuzzy system must now be conditioned. This means that the matrices, soon to contain membership values of fuzzy sets, must overlap, must lie on the unit interval, and must have a prototypical value (a single maximum membership value). We begin with operations on the matrix, U. Overlappingmembershipfunctions:matrixU Two submatrices representing the retained, U , and discarded U , columns of the U matrix are r d developed from the first two columns of U, and the last three columns of U, respectively:     −0.7303 0.2582 −0.4620 −0.3644 −0.2319     −0.5477 0.0 0.8085 0.1624 −0.1411     U = −0.3651 −0.2582, U =−0.1260 0.1537 0.8721  r d     −0.1826 −0.5164 −0.3255 0.6629 −0.3932 0.0 −0.7746 0.1050 −0.6146 −0.1059 The discarded columns, U , are then condensed into one column to augment U forming the d r first matrix term in the product of Eq. (9.7) as     −0.7303 0.2582 −0.4620 −0.3644 −0.2319       −0.5477 0.0 0.8085 0.1624 −0.1411 0.0     T       U U ∗ sum(U ) = −0.3651 −0.2582 −0.1260 0.1537 0.8721 ∗ 0.0 r d d         −0.1826 −0.5164 −0.3255 0.6629 −0.3932 0.0 0.0 −0.7746 0.1050 −0.6146 −0.1059 www.MatlabSite.com x288 RULE-BASE REDUCTION METHODS  Next, the column sums of U and one additional unity value form the diagonal matrix C as r U (see Eq. (9.8))     −1.8257 0 0 T sum(U ) r  C = 0 −1.291 0 = U 1 00 1 where the ‘‘1’’ is the required additional column to account for the discarded U columns. T Now applying Eq. (9.7), the product of U U ∗ sum(U ) and the diagonal matrix of r d d  column sums, C ,forms thematrixU satisfying the special overlapping condition: U 1   −0.7303 0.2582 0.0     −0.5477 0.0 0.0 −1.8257 0 0   U = −0.3651 −0.2582 0.0 ∗ 0 −1.291 0 1   −0.1826 −0.5164 0.0 00 1 0.0 −0.7746 0.0     1.3333 −0.3333 0.0 1.3333 −0.3333  0.9999 0.0 0.0  0.9999 0.0      U = 0.6666 0.3333 0.0 = 0.6666 0.3333     1     0.3333 0.6666 0.0 0.3333 0.6666 0.01.0 0.0 0.01.0 The third column gives no useful information and is removed to provide the same U that 1 T  would have resulted using the smaller matrix C = diagsum(U ) originally developed in U r Eq. (9.8). Non-negativemembershipvalues:matrixU This next operation relies on determining the minimum element in U and assigning a variable, 1 δ, a value 1 or 1/ min(U ).Wehave min(U )=−0.3333, therefore δ = 1.0 in accordance 1 1 with Eq. (9.10). We can now form a doubly stochastic matrix using Eq. (9.11),   (1 + δ) 1 ··· 1   1 (1 + δ) ··· 1   1 1 1 +11    D = = U . . . .   11 + 1 . . . . (n + δ) (2 + 1) . . . . 11 ··· (1 + δ)   0.6667 0.3333 = 0.3333 0.6667  By Eq. (9.12), the product U D gives U , the matrix satisfying both the overlapping and 1 U 2 non-negative conditions:     1.3333 −0.3333 0.7778 0.2222       0.9999 0.0 0.6666 0.3333   0.6667 0.3333    0.6666 0.3333 0.5555 0.4444 U = U ∗ D =  ∗ =  2 1 U 0.3333 0.6667     0.3333 0.6666 0.4444 0.5555 0.01.0 0.3333 0.6667 Prototypicalmembershipvalue:matrixU We now conduct the final step of conditioning the matrix U for membership functions. The convex hull of U , i.e., the extreme data points represented as rows in U , is used to construct 2 2 www.MatlabSite.comSVD AND COMBS METHOD EXAMPLES 289  the rescaling matrix, E . In this case these minimum and maximum points occur at the first U  and fifth rows of U . The inverse of these two rows generates E according to Eq. (9.13): 2 U       −1 −1 U (1, : ) 0.7778 0.2222 1.4999 −0.4999 2  E = = = U U (5, : ) 0.3333 0.6667 −0.7498 1.7498 2  Applying Eq. (9.14), the product of E with U produces the final matrix U that satisfies all U 2 3 the necessary requirements of overlapping, non-negative values and prototypical values:   0.7778 0.2222    0.6666 0.3333   1.4999 −0.4999  U = U ∗ E = 0.5555 0.4444 ∗   3 2 U −0.7498 1.7498   0.4444 0.5555 0.3333 0.6667   1.0000 0.0000   0.7500 0.2500   = 0.5000 0.5000    0.2500 0.7500 0.0000 1.0000 The columns of U become the membership functions for the input x in the reduced rule-base 3 system, Fig. 9.14. Overlappingmembershipfunctions:matrixV As with matrix U, two submatrices representing the retained, V , and discarded, V , columns r d of the V matrix are developed:     0.7746 0.0 −0.0048 0.5588 0.2961     0.5164 −0.1826 0.1156 −0.8092 0.1782     V = 0.2582 −0.3651 , V = 0.2545 0.0958 −0.8521 r   d       0.0 −0.5477 −0.8365 0.0008 −0.0151 −0.2582 −0.7303 0.4712 0.1538 0.3928 The discarded columns V are condensed into one column to augment V forming the first d r matrix term in the product of Eq. (9.7) as     0.7746 0.0 −0.0048 0.5588 0.2961       0.5164 −0.1826 0.1156 −0.8092 0.1782 0.0     T       V V ∗ sum(V ) = 0.2582 −0.3651 0.2545 0.0958 −0.8521 ∗ 0.0 r d d         0.0 −0.5477 −0.8365 0.0008 −0.0151 0.0 −0.2582 −0.7303 0.4712 0.1538 0.3928 µ x, distance 1.0 Neg Pos −5.0 −2.5 0.0 2.5 5.0 x FIGURE9.14 Plotted columns of U representing two right triangle membership functions. 3 www.MatlabSite.com290 RULE-BASE REDUCTION METHODS  Using Eq. (9.8) the diagonal matrix C is formed from V as V     1.2910 0 0 T sum(V ) r  C = 0 −1.8257 0 = V 1 00 1 where, again, the ‘‘1’’ is the required additional column to account for the discarded V columns. T  The product of V V ∗ sum(V ) and the diagonal matrix of column sums, C ,forms r d V d the matrix V by Eq. (9.7); this satisfies the special overlapping condition: 1   0.7746 0.0 0.0     0.5164 −0.1826 0.0 1.2910 0 0   V = 0.2582 −0.3651 0.0 ∗ 0 −1.8257 0 1   0.0 −0.5477 0.0 00 1 −0.2582 0.7303 0.0     1.00.0 0.0 1.00.0  0.6666 0.3333 0.0  0.6666 0.3333     V = 0.3333 0.6666 0.0 = 0.3333 0.6666     1     0.01.0 0.0 0.01.0 −0.3333 1.3333 0.0 −0.3333 1.3333 Once more, as with matrix U, the third column gives no useful information and is removed to T  provide the same V that would have resulted using the smaller matrix C = diagsum(V ) 1 V r as in Eq. 9.8. Non-negativemembershipvalues:matrixV The minimum element in V is min(V )=−0.3333. Therefore, δ = 1.0byEq.(9.10) andis 1 1 used to form the doubly stochastic matrix (see Eq. 9.11)   (1 + δ) 1 ··· 1       1 (1 + δ) ··· 1 1 1   1 +11 0.6667 0.3333  D =   = = V . . . . . . . . 11 + 1 0.3333 0.6667 (n + δ)  (2 + 1) . . . . 11 ··· (1 + δ) From Eq. (9.12) V becomes 2     1.00.0 0.6667 0.3333       0.6666 0.3333 0.5555 0.4444   0.6667 0.3333    V = V ∗ D = 0.3333 0.6666 ∗ = 0.4444 0.5555 2 1 V 0.3333 0.6667     0.01.0 0.3333 0.6667 −0.3333 1.3333 0.2222 0.7778 Prototypicalmembershipvalue:matrixV The final step of conditioning matrix V, following the same step as for matrix U, uses the convex hull of V . By Eq. (9.13), the inverse of the maximum and minimum rows of V 2 2  generates E : V       −1 −1 (r) V (1, : ) 0.6667 0.3333 1.7498 −0.7498 2  E = = = V (r) 0.2222 0.7778 −0.4999 1.4999 V (5, : ) 2 www.MatlabSite.comSVD AND COMBS METHOD EXAMPLES 291 µ y, distance 1.0 Neg Pos −5.0 −2.5 0.0 2.5 5.0 y FIGURE9.15 Plotted columns of V representing two right triangle membership functions. 3 The final matrix V , satisfying the membership function constraints, is produced using 3 Eq. (9.14):   0.6667 0.3333    0.5555 0.4444   1.7498 −0.7498  V = V ∗ E = 0.4444 0.5555 ∗   3 2 V −0.4999 1.4999   0.3333 0.6667 0.2222 0.7778   1.0000 0.0000   0.7500 0.2500   = 0.5000 0.5000   0.2500 0.7500 0.0000 1.0000 The columns of V become the membership functions for the input y of the reduced rule-base 3 system, as seen in Fig. 9.15. Reducedmatrixofruleconsequentvalues Inverse matrix transformations of the previous operations help to form the reduced matrix of the rule consequent values, Z . This matrix will then be considered a FAM table for the new r reduced system. The original orthogonal matrices U and V were conditioned by means of three    matrix transformations C , D ,and E . Now, the inverse of each of these matrices is U,V U,V U,V multiplied with  (the reduced diagonal matrix of singular values) on both the left side and r right side resulting in a multiple matrix product, as described Eq. (9.15): −1 −1 −1 −1 −1 −1 T T T       Z = E D C  C D E r r U U U V V V The following substitution shows the process on  from the initial approximation, using r unconditioned matrices, to one with conditioned matrices: T ∼ Z U  V = r r r T ∼       Z U ∗ C ∗ D ∗ E  V ∗ C ∗ D ∗ E = r U U U r r V V V T T T T ∼       Z = U ∗ C ∗ D ∗ E  E ∗ D ∗ C ∗ V r U U U r V V V r The approximation of matrix Z remains unchanged by ‘‘undoing’’ all the matrix products by −1   multiplying the conditioning matrices with their inverses. For example, E E = I. Doing U U T T ∼ this gives the following system equality: Z U  V = U ∗ I ∗  ∗ I ∗ V . Now expanding = r r r r r r www.MatlabSite.com292 RULE-BASE REDUCTION METHODS this, including all the matrix products with their inverses, gives −1 −1 −1 −1 −1 −1 T T T T T T T ∼             Z = U ∗ C ∗ D ∗ E E D C  C D E E ∗ D ∗ C ∗ V r U U U r U U U V V V V V V r −1 −1 −1 −1 −1 −1 T T T       where Z =E D C  C D E corresponds to the final reduced matrix of conse- r r U U U V V V quent output values. Therefore, calculating the inverses from the previous matrices yields the following set:     −0.5477 0 0.7746 0 −1 −1   C = C = U V 0 −0.7746 0 −0.5477     1.9997 −0.9997 1.9997 −0.9997 −1 −1   D = D = U V −0.9997 1.9997 −0.9997 1.9997     −1 0.7778 0.2222 −1 0.6667 0.2222   E = E = U V 0.3333 0.6667 0.3333 0.7778 This set of inverses, when multiplied with the matrix of retained singular values,   17.6777 0  = r 017.6777 gives the following matrix product:      0.7778 0.2222 1.9997 −0.9997 −0.5477 0 17.6777 0 Z = r 0.3333 0.6667 −0.9997 1.9997 0 −0.7746 017.6777     0.7746 0 1.9997 −0.9997 0.6667 0.2222 ∗ 0 −0.5477 −0.9997 1.9997 0.3333 0.7778 Hence   −10.00 Z = r 010.0 becomes the reduced matrix of consequent values. In other words, the FAM table result for the reduced rule-base system is now determined, and is shown in Fig. 9.16. A simulation using this reduced four-rule system is shown in Fig. 9.17; the results correlate exactly to the analytical and IRC cases. Combs method for rapid inference Here a somewhat more direct approach simulates the system using the same membership functions as in the 25-rule IRC approach as shown in Fig. 9.11. This is an additively separable system. Therefore the simulation is expected to be exact to that of the IRC. The URM as y Z r Neg Pos Neg −10.0 0.0 Pos 0.0 10.0 FIGURE9.16 Reduced FAM table due to the SVD method. www.MatlabSite.com xSVD AND COMBS METHOD EXAMPLES 293 Four-rule fuzzy SVD simulation 10 8 6 4 2 0 −2 −4 −6 −8 −10 5 4 3 5 2 4 1 3 2 0 1 −1 0 −2 −1 −2 −3 −3 −4 −4 −5 −5 y x FIGURE9.17 SVD simulation using four rules. previously described maps the system as an outer sum. In other words, when x is −5.0 or ‘‘NegB’’ (Negative Big) the function is −10.0. And similarly, when y is −5.0 or ‘‘NegB’’ the function is −10.0. In progressing this way we get the results shown in the table in Fig. 9.18. Each row represents all the labels associated with that specific input variable. Moreover, there are two input variables in this example. Therefore, the URM consists of two rows plus one accumulator row. Here again, the output values are singletons using the defined crisp output values of Eq. (9.22). This method of rule-base development consists of 10 rules, the total number of input cells shown in Fig. 9.18. Figure 9.18 gets transformed to the URM of Fig. 9.19 in accordance with Eq. (9.21). This shows how the computations of the system are implemented. The results of this simulation do in fact correlate exactly to the IRC case, as can be seen in Fig. 9.20, where the solution surface simulates Eq. (9.22). Error analysis of the methods This section gives a brief comparison of the three methods in this example using absolute and relative errors. Since the operations are matrix computations on the rule consequent tables If x is NegB then If x is NegS then If x is Zero then If x is PosS then If x is PosB then X(x), distance −10.0 −5.0 0.0 5.0 10.0 If y is NegB then If y is NegS then If y is Zero then If y is PosS then If y is PosB then Y(y), distance −10.0 −5.0 0.0 5.0 10.0 2 2 2 2 2 Accumulator µ z µ z µ z µ z µ z Σ Σ Σ Σ Σ i,1 i,1 i,2 i,2 i,3 i,3 i,4 i,4 i,5 i,5 i=1 i=1 i=1 i=1 i=1 FIGURE9.18 URM showing 10 rules, linguistic input labels, and output consequent values. µ −10.0 µ −5.0 µ 0.0 µ 5.0 µ 10.0 Input 1, X(x) 1,1 1,2 1,3 1,3 1,3 µ −10.0 µ −5.0 µ 0.0 µ 5.0 µ 10.0 Input 2, Y(y) 2,1 2,2 2,3 2,3 2,3 2 2 2 2 2 Accumulator µ z µ z µ z µ z µ z Σ Σ Σ Σ Σ i,1 i,1 i,2 i,2 i,3 i,3 i,4 i,4 i,5 i,5 i=1 i=1 i=1 i=1 i=1 FIGURE9.19 URM showing 10 rules, membership values, and output consequent values for Eq. (9.21). www.MatlabSite.com