* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Fuzzy-Mapping-Rules
Theoretical ecology wikipedia , lookup
Predictive analytics wikipedia , lookup
Computational fluid dynamics wikipedia , lookup
Computer simulation wikipedia , lookup
Numerical weather prediction wikipedia , lookup
Lateral computing wikipedia , lookup
Types of artificial neural networks wikipedia , lookup
History of numerical weather prediction wikipedia , lookup
General circulation model wikipedia , lookup
Control system wikipedia , lookup
Fuzzy If-Then Rules Adnan Yazıcı Dept. of Computer Engineering, Middle East Technical University Ankara/Turkey Fuzzy If-Then Rules ¾ ¾ ¾ There are two different kinds of fuzzy rules: Fuzzy mapping rules and Fuzzy implication rules. A fuzzy mapping rule describes an association; therefore, its fuzzy relation is constructed from the Cartesian product of its antecedent fuzzy condition and its consequent fuzzy condition. A fuzzy implication rule, however, describes a generalized logic implication; therefore, its fuzzy relation needs to be constructed from the semantics of a generalization to implication in multi-valued logic. Fuzzy If-Then Rules The difference between the semantics of fuzzy mapping rules and fuzzy implication rules can be seen from the difference in their inference behavior. Even though these two types of rules behave the same when their antecedents are satisfied, they behave differently when their antecedents are not satisfied. Example: Implication rule, Mapping rule ¾ (logic representation) (procedural representation) Given:x ∈ [1,3] Æ y ∈ [7,8], Stm: If x∈[1,3], Then y∈[7,8] Input: x=5 Variable value: x = 5 Infer: y is unkown (y ∈ [0,10]) Execution result: no action ¾ Fuzzy Mapping Rules ¾ The needs to approximate a function of interest is often due to one or more of the following reasons: 1) The mathematical structure of the function is not precisely known at al. 2) The function is so complex that finding its precise mathematical form is either impossible or practically infeasible due to its high cost. 3) Even if finding the function is not impractical, implementing the function in its precise mathematical form in a product or service may be too costly. This is particularly important for low cost high volume products (e.g., automobiles, cameras, and many other consumer products). Fuzzy Mapping Rules ¾ ¾ Fuzzy rule-based function approximation is a partition-based technique. The partition-based approximation techniques approximate a function by partitioning the input space of the function and approximate the function in each partitioned region separately (e.g., piecewise linear approximation). Fuzzy Mapping Rules ¾ ¾ ¾ ¾ Because each fuzzy rule approximates a small segment of the function, the entire function is approximated by a set of fuzzy mapping rules. We refer to such a collection of fuzzy mapping rules as fuzzy rule-based models or simply fuzzy models A fuzzy model describes an (approximate) mapping (i.e., function) from a set of input variables to a set of output variables. Examples: ¾ ¾ A fuzzy model of the stock market can be used to predict future changes of the IMKB average. A fuzzy control model of a petrochemical process can be used to predict the future state of the process. Fuzzy Mapping Rules ¾ ¾ ¾ A fuzzy model can be defined as a model that is obtained by fusing multiple local models that are associated with fuzzy subspaces of the given input space. The result of fusing multiple local models is usually a fuzzy conclusion, which is converted to a crisp final output through a defuzzification process. The main difference between fuzzy and nonfuzzy rules for function approximation lies in their interpolative reasoning capability, which allows the output of multiple fuzzy rules to be fused for a given input. Fuzzy Mapping Rules ¾ The four major concepts in fuzzy rule-based models thus are as follows: 1. 2. 3. 4. Fuzzy partition, Mapping of fuzzy subregion to local models, Fusion of multiple local models, Defuzzification. 1- Fuzzy partition A fuzzy partition of a space is a collection of fuzzy subspaces whose boundaries partially overlap and whose union is the entire space. ¾ Formally, a fuzzy partition of a space as a collection of fuzzy subspace Ai of S that satisfies the following condition: ∑ μAi(x) = 1, ∀x ∈ S. ¾ That is, for any element of the space, its membership degree in all subspaces always adds up to 1. ¾ 1- Fuzzy partition ¾ ¾ ¾ ¾ We call a collection of fuzzy subspaces Ai of S a weak fuzzy partition of S if and only if it satisfies the following condition: 0< ∑ μAi(x) ≤ 1, ∀x ∈ S. The “greater than 0” condition requires each element in the space S to be covered by at least one fuzzy subspace in the partition. The “sum to 1” condition of a fuzzy partition can be relaxed to the “sum to less or equal to 1” condition because the interpolative reasoning of fuzzy models includes a normalization step. Research Note: It has been shown that ∑ μAi(x) = 1 is a desirable property in a framework for analyzing the stability of fuzzy logic controllers. 2- Mapping a Fuzzy Subspace to a Local Model y large small x small medium large Fuzzy mapping 2- Mapping a Fuzzy Subspace to a Local Model A local model for a subspace of the entire input space describes the system’s inputoutput mapping relationship in the small subspace. ¾ In contrast, a global model for an input space describes the system’s input-output relationship for the entire input space. ¾ Because the scope of the local model is smaller than that of a global model, it is usually easier to develop a local model. ¾ Mapping a Fuzzy Subspace to a Local Model ¾ ¾ In particular, a nonlinear global model (i.e., whose inputoutput mapping function is not linear) can often be approximated by a set of linear local models. This can be understood by remembering the well-known approximation technique called piecewise linear approximation, which approximates an arbitrary nonlinear function using segments of lines. The following figure shows such an approximation technique, where dotted line indicates the function being y approximated. x Mapping a Fuzzy Subspace to a Local Model ¾ ¾ ¾ ¾ ¾ Piecewise linear approximation has two major components: 1. Partitioning the input space to crisp regions 2. Mapping each partitioned region to a linear local model. The main difference between fuzzy modeling and piecewise linear approximation is that the transition from one local subregion to a neighboring one is gradual rather than abrupt. Generally, the mapping from a fuzzy subspace to a local model is represented as a fuzzy if-then rule in the form of: If ⎯x is in FSi Then yj = LMi (x) where ⎯x and yj denote the vector of input variables and output variable, respectively, FSi and LMi denote ith fuzzy subspace and the corresponding local model, respectively. Mapping a Fuzzy Subspace to a Local Model The local model can be one of four different types: ¾ 1. Crisp constant: This type of local model is simply a crisp (nonvisual) constant. For example; If xi is Small Then y = 4.5 ¾ 2. Fuzzy constant: A local model that is a fuzzy constant (e.g., Small) belong to this type. For example; If xi is Small Then y is Medium ¾ 3. Linear Model: this describes the output as a linear function of the input variables, such as: If x1 is Small And x2 is Large Then y = 2x1 + 5x2 + 3. ¾ 4. Non-Linear Model: Theoretically, a local model can be more complex than a linear model. In practice, however, there is rarely such a need. These models have been introduced in a hybrid neuro-fuzzy system that uses neural networks to represent nonlinear local models associated with the rule. Fusion of local models through interpolative reasoning ¾ ¾ ¾ ¾ Fuzzy models use interpolative reasoning to fuse multiple local models into a global model. The basic idea behind interpolative reasoning is analogous to drawing a conclusion from a panel of experts, each of whom is specialized in a subarea of the entire problem. Each expert’s opinion is associated with a weight, which reflects the degree to which the current situation is in the expert’s specialized area. These weighted opinions are combined to form an overall opinion. Fusion of local models through interpolative reasoning In this analogy, an expert corresponds to a fuzzy if-then rule, the specialized subarea of the expert corresponds to the fuzzy subspace associated with the if-part of the rule. ¾ The weight of an expert’s opinion is determined by the degree to which the current situation belongs to the subspace. ¾ Defuzzification ¾ ¾ ¾ We may interpret a possibility distribution either through linguistic approximation, or through defuzzification. The former gives a qualitative interpretation, while the latter gives a quantitative summary and is more commonly used in fuzzy logic applications, i.e., industrial applications. Given a possibility distribution of a fuzzy model’s output, defuzzification amounts to selecting a single representative value that captures the essential meaning of the given distribution. Defuzzification ¾ ¾ ¾ ¾ There are three common defuzzification techniques: mean of maximum, center of area, and height. Mean of Maximum (MOM): This calculates the average of those output values that have the highest possibility degrees. Suppose “y is A” is a fuzzy conclusion to be fuzzified. We can express the MOM defuzzification method using the following formula: MOM (A) = ∑y*∈P y* / |P| Where P is the set of output values y* with highest possibility degree in A. If P is an interval, the result of MOM defuzzification is obviously the midpoint in that interval. This technique does not take into account the overall shape of the possibility distribution. Defuzzification ¾ ¾ ¾ ¾ ¾ Center of Area (COA): This method (also referred to as the center-of-gravity, or centroid method) is the most popular defuzzification technique. Unlike MOM, the COA method takes into account the entire possibility distribution in calculating its representative point. This method is similar to the formula for calculating the center of gravity in physics, if we view μA(x) as the density of mass at x. If x is discrete, the fuzzification result of A is: COA(A) = ∑x μA(x) * x / ∑x μA(x). The main disadvantage of the COA method is its high computational cost. However, the calculation can be simplified for some fuzzy models. Defuzzification ¾ ¾ ¾ ¾ ¾ The Height Method: This method can be viewed as a two step procedure. First we convert the consequent membership function Ci into crisp consequent y = ci where ci is the center of gravity of Ci. The centroid defuzzification is then applied to the rules with crisp consequents with the following formula: y = ∑Mi=1 wici / ∑Mi=1 wi where wi is the degree to which ith rule matches the input data. This method reduces the computation cost and facilitates the application of neural networks learning to fuzzy systems; hence, many well-known neuro-fuzzy models use this type of defuzzification method. The main disadvantage of this method is that it is not well justified and is often considered an approximation to the centroid defuzzification. An example for a Fuzzy Model Types of Fuzzy Rule-Based Models short long Types of Fuzzy Rule-Based Models low high Types of Fuzzy Rule-Based Models maintain speed increase speed decrease speed Types of Fuzzy Rule-Based Models Types of Fuzzy Rule-Based Models Types of Fuzzy Rule-Based Models Types of Fuzzy Rule-Based Models Types of Fuzzy Rule-Based Models Rudimentary Flow Mixing Controller R1: IF the target temperature T is Low THEN set the voltage to V (i.e., turn on the cold flow). R2: IF the target temperature T is High THEN set the voltage to V’ (i.e., turn on the hot flow). Membership functions of the taget temperature are; μ μ High 1 1 Low T T Rudimentary Flow Mixing Controller