1 / 128

Practical examples of Linguistic variables

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 Similar to binary logic and state machines. We can create similar Fuzzy Expert Systems

delacruz
Download Presentation

Practical examples of Linguistic variables

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. Practical examples of Linguistic variables

  2. 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.

  3. 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.

  4. 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.

  5. 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].

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

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

  8. Fuzzy Logic Principles and Learning

  9. 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

  10. Fuzzy Control

  11. 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

  12. Industrial Application of Fuzzy Logic Control

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

  14. Uncertainty

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

  16. 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

  17. 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.

  18. Fuzzy logic representation of Uncertainty using Production Rules

  19. Production Rules • Assuming that the knowledge-base module contains knowledge represented in the format of production rules the following sections introduce the following: • the concept of a production rule • the concept of linguistic variables • the fuzzy inference concept • the concept of fuzzification and how to accomplish the crisp to fuzzy transformation • the concept of defuzzification and how to accomplish the fuzzy to crisp transformation

  20. Knowledge presentation using production rules • From a philosophical point the concept of knowledge is highly ambiguous and debatable • Knowledge-base builders treat knowledge from a narrower point of view: utilitarian, rules, facts, etc. • This way the knowledge is easier to model and understand. • It remains diverse including: • rules, • facts, • truths, • reasons, • defaults and • heuristics. • The knowledge engineerneeds some technique for capturing what is known about the application.

  21. Various types of Knowledge representation using production rules • The production rules technique should provide expressive adequacy and notational efficacy. • Knowledge representation is very much under constant research. • Several schemes have been suggested in the literature, namely: • semantic nets, • frames and • logic. • Production rules have also been suggested and are the most popular way of representing knowledge.

  22. Knowledge presentation using production rules • Production rules are small chunks of knowledge expressed in the form ofif..then statements. • The left hand side (IF) represents the antecedent or conditional part. • The right hand side (THEN) represents the conclusion or action part. • A number of rules collectively define a modularized know-how system. • The principal use of production rules is in the encoding of empirical associations between incoming patterns of data and actions that the system should perform as a consequence. • The production rules are either expressed by an expert of the field, or derived using induction.

  23. Fuzzy logic Control

  24. Fuzzy Logic Control • Fuzzy controller design consist of turning intuitions, and any other information about how to control a system, into set of rules. • These rules can then be applied to the system. • If the rules adequately control the system, the design work is done. • If the rules are inadequate, the way they failprovides informationto change the rules. Analyze experimentally, change

  25. Example: Control a Plant A valve in an internal combustion engine that regulates the amount of vaporized fuel entering the cylindres

  26. FLAKEY ROBOT = Fuzzy Logic forAutonomous Vehicle Motion Planning EXAMPLE

  27. Using Fuzzy Logic forAutonomous Vehicle Motion Planning • Findings of Stanford Research Institute (SRI) • Based on the performance of the robot “Flakey” circa 1993 • Discussion of autonomous navigation and path planning in an uncertain environment • Paper: “Using Fuzzy Logic for Autonomous Vehicle Motion Planning”

  28. Difficulties of a classical robot control problem • Autonomous operation of a mobile robot in a real-world unstructured environment poses a series of problems: • knowledge about the environment is usually: • incomplete • uncertain, and • approximate • Perceptually acquired information is not reliable: • noise introduces uncertainty and imprecision • limited range and visibility introduces incompleteness • errors in interpretation

  29. More Difficulties with classical robot Problem • Real world environments have complex and largely unpredictable dynamics • objects can move • the environment may be modified • features may change • – Vehicle action execution is not reliable: • the results produced by sending a given command to an effector can only be approximately estimated • action execution may fail entirely

  30. Robot Architecture using Fuzzy Controller Flakey Map of the rooms Key is “Local Perceptual Space”: LPS is a data structure providing geometric picture around vehicle LPS Local Perceptual Space (LPS) Goals are represented in the LPS by means of control structures Camera,etc

  31. The Fuzzy Controller Flakey • Physical motion of the robot is based on a complex fuzzy controller • The controller provides a layer of robusthigh-levelmotor skills. • Basic building block of controller is a “behavior”: • A behavior is defined as implementing an atomic motor skillaimed at achieving or maintaining a give goal situation • – e.g. follow a wall.

  32. Implementing Behaviors Flakey • Each behavioral skill is represented by means of a “desirability function” that expresses preferences over possible actions with reference to the goal: • e.g. a behavior aimed at following a given wall prefers actions that keep the agent parallel to the wall at a safe distance desirability function

  33. Behavior through Fuzzy Rules Flakey • Each behavior was implemented by a set of fuzzy rules of the form • IF A THEN C • A is composed of fuzzy predicates and connectives, and • C is a fuzzy set of control vectors • An example of a “keep off” behavior rule is: IFobstacle-close-in-front ANDNOTobstacle-close-on-left THEN turn-sharp-left

  34. Fast Reactive Behaviors Flakey • Purely reactive behaviors, intended to provide quick simple reactions to potential dangers typically use sensor data • This sensor data has undergone little or no interpretation. • Since quick response is necessary to avoid disaster, little processing can be done. Rules can be implemented in an FPGA

  35. Control Structures Flakey • Purposeful behavior like attempting to reach a certain location must take explicit goals into consideration. • Goals are represented in the LPS by means of control structures. • Control structure is a triple • S = (A,B,C) • A is a virtual object (artifact) in the LPS • B is a behavior that specifies the way to react to the presence of this object, and • C is a fuzzy predicate expressing the context where the control structure is relevant

  36. Control Structure Example Flakey S = (A,B,C) A is a virtual object (artifact) in the LPS B is a behavior that specifies the way to react to the presence of this object, and C is a fuzzy predicate expressing the context where the control structure is relevant • An example control structure is • S1=(CP1, go-to-CP, near(CP1) • CP1 is a control-point (marker for a location), together with a heading and a velocity • go-to-CP reacts to the presence of S1 in the LPS by generating the commands to reach the location, heading and velocity specified by CP1. • go-to-CP includes rules like: • IFfacing(CP1) AND too-slow-for(CP1)THEN accelerate-smooth-positive

  37. Blending of Behaviors Flakey • Many behaviors can be simultaneously active • Fuzzy controller selects the controls that best satisfy the active behaviors • Satisfaction is weightedby each behavior’s relevance to the current situation. • e.g. can’t follow a wall if there isn’t one • Context dependent blending of behaviors is implemented by combining the output of all the behaviors using context rules

  38. Generating a plan: S = (A,B,C) A is a virtual object (artifact) in the LPS B is a behavior that specifies the way to react to the presence of this object, and C is a fuzzy predicate expressing the context where the control structure is relevant • simple goal-regressing planner used: • based on a topological map annotated with approximate measurements (no obstacles) working backwards from goal. • An example plan might be: S1 = (Obstacle, keep-off, near(Obstacle)) S2 = (Corr1, follow,~near(obstacle) AND at(Corr2) AND ~near(Corr2)) S3 = (Corr2, follow,~near(obstacle) AND at(Corr2) AND ~near(Door5)) S4 = (Door5, cross,~near(Obstacle) AND near(Door5)) Flakey Control structure

  39. Executing the Plan Flakey • S1 = (Obstacle, keep-off, near(Obstacle)) • S2 = (Corr1, follow,~near(obstacle) AND at(Corr2) AND • ~near(Corr2)) • S3 = (Corr2, follow,~near(obstacle) AND at(Corr2) AND • ~near(Door5)) • S4 = (Door5, cross,~near(Obstacle) AND near(Door5))

  40. More FUZZY LOGIC SYSTEMS APPLICATIONS

  41. 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.

  42. 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.

  43. 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.

  44. 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.

  45. Conventional vs Fuzzy system

  46. Sections of a Fuzzy Logic Control System • Fuzzifier section • System inputs with range of values • Mapped to membership function can be non-linear in correspondence • Fuzzycontrol section • Input fuzzy values • Through fuzzy rules • Produce the fuzzy output values • De-fuzzifier section • Fuzzy output values are combined together in values needed for output

  47. Cruise Control Example of Fuzzy Logic Controller

  48. Example design of a Fuzzy Logic Control System – Cruise Control The block diagram of the intelligent cruise control system.

  49. Input membership functionsfor Cruise Control The three input membership functions Car’s Speed Relative to Cruise Setting Membership Function Distance from Car Ahead Car’s Speed Membership Functions Difference in Car’s Speed Relative to Cruise Setting Car’s Speed in Miles per Hour Space Distance in Feet Shows fuzzification of three inputs Membership values in Y axis

  50. Fuzzy Logic Rules Tablefor Cruise Control All combinations in this particular case are specified using a 3-Dimensional Table. For more dimensions you can use Kmap or Marquand Chart.

More Related