งานนำเสนอกำลังจะดาวน์โหลด โปรดรอ

งานนำเสนอกำลังจะดาวน์โหลด โปรดรอ

Adapted from: Wei Zhang CSE Dept. Lehigh University

งานนำเสนอที่คล้ายกัน


งานนำเสนอเรื่อง: "Adapted from: Wei Zhang CSE Dept. Lehigh University"— ใบสำเนางานนำเสนอ:

1 Adapted from: Wei Zhang CSE Dept. Lehigh University
Fuzzy Logic Adapted from: Wei Zhang CSE Dept. Lehigh University

2 Content Crisp Logic Fuzzy Logic Fuzzy Logic Application Conclusion

3 Crisp Logic Hot Not hot Hot Not hot
Rule Example: If temperature > 80 F, it is hot; otherwise, it is not hot Case: Temperature 100 F Temperature 50 F Temperature 80.1 F Temperature 79.9 F Hot Not hot Hot Not hot

4 Crisp Logic ในโลกของความเป็นจริง จะมีค่าความจริงที่อยู่ระหว่าง จริง[1] กับ เท็จ[0] (อยู่ระหว่าง 0 กับ 1) อย่างไรก็ตาม crisp logic จะมีฟังก์ชันสมาชิก(Membership Function: ) คือ [0,1] เท่านั้น

5 Crisp set vs. Fuzzy set A traditional crisp set A fuzzy set

6 Crisp set vs. Fuzzy set

7 Membership function of crisp logic
True 1 HOT False 80F Temperature If temperature >= 80F, it is hot (1 or true); If temperature < 80F, it is not hot (0 or false).

8 Conception of Fuzzy Logic
Many decision-making and problem-solving tasks are too complex to be defined precisely however, people succeed by using imprecise knowledge Fuzzy logic resembles human reasoning in its use of approximate information and uncertainty to generate decisions.

9 Natural Language Consider:
Joe is tall what is tall? Joe is very tall -- what does this differ from tall? Natural language (like most other activities in life and indeed the universe) is not easily translated into the absolute terms of 0 and 1. “false” “true”

10 Fuzzy Logic เป็นวิธีการที่เกี่ยวกับความไม่แน่นอน ประกอบไปด้วยค่าความจริงที่อยู่ระหว่าง [0…1] และมีการกระทำทางตรรกะ Fuzzy logic มีพื้นฐานอยู่บนแนวคิดของทฤษฎี Fuzzy set และฟังก์ชันสมาชิกของ Fuzzy set ซึ่งเรามักพบบ่อยๆ ในภาษาพูด เช่น อากาศร้อน อากาศค่อนข้างร้อน อากาศหนาว โดยที่ข้อมูลข้างต้นเป็นข้อมูลที่เกี่ยวกับอุณหภูมิของอากาศ แต่จะแสดงระดับที่แตกต่างกัน

11 Example น้อยกว่า 25 ระหว่าง 25 ถึง 55 มากกว่า 55 Linguistic Variable
Age (years) Young น้อยกว่า 25 Middle ระหว่าง 25 ถึง 55 Old มากกว่า 55

12 Membership function of fuzzy logic
{ 1, if age(x) <= 25 Young (x) = (40-age(x))/(40-25) if age between 25 and 40 (25 < age < 40) 0, if age(x) >= 40 { 1, if age(x) <= 25 Young (x) = (40-age(x))/15 if age between 25 and 40 (25 < age < 40) 0, if age(x) >= 40

13 Membership function of fuzzy logic
Fuzzy values DOM Degree of Membership Young 1 0.5 25 40 Age Fuzzy values have associated degrees of membership in the set.

14 Membership function of fuzzy logic
{ 0, if age(x) <= 25 or age(x) >= 55 Middle (x) = (age(x)-25)/(40-25) if age between 25 and 40 (25 < age < 40) 55-age(x)/(55-40) if age between 40 and 55 (40 <= age < 55) { 0, if age(x) <= 25 or age(x) >= 55 Middle (x) = (age(x)-25)/(15) if age between 25 and 40 (25 < age < 40) 55-age(x)/(15) if age between 40 and 55 (40 <= age < 55)

15 Membership function of fuzzy logic
Fuzzy values DOM Degree of Membership Middle 1 0.5 25 40 55 Age Fuzzy values have associated degrees of membership in the set.

16 Membership function of fuzzy logic
{ 0, if age(x) <= 40 Old (x) = (age(x)-40)/(55-40) if age between 40 and 55 (40 < age < 55) 1, if age >= 55 { 0, if age(x) <= 40 Old (x) = (age(x)-40)/(15) if age between 40 and 55 (40 < age < 55) 1, if age >= 55

17 Membership function of fuzzy logic
Fuzzy values DOM Degree of Membership Old 1 0.5 25 40 55 Age Fuzzy values have associated degrees of membership in the set.

18 { Example: “Young” Example: Ann is 28, Bob is 35, Charlie is 23,
1, if age(x) <= 25 Young (x) = (40-age(x))/15 if age between 25 and 40 (25 < age < 40) 0, if age(x) >= 40

19 Membership function of fuzzy logic
Fuzzy values DOM Degree of Membership Young Middle Old 1 0.5 25 40 55 Age Fuzzy values have associated degrees of membership in the set.

20 Membership function of fuzzy logic
Fuzzy values DOM Degree of Membership Young Middle Old 1 0.5 23 25 40 55 Age Fuzzy values have associated degrees of membership in the set.

21 Membership function of fuzzy logic
Fuzzy values DOM Degree of Membership Young Middle Old 1 0.5 25 28 40 55 Age Fuzzy values have associated degrees of membership in the set.

22 Membership function of fuzzy logic
Fuzzy values DOM Degree of Membership Young Middle Old 1 0.5 25 35 40 55 Age Fuzzy values have associated degrees of membership in the set.

23 Membership function of fuzzy logic
Fuzzy values DOM Degree of Membership Young Middle Old 1 0.5 25 40 50 55 Age Fuzzy values have associated degrees of membership in the set.

24 Membership function of fuzzy logic
Fuzzy values DOM Degree of Membership Young Middle Old 1 0.5 23 25 28 35 40 50 55 Age Fuzzy values have associated degrees of membership in the set.

25 Example: “Young” Example: Young Middle Old Y Y N Y Y N Y N N N Y Y
Ann is 28, Bob is 35, Charlie is 23, George is 50, Y Y N Y Y N Y N N N Y Y

26 Example: “Young” Example: Ann is 28, 0.8 in set “Young”
Bob is 35, in set “Young” Charlie is 23, in set “Young”

27 Example: “Young” Example: Young Young
Ann is 28, Bob is 35, Charlie is 23, George is 50, จะเห็นได้ว่าผลลัพธ์ที่ได้จะไม่เหมือนกับสถิติ เนื่องจากค่าระดับของฟังก์ชันสมาชิกไม่ได้บอกถึงความน่าจะเป็นของสิ่งที่เราสนใจ แต่เป็นการขยายความเพื่ออธิบายให้เราเห็นภาพได้ชัดเจนมากขึ้น Y 0.80 Y 0.33 Y 1.00 N 0.00

28 ตัวอย่าง: จงเขียน Membership function จากรูปที่กำหนดให้

29 ข้อดีของ fuzzy logic เราสามารถแสดงการเปลี่ยนแปลงของอายุในระดับต่างๆ ตั้งแต่ วัยหนุ่ม(Young) วัยกลางคน(Middle) และวัยชรา(Old) ได้อย่างมีเหตุผล ถือว่าเป็นแนวคิดของ fuzzy logic

30 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}

31 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 = {1.0, 0.20, 0.75} B = {0.2, 0.45, 0.50} A  B = {MIN(1.0, 0.2), MIN(0.20, 0.45), MIN(0.75, 0.50)} = {0.2, 0.20, 0.50}

32 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. A = {1.0, 0.20, 0.75} Ac = {1 – 1.0, 1 – 0.20, 1 – 0.75} = {0.0, 0.80, 0.25}

33 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

34 Fuzzy Relations Matrices
Example: สีผิวของมะเขือ กับ การสุกของผล R1(x, y) ดิบ ปานกลาง สุก เขียว 1 0.5 เหลือง 0.3 0.4 แดง 0.2

35 Where is Fuzzy Logic used?
Fuzzy logic is used directly in very few applications. Most applications of fuzzy logic use it as the underlying logic system for decision support systems.

36 Fuzzy Expert System Fuzzy expert system is a collection of membership functions and rules that are used to reason about data. Usually, the rules in a fuzzy expert system are have the following form: “if x is low and y is high then z is medium”

37 Operation of Fuzzy System
Crisp Input Fuzzification Input Membership Functions Fuzzy Input Rule Evaluation Rules / Inferences Fuzzy Output Defuzzification Output Membership Functions Crisp Output

38 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 Crisp Inputs t X=0.32 Y=0.61 Low(x) = 0.68, High(x) = 0.32, Low(y) = 0.39, High(y) = 0.61

39 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

40 Inference Rule1: low(x)=0.68, low(y)=0.39 => high(z)=MIN(0.68,0.39)=0.39 Rule2: low(x)=0.68, high(y)=0.61 => low(z)=MIN(0.68,0.61)=0.61 Rule3: high(x)=0.32, low(y)=0.39 => low(z)=MIN(0.32,0.39)=0.32 Rule4: high(x)=0.32, high(y)=0.61 => high(z)=MIN(0.32,0.61)=0.32 Rule strength

41 Composition (รวมผลลัพธ์ที่ได้จากการ Inference)
low(z) = MAX(rule2, rule3) = MAX(0.61, 0.32) = 0.61 high(z) = MAX(rule1, rule4) = MAX(0.39, 0.32) = 0.39 1 Low High 0.61 0.39 t

42 Defuzzification Center of Gravity 1 Low High Center of Gravity 0.61
0.39 t Crisp output

43 Defuzzification Techniques
Fuzzy logic is a rule-based system written in the form of horn clauses (i.e., if-then rules). These rules are stored in the knowledge base of the system.

44 Defuzzification Techniques
The input to the fuzzy system is a scalar value that is fuzzified. The set of rules is applied to the fuzzified input.

45 Defuzzification Techniques
The output of each rule is fuzzy. These fuzzy outputs need to be converted into a scalar output quantity so that the nature of the action to be performed can be determined by the system.

46 Defuzzification Techniques
The process of converting the fuzzy output is called defuzzification. Before an output is defuzzified all the fuzzy outputs of the system are aggregated with an union operator. The union is the max of the set of given membership functions

47 Defuzzification Techniques
Maximum Defuzzification Technique Centroid Defuzzification Technique Weighted Average Defuzzification Technique

48 Maximum Defuzzification Technique
This method gives the output with the highest membership function. This defuzzification technique is very fast but is only accurate for peaked output. This technique is given by algebraic expression as for all x  X

49 Maximum Defuzzification Technique
where x* is the defuzzified value.

50 Centroid Defuzzification Technique
This method is also known as Center Of Gravity (COG) or Center Of Area (COA) defuzzification. This technique was developed by Sugeno in 1985. This is the most commonly used technique and is very accurate. The centroid defuzzification technique can be expressed as

51 Centroid Defuzzification Technique
where x* is the defuzzified output, i(x) is the aggregated membership function and x is the output variable. The only disadvantage of this method is that it is computationally difficult for complex membership functions

52 Weighted Average Defuzzification Technique
In this method the output is obtained by the weighted average of the each output of the set of rules stored in the knowledge base of the system. The weighted average defuzzification technique can be expressed as

53 Weighted Average Defuzzification Technique
where x* is the defuzzified output, mi is the membership of the output of each rule, and wi is the weight associated with each rule. This method is computationally faster and easier and gives fairly accurate result

54 Defuzzification Center of Gravity 1 Low High Center of Gravity 0.61
0.39 t Crisp output

55 DEMO

56 A Real Fuzzy Logic System
The subway in Sendai, Japan uses a fuzzy logic control system developed by Serji Yasunobu of Hitachi. It took 8 years to complete and was finally put into use in 1987.

57 Control System Based on rules of logic obtained from train drivers so as to model real human decisions as closely as possible Task: Controls the speed at which the train takes curves as well as the acceleration and braking systems of the train

58 This system is still not perfect; humans can do better because they can make decisions based on previous experience and anticipate the effects of their decisions This led to…

59 Decision Support: Predictive Fuzzy Control
Can assess the results of a decision and determine if the action should be taken Has model of the motor and break to predict the next state of speed, stopping point, and running time input variables Controller selects the best action based on the predicted states.

60 The results of the fuzzy logic controller for the Sendai subway are excellent!! The train movement is smoother than most other trains Even the skilled human operators who sometimes run the train cannot beat the automated system in terms of smoothness or accuracy of stopping

61 Current Uses of Fuzzy Logic
Widespread in Japan (multitudes of household appliances) Emerging applications in the West Digital Camera Thermostat (Air Condition, Refrigerator)


ดาวน์โหลด ppt Adapted from: Wei Zhang CSE Dept. Lehigh University

งานนำเสนอที่คล้ายกัน


Ads by Google