1 / 98

A great man who created a complete new mathematics with many practical applications.

A great man who created a complete new mathematics with many practical applications. Practical examples of Linguistic variables. Linguistic variables in Expert Systems. Expert Systems are based on hundreds of “If the Else rules that combine inputs , logic and outputs

engstrom
Download Presentation

A great man who created a complete new mathematics with many practical applications.

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A great man who created a completenew mathematics with many practical applications.

  2. Practical examples of Linguistic variables

  3. Linguistic variables in Expert Systems • Expert Systems are based on hundreds of “If the Else rules that combine inputs , logic and outputs • Similar to binary logic and state machines. • We can create similar Fuzzy Expert Systems • Looking at the production rules of either a expert system or a fuzzy expert system one can not see any differences • except that the fuzzy system is employing linguistic descriptors rather than absolute numerical values. • However, both parts of fuzzy rules have associated `levels of belief' something lacking in traditional production rules.

  4. What is good about fuzzy expert systems • Observe that in traditional production rules even when more than one rule applies only one executes. • With fuzzy rules all applicable rules contributein calculating the resulting output. • All in all, fuzzy expert systems require fewer production rules since fuzzy rules embody more information.

  5. Linguistic variables in Fuzzy Expert Systems • A major reason behind using fuzzy logic is the use of linguistic expressions. • A linguistic variable consists of: • the name of the variable (u), • the term set of the variable (T(u)), • its universe of discourse (U) in which the fuzzy sets are defined, • a syntactic rule for generating the names of values of u, and • a semantic rule for associating with each value its meaning.

  6. More FUZZY LOGIC SYSTEMS APPLICATIONS • 1. Discuss a Fuzzy Logic Control System • 2. Steps in Designing a Fuzzy Logic Control System • 3. Design of a Fuzzy Logic Control System: • Input membership function, • Fuzzy logic rules table, • Output membership function.

  7. Components of Fuzzy system: • The components of a conventional expert system and a fuzzy system are the same. • Fuzzy systems though contain `fuzzifiers’. • Fuzzifiers convert crisp numbers into fuzzy numbers, • Fuzzy systems contain `defuzzifiers', • Defuzzifiers convert fuzzy numbers into crisp numbers.

  8. Fuzzification • The function of the fuzzification component is toconvert crispnumbers to equivalent fuzzy sets. • Please notice that the inputs might require some pre-processing in order tofit the rangeof the fuzzy system.

  9. Defuzzification • The output of the combined operation is defuzzified before being broadcast to the external world. • This implies the conversion of a fuzzy set to a crisp number. • There are several techniques of defuzzification.

  10. Conventional vs Fuzzy system

  11. For example: • if u is temperature, • then its term set T(temperature) could be: • T(temperature)={cold, cool, warm, hot} over a universe of discourse U=[0,300].

  12. Definitions of Fuzzy Sets in Fuzzy Expert Systems We can have either continuous or discrete definition of a fuzzy set

  13. Example of a Linguistic Variable • …. Terms, Degree of Membership, Membership Function, Base Variable…..

  14. Fuzzy Logic Principles and Learning

  15. Fuzzy Logic Principles • Fuzzy control produces actionsusing a set of fuzzy rules based on fuzzy logic • Fuzzy controller involves: • fuzzifying: mapping sensor readings into a set of fuzzy inputs • fuzzy rule base: a set of IF-THEN rules • fuzzy inference: maps fuzzy sets onto other fuzzy sets using membership fncts. • defuzzifying: mapping a set of fuzzy outputs onto a set of crisp output commands

  16. Fuzzy Control

  17. Fuzzy Control • Fuzzy logic allows for specifying behaviors as fuzzy rules • Such behaviors can be smoothly blended together (e.g., Flakey robot) • Fuzzy rules can be learned • Any learning method can be used

  18. Industrial Application of Fuzzy Logic Control

  19. History, State of the Art, and Future Development of fuzzy logic systems

  20. Uncertainty

  21. Types of Uncertainty and the Modeling of Uncertainty • Stochastic Uncertainty: • The Probability of Hitting the Target is 0.8 Three Examples of Lexical Uncertainty:

  22. Methods of inference under uncertainty • inference under uncertainty is very important to consider when using expert systems since sometimes data is uncertain (i.e., ambiguous, incomplete, noisy etc.). • A number of theories have been devised to deal with uncertainty. • These include : • classical probability, • Bayesian probability, • Shannon theory, • Dempster-Shafer theory, • other. • A popular method of dealing with uncertainty uses certainty factors

  23. Methods of inference under uncertainty • The certainty factor indicates the net belief in the conclusion and premises of a rulebased on some evidence. • Certainty factors are hand-crafted by asking potential users questions such as `How much do you believe that opening valve x will start a flooding' and `How much do you disbelieve that opening valve x will start a flooding'. • The degree of certaintyis the difference between the two responses.

  24. Fuzzy Logic practical easy examples

  25. Controller Structure • Fuzzification • Scales and maps input variables to fuzzy sets • Linear or not • Single input single output • Inference Mechanism • Approximate reasoning • Deduces the control action • Various shapes of membership functions • Various operators, not only MIN, MAX and NOT. • Defuzzification • Convert fuzzy output values to control signals • Defuzzification can be a single output linear or nonlinear function with fuzzy input and crisp output • Defuzzification can be built-into the “output sum” which can be other function than MAX or SUM or TRUNCATED SUM.

  26. How to combine various, even conflicting pieces of advise? Linguistic

  27. Examples of Operations on the same variable A B A  B A  B A

  28. Example 1:Using Fuzzy Logic for a Line Following Robot

  29. Mechanical Design of a very inexpensive Line-Following Robot In our example below: Line white, background black

  30. Basic Motions of a Differential Drive robot Reminder = Braitenberg Vehicles

  31. Calculations for input rules

  32. Structure of this type of the system: Two Levels, various membership functions in each, shared MIN MIN Defuzzifier of the “sum” MIN Fuzzified inputs MIN MIN Fuzzy values of combined first level groups One input Defuzzifier MAX MIN MIN Level of input membership functions Level of output membership functions Reminder = general simple scheme for Fuzzy Logic

  33. Input Membership Functions Characteristics of two identical sensors We have three membership functions: Black, Gray and White

  34. Sample Fuzzy Rule Base – for input rules • Here is an example how you can create your own rules for a robot of your choice. • This table decides what to do for every combination of data from both input sensors SR X = don’t know = undetermined The system will “learn” values for these don’knows. • Descriptions such as this table: • Generalize Truth Table • Generalize Karnaugh Map

  35. Output Membership Function • Output of the controller can be negative or positive

  36. This slide explains how to apply rules for left sensor We calculate for given measurement for the left sensor For black membership function white black gray For white membership function black Reading the data from left sensor

  37. How to apply input rules?

  38. How to calculate output? • Here are some examples of rule calculations This calculated 0.7 for SL This calculated 0.2 for F Similarly we calculate 0.3 for SR Right sensor Left sensor

  39. Calculations for output rules

  40. How to calculate Output Membership Function Calculated in previous slide 0.7 for SL Calculated similarly for SR 0.2 calculated for F Note: this is some kind of weighted sum, easy to calculate for symmetric triangles, just example This is one example of defuzzification that calculates the speed of the motor

  41. Structure of this type of the system: Two Levels, various membership functions in each, shared Sensor L This is fuzzy “strength” of the fuzzy output value SL white SL 0.7 Defuzzifier 0.7 MIN Note: this is some kind of weighted sum gray This is fuzzy “strength” of the fuzzy output value F SL 0.8 F -20 black MIN F other white 0 HL MIN ……. gray Fuzzy values of combined first level groups black Level of output membership functions Sensor R Level of input membership functions • Aggregation of rules • Defuzzification speed of the motor Many methods exist

  42. To remember • The previous slide was only a special case of defuzzification in a sum gate • Many other methods and shapes are possible. • Remember the general structure of the circuit. There are many variants of this circuit. With many defuzzification methods.

  43. Example 2:Using Fuzzy Logic for an Obstacle Avoiding Robot

  44. In this example the principles are the same as before, but the way of calculating is somewhat different. • We have no table, just we directly write rules. • This is just for didactic reasons.

  45. Can walk quickly Needs to walk slower

  46. Very Basic Control Theory Read carefully, you will experimentally create similar controllers for any robots @ Your speed towards a goal or away from an object should be proportional to the distance from it. @ If you want to get to a goal in an optimal amount of time you want to move quickly. @ However, you need to decelerate as you grow near the target so you can have more control. @Speed is proportional to distance-to-target Our informal rule Speed is proportional to the distance to target

  47. Read carefully Very Basic Control Theory Remember real systems have momentum @ In systems with momentum (i.e. the real world) we have to worry about more complex acceleration and deceleration. @ We can overshoot our target or stop short! @You increase your rate of deceleration based on how close you are to a goal or obstacle. @You can also integrate over the distance to a goal to create a steady state. @ This is the basic idea behind a PID controller. @Proportional Integral Derivative @The physical derivation of PID can be tricky, we will avoid it for now. @However this is a part of an extremely interesting topic! We are not using PID controller but we want the system to work like with a PID controller

  48. IDEA! Heuristic experimental rules • Lets just hack a fuzzy controller together and avoid some math. • The formal mathematicians will hate us, but if it works, that may be all that matters! • Derive rule of thumb ideas for speed and direction • If I am 6 meters from the obstacle, am I far from it?

More Related