October 2005 0 Fuzzy Expert Systems CS364 Artificial Intelligence.

Slides:



Advertisements
Similar presentations
© Negnevitsky, Pearson Education, Lecture 5 Fuzzy expert systems: Fuzzy inference Mamdani fuzzy inference Mamdani fuzzy inference Sugeno fuzzy inference.
Advertisements

Fuzzy Logic 11/6/2001. Agenda General Definition Applications Formal Definitions Operations Rules Fuzzy Air Conditioner Controller Structure.
Fuzzy expert systems Fuzzy inference Mamdani fuzzy inference
1 Chap 4: Fuzzy Expert Systems Part 2 Asst. Prof. Dr. Sukanya Pongsuparb Dr. Srisupa Palakvangsa Na Ayudhya Dr. Benjarath Pupacdi SCCS451 Artificial Intelligence.

 Negnevitsky, Pearson Education, Lecture 5 Fuzzy expert systems: Fuzzy inference n Mamdani fuzzy inference n Sugeno fuzzy inference n Case study.
AI – CS364 Fuzzy Logic Fuzzy Logic 3 03 rd October 2006 Dr Bogdan L. Vrusias
Fuzzy Logic and its Application to Web Caching
Fuzzy logic Fuzzy Expert Systems Yeni Herdiyeni Departemen Ilmu Komputer.
AI – CS289 Fuzzy Logic Fuzzy Tutorial 16 th October 2006 Dr Bogdan L. Vrusias
1 What is a fuzzy rule? A fuzzy rule can be defined as a conditional statement in the form: IF x is A THEN y is B where x and y are linguistic variables;
Fuzzy Expert System. Basic Notions 1.Fuzzy Sets 2.Fuzzy representation in computer 3.Linguistic variables and hedges 4.Operations of fuzzy sets 5.Fuzzy.
Fuzzy Expert Systems. Lecture Outline What is fuzzy thinking? What is fuzzy thinking? Fuzzy sets Fuzzy sets Linguistic variables and hedges Linguistic.
Fuzzy Logic E. Fuzzy Inference Engine. “antecedent” “consequent”
Lecture 07 Fuzzy Reasoning
Fuzzy Logic Control Lect 5 Fuzzy Logic Control Basil Hamed
6/9/2015Intelligent Systems and Soft Computing1 Lecture 5 Fuzzy expert systems: Fuzzy inference Mamdani fuzzy inference Mamdani fuzzy inference Sugeno.
Fuzzy Expert System.
Fuzzy Logic E. Fuzzy Inference Engine. “antecedent” “consequent”
Fuzzy Medical Image Segmentation
Chapter 18 Fuzzy Reasoning.
1 Chapter 18 Fuzzy Reasoning. 2 Chapter 18 Contents (1) l Bivalent and Multivalent Logics l Linguistic Variables l Fuzzy Sets l Membership Functions l.
WELCOME TO THE WORLD OF FUZZY SYSTEMS. DEFINITION Fuzzy logic is a superset of conventional (Boolean) logic that has been extended to handle the concept.
Fuzzy Logic Dave Saad CS498. Origin Proposed as a mathematical model similar to traditional set theory but with the possibility of partial set membership.
09th October 2006 Dr Bogdan L. Vrusias
Introduction to Fuzzy Logic Control
The Equivalence between fuzzy logic controllers and PD controllers for single input systems Professor: Chi-Jo Wang Student: Nguyen Thi Hoai Nam Student.
CPSC 386 Artificial Intelligence Ellen Walker Hiram College
Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 3b: Dealing with Uncertainty (Fuzzy Logic)
Fuzzy logic Introduction 2 Fuzzy Sets & Fuzzy Rules Aleksandar Rakić
Fuzzy Expert Systems. 2 Fuzzy Logic Four types of fuzzy logics Classic logic Crisp setence: Height(John, 180) → Weight(John, 60) Crisp data: Height(John,
Lecture 5 Fuzzy expert systems: Fuzzy inference Mamdani fuzzy inference Mamdani fuzzy inference Sugeno fuzzy inference Sugeno fuzzy inference Case study.
 Negnevitsky, Pearson Education, Lecture 5 Fuzzy expert systems: Fuzzy inference n Mamdani fuzzy inference n Sugeno fuzzy inference n Case study.
Fuzzy expert systems Chapter #9.
 Definition Definition  Bit of History Bit of History  Why Fuzzy Logic? Why Fuzzy Logic?  Applications Applications  Fuzzy Logic Operators Fuzzy.
Fuzzy Inference (Expert) System
Ming-Feng Yeh Fuzzy Control The primary goal of control engineering is to distill and apply knowledge about how to control a process so that the.
AI – CS289 Fuzzy Logic - Labs Fuzzy Logic – Lab 3 19 th October 2006 Dr Bogdan L. Vrusias
1 Fuzzy Logic and Fuzzy Systems –X: Relationship and Membership 1 Khurshid Ahmad, Professor of Computer Science, Department of Computer Science Trinity.
Logical Systems and Knowledge Representation Fuzzy Logical Systems 1.
Fuzzy Systems Michael J. Watts
Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory.
“Principles of Soft Computing, 2 nd Edition” by S.N. Sivanandam & SN Deepa Copyright  2011 Wiley India Pvt. Ltd. All rights reserved. CHAPTER 12 FUZZY.
Fuzzy systems. Calculate the degree of matching Fuzzy inference engine Defuzzification module Fuzzy rule base General scheme of a fuzzy system.
Fuzzy Inference Systems
Fuzzy Expert System Fuzzy Inference دكترمحسن كاهاني
Homework 5 Min Max “Temperature is low” AND “Temperature is middle”
Chapter 10 Fuzzy Control and Fuzzy Expert Systems
Fuzzy Logic Artificial Intelligence Chapter 9. Outline Crisp Logic Fuzzy Logic Fuzzy Logic Applications Conclusion “traditional logic”: {true,false}
© Negnevitsky, Pearson Education, Lecture 5 Fuzzy expert systems: Fuzzy inference Mamdani fuzzy inference Mamdani fuzzy inference Sugeno fuzzy inference.
Introduction to Fuzzy Logic and Fuzzy Systems
What is a fuzzy rule? IF x is A THEN y is B
Artificial Intelligence CIS 342
Fuzzy Systems Michael J. Watts
Fuzzy expert systems Fuzzy inference Mamdani fuzzy inference
Fuzzy Logic Control Lect 5 Fuzzy Logic Control Basil Hamed Electrical Engineering Islamic University of Gaza.
Fuzzy Logic 11/6/2001.
Building a Fuzzy Expert System
Artificial Intelligence
Stanisław H. Żak School of Electrical and Computer Engineering
Fuzzy Logic and Fuzzy Sets
Homework 8 Min Max “Temperature is low” AND “Temperature is middle”
Introduction to Fuzzy Logic
Fuzzy logic Introduction 3 Fuzzy Inference Aleksandar Rakić
Dr. Unnikrishnan P.C. Professor, EEE
Dr. Unnikrishnan P.C. Professor, EEE
Homework 9 Min Max “Temperature is low” AND “Temperature is middle”
Lecture 5 Fuzzy expert systems: Fuzzy inference
Dr. Unnikrishnan P.C. Professor, EEE
Fuzzy Logic KH Wong Fuzzy Logic v.9a.
Presentation transcript:

October Fuzzy Expert Systems CS364 Artificial Intelligence

October  Recap  Example: Air Conditioner  Example: Cart Pole Problem  Case Study: Building a Fuzzy Expert System  Summary Fuzzy Expert Systems

October Specify the problem; define linguistic variables. Recap 2. Determine fuzzy sets. 3. Elicit and construct fuzzy rules. 4. Encode the fuzzy sets, fuzzy rules and procedures to perform fuzzy inference into the expert system. 5. Evaluate and tune the system. Process of developing a fuzzy expert system:

October Fuzzification: definition of fuzzy sets, and determination of the degree of membership of crisp inputs in appropriate fuzzy sets. Recap Inference: evaluation of fuzzy rules to produce an output for each rule. Composition: aggregation or combination of the outputs of all rules. Defuzzification: computation of crisp output Operation of a fuzzy expert system:

October  Recap  Example: Air Conditioner  Example: Cart Pole Problem  Case Study: Building a Fuzzy Expert System  Summary Fuzzy Expert Systems

October Example: Air Conditioner 1a. Specify the problem Air-conditioning involves the delivery of air, which can be warmed or cooled and have its humidity raised or lowered. An air-conditioner is an apparatus for controlling, especially lowering, the temperature and humidity of an enclosed space. An air-conditioner typically has a fan which blows/cools/circulates fresh air and has a cooler. The cooler is controlled by a thermostat. Generally, the amount of air being compressed is proportional to the ambient temperature. 1b. Define linguistic variables Ambient Temperature Air-conditioner Fan Speed

October Example: Air Conditioner 2. Determine Fuzzy Sets: Temperature Temp ( 0 C). COLDCOOLPLEASANTWARMHOT 0Y*NNNN 5YYNNN 10NYNNN 12.5NY*NNN 15NYNNN 17.5NNY*NN 20NNNYN 22.5NNNY*N 25NNNYN 27.5NNNNY 30NNNNY* COLDCOOLPLEASANTWARMHOT 0<  (T)<1  (T)=1  (T)=0

October Example: Air Conditioner 2. Determine Fuzzy Sets: Temperature

October Example: Air Conditioner 2. Determine Fuzzy Sets: Fan Speed Rev/sec(RPM)MINIMALSLOWMEDIUMFASTBLAST 0Y*NNNN 10YNNNN 20YYNNN 30NY*NNN 40NYNNN 50NNY*NN 60NNNYN 70NNNY*N 80NNNYY 90NNNNY 100NNNNY*

October Example: Air Conditioner 2. Determine Fuzzy Sets: Fan Speed

October Example: Air Conditioner 3. Elicit and construct fuzzy rules RULE 1: IF is THEN is RULE 1: IF temp is cold THEN speed is minimal RULE 2: IF is THEN is RULE 2: IF temp is cool THEN speed is slow RULE 3: IF is THEN is RULE 3: IF temp is pleasant THEN speed is medium RULE 4: IF is THEN is RULE 4: IF temp is warm THEN speed is fast RULE 5: IF is THEN is RULE 5: IF temp is hot THEN speed is blast

October Example: Air Conditioner 3. Encode into an Expert System 4. Evaluate and tune the system Consider a temperature of 16 o C, use the system to compute the optimal fan speed. Operation of a Fuzzy Expert System Fuzzification Inference Composition Defuzzification

October Example: Air Conditioner Fuzzification  Affected fuzzy sets: COOL and PLEASANT  COOL (T) = – T / = – 16 / = 0.3  PLSNT (T) = T / = 16 / = 0.4 Temp=16  COLD  COOL  PLEASANT  WARM  HOT

October Example: Air Conditioner Inference RULE 1: IF is THEN is RULE 1: IF temp is cold THEN speed is minimal RULE 2: IF is THEN is RULE 2: IF temp is cool THEN speed is slow RULE 3: IF is THEN is RULE 3: IF temp is pleasant THEN speed is medium RULE 4: IF is THEN is RULE 4: IF temp is warm THEN speed is fast RULE 5: IF is THEN is RULE 5: IF temp is hot THEN speed is blast

October Example: Air Conditioner RULE 2: IF temp is cool (0.3) THEN speed is slow (0.3) RULE 3: IF temp is pleasant (0.4) THEN speed is medium (0.4) Inference

October Example: Air Conditioner Composition speed is slow (0.3)speed is medium (0.4) +

October Example: Air Conditioner Defuzzification COG = 0.125(12.5) (15) + 0.3( … ) + 0.4( … ) (57.5) (11) + 0.4(5) = 45.54rpm

October  Recap  Example: Air Conditioner  Example: Cart Pole Problem  Case Study: Building a Fuzzy Expert System  Summary Fuzzy Expert Systems

October Example: Cart Pole Problem The problem is to balance an upright pole, with a mass m at its head and mass M at its base. A weightless shaft connects these two masses. The base can be moved on a horizontal axis. The task is to determine the FORCE (F) necessary to balance the pole. The calculation of the force F involves the measurement of the angle θ and the angular velocity,  of the pole. M m g  

October nbnbnbnb nmnmnmnm nsnsnsns azazazaz pspspsps pmpmpmpm pbpbpbpb nbnbnbnb pspspsps pbpbpbpb nmnmnmnm pmpmpmpm nsnsnsns nmnmnmnm nsnsnsns pspspsps azazazaz nbnbnbnb nmnmnmnm nsnsnsns azazazaz pspspsps pmpmpmpm pbpbpbpb pspspsps nsnsnsns pspspsps pmpmpmpm pmpmpmpm nmnmnmnm pbpbpbpb nbnbnbnb nsnsnsns Example: Cart Pole Problem nb: negative big,nm: negative medium,ns: negative small az: approximately zero ps: positive small,pm: positive medium,pb: positive big IF is negative medium and  is approximately zero THEN F is negative medium 

October Example: Cart Pole Problem The fuzzy sets for θ, and F are based on the linear equation μ(x)=ax + b, and are defined based on the following table:   if   if   if  

October Example: Cart Pole Problem (b) Consider the case when the input variables are : θ = 50, = -5. Use the rule base, execute each of the four tasks to compute the force F necessary to balance the pole using the Centre of Gravity in the Defuzzification task. (a) Based on the fuzzy sets table draw three graphs showing the fuzzy sets (nb, nm, ns, az, ps, pm, pb) for each θ,  and F individually.

October Example: Cart Pole Problem Fuzzification i)Determine where θ and the angular velocity fall in the table θ: pm, pb  az ii)Formulate possible rules from linguistic values obtained IF θ is pm AND  is az THEN F is pm IF θ is pb AND  is az THEN F is pb

October Example: Cart Pole Problem Fuzzification iii)Compute membership functions   1/22.5 =  /17.5  0.78 θ: pm θ: pb  1 1/22.5 =  /5  0.22  1  : az 1/11.25 =  /6.25  0.56

October Example: Cart Pole Problem Inference The two premises in RULE 1 are conjunctive  minimum of the two: min{0.78, 0.56}=0.56 1IF θ is pm AND  is az THEN F is pm 2IF θ is pb AND  is az THEN F is pb The two premises in RULE 2 are conjunctive  minimum of the two: min{0.22, 0.56}=0.22

October Example: Cart Pole Problem Composition ps pb Defuzzification C

October  Recap  Example: Air Conditioner  Example: Cart Pole Problem  Case Study: Building a Fuzzy Expert System  Summary Fuzzy Expert Systems

October A service centre keeps spare parts and repairs failed ones. A customer brings a failed item and receives a spare of the same type. Failed parts are repaired, placed on the shelf, and thus become spares. The objective is to advise a manager of the service centre on certain decision policies to keep the customers satisfied. Case Study: Building a Fuzzy Expert System Step 1: Specify the problem and define linguistic variables There are four main linguistic variables: average waiting time (mean delay) m, repair utilisation factor of the service centre , number of servers s, and initial number of spare parts n.

October Linguistic variables and their ranges

October Step 2: Determine fuzzy sets Fuzzy sets can have a variety of shapes. However, a triangle or a trapezoid can often provide an adequate representation of the expert knowledge, and at the same time, significantly simplifies the process of computation.

October Fuzzy sets of Mean Delay m

October Fuzzy sets of Number of Servers s

October Fuzzy sets of Repair Utilisation Factor 

October Fuzzy sets of Number of Spares n

October Step 3: Elicit and construct fuzzy rules To accomplish this task, we might ask the expert to describe how the problem can be solved using the fuzzy linguistic variables defined previously. Required knowledge also can be collected from other sources such as books, computer databases, flow diagrams and observed human behaviour.

October The square FAM representation

October The rule table

October Rule Base 1

October Cube FAM of Rule Base 2

October Step 4: Encode the fuzzy sets, fuzzy rules and procedures to perform fuzzy inference into the expert system To accomplish this task, we may choose one of two options: to build our system using a programming language such as C/C++ or Pascal, or to apply a fuzzy logic development tool such as MATLAB Fuzzy Logic Toolbox or Fuzzy Knowledge Builder.

October Step 5: Evaluate and tune the system The last, and the most laborious, task is to evaluate and tune the system. We want to see whether our fuzzy system meets the requirements specified at the beginning. Several test situations depend on the mean delay, number of servers and repair utilisation factor. The Fuzzy Logic Toolbox can generate surface to help us analyse the system’s performance.

October Three-dimensional plots for Rule Base 1

October Three-dimensional plots for Rule Base 1

October Three-dimensional plots for Rule Base 2

October Three-dimensional plots for Rule Base 2

October However, even now, the expert might not be satisfied with the system performance. To improve the system performance, we may use additional sets  Rather Small and Rather Large  on the universe of discourse Number of Servers, and then extend the rule base. Tune the system….

October Modified fuzzy sets of Number of Servers s

October Cube FAM of Rule Base 3

October Three-dimensional plots for Rule Base 3

October Three-dimensional plots for Rule Base 3

October Tuning fuzzy systems 1. Review model input and output variables, and if required redefine their ranges. required redefine their ranges. 2. Review the fuzzy sets, and if required define additional sets on the universe of discourse. additional sets on the universe of discourse. The use of wide fuzzy sets may cause the fuzzy The use of wide fuzzy sets may cause the fuzzy system to perform roughly. system to perform roughly. 3. Provide sufficient overlap between neighbouring sets. It is suggested that triangle-to-triangle and sets. It is suggested that triangle-to-triangle and trapezoid-to-triangle fuzzy sets should overlap trapezoid-to-triangle fuzzy sets should overlap between 25% to 50% of their bases. between 25% to 50% of their bases.

October Review the existing rules, and if required add new rules to the rule base. rules to the rule base. 5. Examine the rule base for opportunities to write hedge rules to capture the pathological behaviour hedge rules to capture the pathological behaviour of the system. of the system. 6. Adjust the rule execution weights. Most fuzzy logic tools allow control of the importance of rules logic tools allow control of the importance of rules by changing a weight multiplier. by changing a weight multiplier. 7. Revise shapes of the fuzzy sets. In most cases, fuzzy systems are highly tolerant of a shape fuzzy systems are highly tolerant of a shape approximation. approximation.

October  Recap  Example: Air Conditioner  Example: Cart Pole Problem  Case Study: Building a Fuzzy Expert System  Summary Fuzzy Expert Systems

October Summary Process of developing a fuzzy expert system Operation of a fuzzy expert system Examples: Air Conditioner; Cart Pole Problem Case Study: Building a Fuzzy Expert System