670 likes | 961 Views
Two kinds of fuzzy sets:. Convex. Non-convex. Fuzzy Set Operations. Fuzzy union ( ): the union of two fuzzy sets is the maximum (MAX) of each element from two sets. E.g. A = {1.0, 0.20, 0.75} B = {0.2, 0.45, 0.50} A B = {MAX(1.0, 0.2), MAX(0.20, 0.45), MAX(0.75, 0.50)}
E N D
Two kinds of fuzzy sets: Convex Non-convex
Fuzzy Set Operations • Fuzzy union (): the union of two fuzzy sets is the maximum (MAX) of each element from two sets. • E.g. • A = {1.0, 0.20, 0.75} • B = {0.2, 0.45, 0.50} • A B = {MAX(1.0, 0.2), MAX(0.20, 0.45), MAX(0.75, 0.50)} = {1.0, 0.45, 0.75}
Fuzzy Set Operations • Fuzzy intersection (): the intersection of two fuzzy sets is just the MIN of each element from the two sets. • E.g. • A B = {MIN(1.0, 0.2), MIN(0.20, 0.45), MIN(0.75, 0.50)} = {0.2, 0.20, 0.50}
Fuzzy Set Operations • The complement of a fuzzy variable with DOM x is (1-x). • Complement ( _c): The complement of a fuzzy set is composed of all elements’ complement. • Example. • Ac = {1 – 1.0, 1 – 0.2, 1 – 0.75} = {0.0, 0.8, 0.25}
Crisp Relations • Ordered pairs showing connection between two sets: (a,b): a is related to b (2,3) are related with the relation “<“ • Relations are set themselves < = {(1,2), (2, 3), (2, 4), ….} • Relations can be expressed as matrices …
Fuzzy Relations • Triples showing connection between two sets: (a,b,#): a is related to b with degree # • Fuzzy relations are set themselves • Fuzzy relations can be expressed as matrices …
Fuzzy Relations Matrices • Example: Color-Ripeness relation for tomatoes
Fuzzy relations Y 1 1 2 3 1 0.8 0.3 1 X 2 0.8 1 0.8 3 0.3 0.8 1 A fuzzy relation between X and Y is defined as: Similarly,
Operations on fuzzy relations Intersection of two relations R and S defined on the same domain Union of two relations R and S defined on the same domain
Operations on fuzzy relations R and S be two binary relations defined on U x V Ex:
Examples: S R
Cylinderical extension F is afuzzy set on Y, the cylinderical extention of F on X x Y with membership function mF(y): Ce(F)=
Combination of fuzzy set and relation with the aid of CE and projection is Called “Composition” and Mathematically, (the max-min composition) (the max-dot composition)
Example: Agnes is somewhat taller than Olga Domain of height (in centimeter): Approximately 5cm taller Membership function for Agnes is somewhat taller than Olga: Somewhat taller: Agnes is rather tall described by:
Now, compare Agnes and Olga’s heights: Conclusion: Olga is shorter than Agnes.
Linguistic expressions; Linguistic variable: X: symbolic name LX: the set of linquistic values that X can take : actual physical domain : A semantic function which gives meaning of linquistic value in terms of x, in other words, it is a function which takes a symbol as its argument (e.g. cold) and returns the meaning of cold in terms of a fuzzy set. Example: X=T: Temperature, LX=LT: {cold,cool,confortable,warm,hot, } : :
Fuzzy Proposition Symbolic translation of Natural language expression in terms of linquistic Variabless proceeds as follows: Natural language expression: Error has the value negative big In linquistic Variables Form: • A symbol E is chosen to denote the physical variable “Error” • A sumbol “NB” is chosen to denote “negative big” • E is NB The meaning of “E is NB” is defined by a fuzzy set or a membership Function , defined on a normalized domain . The meaning of symbolic expression “E is NB” helps us decide the Degree to which this symbolic is satisfied given a specific physical Value of error.
Linquistic Approximation The linquistic approximation problem is to find a single linquistic value whose Meaning is the same, or the closest possible to the meaning of the fuzzy Set generated using the “conjunction” or “disjunction” operations. Conjunction: Meaning Symbolic Disjunction: Meaning Symbolic
P1: A is S1 P2: A is S2 P: P1 and P2 P: P1 or P2
Example of Linquistic Approximation If x is Z, then y is Z. If x is S, then y is S. If x is M, then y is M. If x is B, then y is B The causality is I the direction of X to Y
Fuzzy if-then Statements Fuzzy If-then Statements: if (fuzzy proposition) then (fuzzy proposition) If X is A, then Y is B • The mining of “X is A” is the rule antecedent, is represented by • a fuzzy set: 2. The mining of “Y is B” is the rule consequent, is represented by a fuzzy set: 3. The meaning of the fuzzy conditional is then a fuzzy expression:
Two major inference rules are of major importance: Compositional rule of infernce Generalized modus ponens Generalized modus ponens has the symbolic inference scheme: Example: The Tomato is very red. If the tomato is red then the tomato is ripe The tomato is very ripe
Compositional rule can be considered to be a special case of the generalized modus ponens: Example: The compositional rule always requires an explicit relation Agnes is tall, Qlga is a bit shorter than Agnes, Olga is more or less tall.
The true value of is usually determined by the fact that In two-valued logic the same as and
If A then B is considered the same as compound fuzzy proposition: “Not A or B” This is known as Dienes-Rescher Implication
Other implications: Lukasiewicz implication: Zadeh implication:
The compositional rule of influence Example: Small: If x is small then y is large If x is not small then y is not very large and If x is small then y is large else y is not very large
The if-then rule indicates the following operation: Given A: Ans: What shall B be?
Representing a Set of Rules A Mamdani interpretation of a single rule is: The fuzzified crisp input e* is: The meaning of the whole set of rules: Which means:
The firing of a set of rules can be expressed as: If fire each rule separately, the n clipped fuzzy sets Then,
Operation of Fuzzy System Crisp Input Fuzzification Input Membership Functions Fuzzy Input Rule Evaluation Rules / Inferences Fuzzy Output Defuzzification Output Membership Functions Crisp Output
Fuzzification • Establishes the fact base of the fuzzy system. It identifies the input and output of the system, defines appropriate IF THEN rules, and uses raw data to derive a membership function. • Consider an air conditioning system that determine the best circulation level by sampling temperature and moisture levels. The inputs are the current temperature and moisture level. The fuzzy system outputs the best air circulation level: “none”, “low”, or “high”. The following fuzzy rules are used: 1. If the room is hot, circulate the air a lot. 2. If the room is cool, do not circulate the air. 3. If the room is cool and moist, circulate the air slightly. • A knowledge engineer determines membership functions that map temperatures to fuzzy values and map moisture measurements to fuzzy values.
Inference • Evaluates all rules and determines their truth values. If an input does not precisely correspond to an IF THEN rule, partial matching of the input data is used to interpolate an answer. • Continuing the example, suppose that the system has measured temperature and moisture levels and mapped them to the fuzzy values of .7 and .1 respectively. The system now infers the truth of each fuzzy rule. To do this a simple method called MAX-MIN is used. This method sets the fuzzy value of the THEN clause to the fuzzy value of the IF clause. Thus, the method infers fuzzy values of 0.7, 0.1, and 0.1 for rules 1, 2, and 3 respectively.
Composition • Combines all fuzzy conclusions obtained by inference into a single conclusion. Since different fuzzy rules might have different conclusions, consider all rules. • Continuing the example, each inference suggests a different action • rule 1 suggests a "high" circulation level • rule 2 suggests turning off air circulation • rule 3 suggests a "low" circulation level. • A simple MAX-MIN method of selection is used where the maximum fuzzy value of the inferences is used as the final conclusion. So, composition selects a fuzzy value of 0.7 since this was the highest fuzzy value associated with the inference conclusions.
Defuzzification • Convert the fuzzy value obtained from composition into a “crisp” value. This process is often complex since the fuzzy set might not translate directly into a crispvalue.Defuzzification is necessary, since controllers of physical systems require discrete signals. • Continuing the example, composition outputs a fuzzy value of 0.7. This imprecise value is not directly useful since the air circulation levels are “none”, “low”, and “high”. The defuzzification process converts the fuzzy output of 0.7 into one of the air circulation levels. In this case it is clear that a fuzzy output of 0.7 indicates that the circulation should be set to “high”.
Defuzzification • There are many defuzzification methods. Two of the more common techniques are the centroid and maximum methods. • In the centroid method, the crisp value of the output variable is computed by finding the variable value of the center of gravity of the membership function for the fuzzy value. • In the maximum method, one of the variable values at which the fuzzy subset has its maximum truth value is chosen as the crisp value for the output variable.
Fuzzification • Two Inputs (x, y) and one output (z) • Membership functions: low(t) = 1 - ( t / 10 ) high(t) = t / 10 1 0.68 Low High 0.32 0 t Crisp Inputs X=0.32 Y=0.61 Low(x) = 0.68, High(x) = 0.32, Low(y) = 0.39, High(y) = 0.61
Create rule base • Rule 1: If x is low AND y is low Then z is high • Rule 2: If x is low AND y is high Then z is low • Rule 3: If x is high AND y is low Then z is low • Rule 4: If x is high AND y is high Then z is high
Application in Fuzzy Control If e is PM then u is NS
If e is PM then u is NS Use Mamdani implication:
Suppose E corresponding to 3 on the error domain [-6,6]. What shall u be? First, we have to fuzzify the error by : Second, perform composition between R(u,e) and , i.e.:
Defuzzification In the above case,