Practical examples of Linguistic variables

Slides:



Advertisements
Similar presentations

Advertisements

Brief introduction on Logistic Regression
 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 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.
Computer Intelligence and Soft Computing
Fuzzy Expert System.
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.
1 Validation and Verification of Simulation Models.
CHAPTER 6 Statistical Analysis of Experimental Data
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.
October 7, 2010Neural Networks Lecture 10: Setting Backpropagation Parameters 1 Creating Data Representations On the other hand, sets of orthogonal vectors.
FUZZY LOGIC Babu Appat. OVERVIEW What is Fuzzy Logic? Where did it begin? Fuzzy Logic vs. Neural Networks Fuzzy Logic in Control Systems Fuzzy Logic in.
Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 3b: Dealing with Uncertainty (Fuzzy Logic)
Fuzzy Sets Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto.
Slides are based on Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems.
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.
ENM 503 Lesson 1 – Methods and Models The why’s, how’s, and what’s of mathematical modeling A model is a representation in mathematical terms of some real.
 Definition Definition  Bit of History Bit of History  Why Fuzzy Logic? Why Fuzzy Logic?  Applications Applications  Fuzzy Logic Operators Fuzzy.
Fuzzy Inference (Expert) System
1 Introduction to Software Engineering Lecture 1.
Mobile Robot Navigation Using Fuzzy logic Controller
So Far……  Clustering basics, necessity for clustering, Usage in various fields : engineering and industrial fields  Properties : hierarchical, flat,
A Passive Approach to Sensor Network Localization Rahul Biswas and Sebastian Thrun International Conference on Intelligent Robots and Systems 2004 Presented.
Fuzzy Systems Michael J. Watts
Lógica difusa  Bayesian updating and certainty theory are techniques for handling the uncertainty that arises, or is assumed to arise, from statistical.
Uncertainty Management in Rule-based Expert Systems
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 Expert System Fuzzy Inference دكترمحسن كاهاني
International Conference on Fuzzy Systems and Knowledge Discovery, p.p ,July 2011.
1 Lecture 4 The Fuzzy Controller design. 2 By a fuzzy logic controller (FLC) we mean a control law that is described by a knowledge-based system consisting.
© Negnevitsky, Pearson Education, Lecture 5 Fuzzy expert systems: Fuzzy inference Mamdani fuzzy inference Mamdani fuzzy inference Sugeno fuzzy inference.
S PEED CONTROL OF DC MOTOR BY FUZZY CONTROLLER MD MUSTAFA KAMAL ROLL NO M E (CONTROL AND INSTRUMENTATION)
Week#3 Software Quality Engineering.
 Negnevitsky, Pearson Education, Lecture 12 Hybrid intelligent systems: Evolutionary neural networks and fuzzy evolutionary systems n Introduction.
REASONING UNDER UNCERTAINTY: CERTAINTY THEORY
Chapter 13 (Continued) Fuzzy Expert Systems 1. Fuzzy Rule-based Expert System 2.
Virtual University of Pakistan
Fuzzy Systems Simulation Session 5
Basics of Logic gates - Part 1
A great man who created a complete new mathematics with many practical applications.
Motion in Two Dimensions
Introduction to Fuzzy Logic and Fuzzy Systems
Artificial Intelligence CIS 342
Misconceptions about Fuzzy concepts
Fuzzy Systems Michael J. Watts
Formulate the Research Problem
Fuzzy expert systems Fuzzy inference Mamdani fuzzy inference
Artificial Intelligence
Fuzzy Logic and Fuzzy Sets
Homework 8 Min Max “Temperature is low” AND “Temperature is middle”
Artificial Intelligence and Adaptive Systems
Fuzzy logic Introduction 3 Fuzzy Inference Aleksandar Rakić
Dr. Unnikrishnan P.C. Professor, EEE
Dr. Unnikrishnan P.C. Professor, EEE
FUZZIFICATION AND DEFUZZIFICATION
Homework 9 Min Max “Temperature is low” AND “Temperature is middle”
Intelligent Systems and
Lecture 5 Fuzzy expert systems: Fuzzy inference
Review We presented several examples of simple fuzzy controllers
Dr. Unnikrishnan P.C. Professor, EEE
28th September 2005 Dr Bogdan L. Vrusias
Hybrid intelligent systems:
Fuzzy Inference Systems
Fuzzy Logic KH Wong Fuzzy Logic v.9a.
Presentation transcript:

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

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 contribute in calculating the resulting output. All in all, fuzzy expert systems require fewer production rules since fuzzy rules embody more information.

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.

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

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

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

Fuzzy Logic Principles and Learning

Fuzzy Logic Principles Fuzzy control produces actions using 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

Fuzzy Control

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

Industrial Application of Fuzzy Logic Control

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

Uncertainty

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

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

Methods of inference under uncertainty The certainty factor indicates the net belief in the conclusion and premises of a rule based 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 certainty is the difference between the two responses.

Fuzzy logic representation of Uncertainty using Production Rules

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

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 engineer needs some technique for capturing what is known about the application.

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.

Knowledge presentation using production rules Production rules are small chunks of knowledge expressed in the form of if..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.

Fuzzy logic Control

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 fail provides information to change the rules. Analyze experimentally, change

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

FLAKEY ROBOT = Fuzzy Logic for Autonomous Vehicle Motion Planning EXAMPLE FLAKEY ROBOT = Fuzzy Logic for Autonomous Vehicle Motion Planning

Using Fuzzy Logic for Autonomous 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”

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

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

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

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

Implementing Behaviors Flakey desirability function 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

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: IF obstacle-close-in-front AND NOT obstacle-close-on-left THEN turn-sharp-left

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

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

Control Structure Example 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 Flakey 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: IF facing(CP1) AND too-slow-for(CP1) THEN accelerate-smooth-positive

Blending of Behaviors Many behaviors can be simultaneously active Flakey Many behaviors can be simultaneously active Fuzzy controller selects the controls that best satisfy the active behaviors Satisfaction is weighted by 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

Generating a plan: simple goal-regressing planner used: 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 Flakey 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)) Control structure

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))

More FUZZY LOGIC SYSTEMS APPLICATIONS

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.

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.

Fuzzification The function of the fuzzification component is to convert crisp numbers to equivalent fuzzy sets. Please notice that the inputs might require some pre-processing in order to fit the range of the fuzzy system.

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.

Conventional vs Fuzzy system

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 Fuzzy control 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

Cruise Control Example of Fuzzy Logic Controller

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

Input membership functions for Cruise Control Car’s Speed Relative to Cruise Setting Membership Function Car’s Speed Membership Functions Distance from Car Ahead 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 The three input membership functions

Fuzzy Logic Rules Table for Cruise Control speed slow / distance from car ahead fast / distance from car ahead 15 30 45 60 75 +10 0.15 +5 0.35 0.50 -5 0.65 0.85 -10 All combinations in this particular case are specified using a 3-Dimensional Table. For more dimensions you can use Kmap or Marquand Chart.

Output membership function for Cruise Control The output is the accelerator percentage change needed to keep the car a safe distance behind the car ahead and to keep the car at cruising speed. Membership values in X axis

Fuzzy Inference: creating fuzzy output

Fuzzy Inference: creating fuzzy output At the end of the fuzzification step the working memory module contains the values of the fuzzified input. Each production rule is examined and all the rules that have their premises satisfied `fire'. Hence, the only rules which do not fire are those that at least one of their premises has a membership degree of zero. In the case that more than one rule fires, this is common and desirable, the system generates a single fuzzy output. This is achieved by combining all fuzzy outputs. The single fuzzy output is then passed to the defuzzification module which generates a crisp value. Then the system is ready to start the entire process all over again.

SIMPLE EXAMPLE: a four-rule system

SIMPLE EXAMPLE: a four-rule system Assumptions Let X,Y and Z be the linguistic variables. Let the membership functions be low and high. Let the membership functions be the same for all linguistic variables. Define the membership functions as: low(linguistic) = 1 - t high(linguistic) = t where t is a value in the interval [0,1].

A Simple Example (Membership Functions) Memberships functions in both X and Y axes LOW HIGH

A Simple Example (Rules) The rule base contains the following four rules: if X is low and Y is low then Z is high (rule-1) if X is low and Y is high then Z is low (rule-2) if X is high and Y is low then Z is low (rule-3) If X is high and Y is high then Z is high (rule-4)

A Simple Example (Calculations) Next assume that the inputs are 0 and 0.32 for the linguistic variables X and Y respectively. The problem then is to find if Z is high or low and its crisp value. The next steps are followed: Step-1: Find the membership grade for the premises of each rule. We have 8 premises but due to replication only 4 are needed. Low(X) = 1- t = 1-0 = 1 Low(Y) = 1- t = 1-0.32 = 0.68 High(X) = t = 0 High(Y) = t = 0.32 This is our decision

A Simple Example (Calculations) Step-2: Identify the rules that can fire. In our case only the first two rules can fire since the last two rules have a premise with a zero degree of membership. Step-3: For each rule that can fire find the strength of the firing. Rule-1 = min(1,0.68) = 0.68 Rule-2 = min(1,0.32) = 0.32 Note that min is used because the premises are connected with a logical AND.

A Simple Example Rule-2 = min(1,0.32) = 0.32

A Simple Example (Calculations) Step-4: All the fuzzy outputs are combined together to form a single fuzzy subset. One way is to take the pointwise maximum value over all fuzzy outputs. In our case we have two fuzzy outputs, so for each point we take the maximum value.

A Simple Example The rule base contains the following four rules: if X is low and Y is low then Z is high (rule-1) if X is low and Y is high then Z is low (rule-2) if X is high and Y is low then Z is low (rule-3) If X is high and Y is high then Z is high (rule-4) In our case we have two fuzzy outputs, so for each point we take the maximum value.

A Simple Example (Calculations) Step-5: The fuzzy combined output needs to be converted to a single crisp value. Using one method which takes the Average-of-Maxima. With this method one finds the maximum peak of the fuzzy combined output - in our case this is 0.68. Then one collects all the t values for which the maximum value occurs - in our case there are 42 cases. Finally, the crisp value is the average of such variables - in our case 0.84.

Development Cycle Do not discuss in the class – this is home reading

Development Cycle

Development Cycle Step 1: The goal is to establish the characteristics of the system, and also to define the specific operating properties of the proposed fuzzy model. Traditional systems analysis and knowledge engineering techniques can be employed at this stage. The designer must identify the relevant and appropriate inputs to the system; the basic transformations, if any, that are performed on the inputs,; and what output is expected from the system. The designer must also decide if the fuzzy system is a subsystem of a `global' system and if so to define where the fuzzy subsystem fits into the `global architecture', or if it is the `global' system itself. The numerical ranges of inputs and outputs must also be specified. This step applies to the development of all systems. Be prepared to throw away original versions at this stage.

Development Cycle Step 2: The goal is to decompose each control variable (i.e., inputs and outputs) into fuzzy sets and to give unique names to them. It has been reported in the literature that the number of labels associated with a control variable should generally be odd and between five and nine. Also, in order to obtain a smooth transition from a state to another each label should overlap somewhat with its neighbours. Overlapping of 10 to 50 percent is advised. Finally, the density of the fuzzy sets should be highest around the optimal control point of the system and should thin out as the distance from that point increases.

Development Cycle If possible begin with an exhaustive list of production rules Deal with redundant, impossible and implausible rules and/or conditions later. When the number of rules increases dramatically, may be several rule-bases might be constructed. Each rule-base to deal with a particular situation/condition of the system to be modelled.

Development Cycle Step 3: The goal is to obtain the production rules that tie the input values to the output values. Since each production rule `declares' a small chunk of knowledge, the order in the knowledge base is unimportant. Nevertheless, in order to maintain the knowledge base one should group the production rules by their premise variable. How many rules is obviously dependent on the application and is related to the number of control variables.

Development Cycle Step 4: The goal is to decide on the way that is going to be used in order to convert a an output fuzzy set into a crisp solution variable. There are many ways to perform the conversion but usually process control applications use the centroid technique. The rest of the steps are similar to any modelling exercise. For instance, at the end of the fuzzy system construction the process of simulation commences. The model is compared against known test cases and the results are validated. When the results are not as desired changes are made until the desired performance is achieved.

Popular Fuzzy Inference Methods

Popular Fuzzy Inference Methods Under the fuzzy inference process the grade of each premise is found and applied to the conclusion part of each rule. MIN or PRODUCT are two popular inference methods. With MIN inferencing the output of the conclusion part is clipped off at a height equal to the rule's degree of firing. This was used in the simple example before and the MIN inference for the first rule is re-shown below (Recall that the rule's degree of firing was 0.68):

MIN 0.68

PRODUCT With PRODUCT inferencing the output membership function is scaled by the rule's degree of firing. Using the first rule of the simple example and the PRODUCT inference we get the following

Product

Popular methods for combining outputs

Popular methods for combining outputs Under the combining outputs process all outputs are combined together to produce a single fuzzy output. MAX and SUM are two popular techniques for combining outputs. With MAX the pointwise maximum for all fuzzy outputs is taken. For the first rule of the simple example we used the MAX techniques which resulted in the following diagram:

Max

SUM With SUM the pointwise sum for all fuzzy outputs is taken. Again for the first rule of the simple example we get: Observe that we operate in fuzzy space, all inputs and outputs are in fuzzy interval [0, 1]

Defuzzification

Popular defuzzification methods Under the defuzzification process a fuzzy output is converted to a crisp number. Two of the more popular techniques are the MAXIMUM and the CENTROID. With MAXIMUM one selects the maximum value of the fuzzy output as the crisp value. There are several variations to the MAXIMUM theme. One such variation is the AVERAGE-OF-MAXIMA which was used in the simple example and gave us a crisp value of 0.84. With the CENTROID method, the center of gravity of the fuzzy output gives the crisp value. Using PRODUCT inferencing and the SUM combination the CENTROID results in a crisp value of 0.56.

Example of calculation of Maximum where n is the total number of fuzzy points (strips).

Calculating the output of a rule

Ways of Combining Fuzzy Logic Output Values There are four different techniques to combine the fuzzy logic rules output values. They are: Maximizer Average Centroid Singleton Observe that we no longer operate here in fuzzy interval [0, 1] Temperature not fuzzy value

With MAXIMUM one selects the maximum value of the fuzzy output as the crisp value. With the CENTROID method, the center of gravity of the fuzzy output gives the crisp value.

Another approach to Calculating the output of a rule Rules have promises which are usually combined together by the connective and. The output is calculated by taking the degree of membership of the lesser of all premises as the value of the combination and truncating the output fuzzy set at that level.

Calculating the output of a rule (cont) Truncated at 0.2 Rules have promises which are usually combined together by the connective and. The output is calculated by taking the degree of membership of the lesser of all premises as the value of the combination and truncating the output fuzzy set at that level.

Combining rule outputs When all rules have been evaluated a single fuzzy set is calculated by combining all outputs. The combination involves the connective or. The single output is calculated by taking the maximum of their respective output fuzzy sets grades at each point along the horizontal axis.

Combining rule outputs Think about the set of fuzzy rules as a network with fuzzy literals and operators MIN, MAX, etc. In primary inputs you have fuzzification, in primary outputs you have defuzzification. The network analogy is very useful in your thinking about fuzzy logic, mv logic, or any other kind of data structure to store knowledge. Shifted horizontally Do in class a complete example of designing a fuzzy logic network for a simple robot control with about 6 rules. Discuss various operators and fuzzifiers, defuzzifiers.

STATIC, ADAPTIVE, SELF-ORGANISING SYSTEMS

STATIC, ADAPTIVE, SELF-ORGANISING SYSTEMS Up to now we have seen that fuzzy logic supports the task of designing a control system. What we examined in previous sections is known as the `static' fuzzy system. In such a system, conventional techniques are employed in order to elicit or induce production rules. Such a system, receives inputs which are then normalised and converted to fuzzy representations, the knowledge base is executed, an output fuzzy set is generated which is then converted to a crisp value.

“static” fuzzy system.

ADAPTIVE, SELF-ORGANISING SYSTEMS The rules do not change, except if modified by the hand of the designer, for all the knowledge base lifetime. Static systems are fine for applications in which the environment is known and predictable. But because they can not adapt to gradual changes in their environments they can lead to disaster when the assumptions upon which they are built are violated. An adaptive system adjusts to time or process conditions. This means that such a system modifies: - the charactersitics of the rules, the topology of the fuzzy sets, and the method of defuzzification among others.

An adaptive system

ADAPTIVE, SELF-ORGANISING SYSTEMS A performance metric, often another expert system or an algorithm, compares the current and the stored array of past solutions and the comparison result is passed to an adaptation machine.. The adaptation machine, often another expert system, decides what changes to make in the underlying fuzzy model. For instance: the contribution weights connected with each rule can be modified or the membership functions re-drawn.

Misconceptions about Fuzzy concepts

Fuzziness is not Vague we shall have a look at some propositions. Dimitris is six feet tall The first proposition (traditional) has a crisp truth value of either TRUE or FALSE. He is tall The second proposition is vague. It does not provide sufficient information for us to make a decision, either fuzzy or crisp. We do not know the value of the pronoun. Is it Dimitris, John or someone else?

Fuzziness is not Vague Andrei is tall This proposition is a fuzzy proposition. It is true to some degree depending in the context, i.e., the universe of discourse. It might be SomeWhat True if we are referring to basketball players or it might be Very True if we are referring to horse-jockeys.

Fuzziness is not Multi-valued logic The limitations of two-valued logic were recognised very early. A number of different logic theories based on multiple values of truth have been formulated through the years. For example, in three-valued logic three truth values have been employed. These are TRUTH, FALSE, and UNKNOWN represented by 1, 0 and 0.5 respectively. In 1921 the first N-valued logic was introduced. The set of truth values Tn were assumed to be evenly divided over the closed interval [0,1]. Fuzzy logic may be considered as an extension of multi-valued logic but they are somewhat different. Multi-valued logic is still based on exact reasoning whereas fuzzy logic is approximate reasoning.

Fuzziness is not Probability!!!

Fuzziness is not Probability This is better explained using an example. Let X be the set of all liquids (i.e., the universe of discourse) . Let L be a subset of X which includes all suitable for drinking liquids. Suppose now that you find two bottles, A and B. The labels do not provide any clues about the contents. Bottle A label is marked as membership of L is 0.9. The label of bottle B is marked as probability of L is 0.9. Given that you have to drink from the one you choose, the problem is of how to interpret the labels.

Fuzziness is not Probability Well, membership of 0.9 means that the contents of A are fairly similar to perfectly potable liquids. If, for example, a perfectly liquid is pure water then bottle A might contain, say, tonic water. Probability of 0.9 means something completely different. You have a 90% chance that the contents are potable and 10% chance that the contents will be unsavoury, some kind of acid maybe. Hence, with bottle A you might drink something that is not pure but with bottle B you might drink something deadly. So choose bottle A.

Fuzziness is not Probability Opening both bottles you observe beer (bottle A) and hydrochloric acid (bottle B). The outcome of this observation is that the membership stays the same whereas the probability drops to zero. All in all: probability measures the likelihood that a future event will occur, fuzzy logic measures the ambiguity of events that have already occurred. In fact, fuzzy sets and probability exist as parts of a greater Generalized Information Theory. This theory also includes: Dempster-Shafer evidence theory, possibility theory, and so on.

Applications of Fuzzy concepts

Example: Cement Kiln Example

Example: Simulation of accident

Fuzzy Logic is NOT fuzzy thinking

Where is fuzzy logic used? Fuzzy logic is a powerful problem-solving methodology. It is used directly and indirectly in a number of applications. Fuzzy logic is now being applied all over Japan, Europe and more recently in the United States of America. It is true though that all we ever hear about is Japanese fuzzy logic. Products such as: the Panasonic rice cooker, Hitachi's vacuum cleaner, Minolta's cameras, Sony's PalmTop computer, and so on. This is not unexpected since Japan adopted the technology first.

Where is fuzzy logic used? whereas in the West companies might keep their fuzzy development secret because of the implication of the word `fuzzy', or because companies want to preserve competitive advantage, or because fuzzy logic is embedded in products without advertisement. Most applications of fuzzy logic use it as the concealed logic system for expert systems.

Where is fuzzy logic used? The areas of potential fuzzy implementation are numerous and not just for control: Speech recognition, fault analysis, decision making, image analysis, scheduling and many more are areas where fuzzy thinking can help. Hence, fuzzy logic is not just control but can be utilized for other problems.

Example: Fraudulent Behavior One business problem, namely that of fraud detection, was recently addressed using fuzzy logic. The system detects probable fraudulent behavior: by evaluating all the characteristics of a provider's claim data in parallel, against the normal behavior of a small ( in demographic terms ) community. An all-American success story is the use of fuzziness on keeping a commercial refrigerator thermally controlled (0.1 C). The excitement comes due to the fact that this refrigerator has flown on several space shuttle flights.

Example: Automatic Focusing system Another interesting application has been reported by Aptronix Inc. Fuzzy logic was there used as a means of determining correct focus distance for cameras with automatic focusing system. Traditionally, such a camera focuses at the middle of the view finder. This can be inaccurate though when the object of interest is not at the center. Using fuzzy logic, three distances are measured from the view finder; left, center and right. For each measurement a plausibility value is calculated and the measurement with the highest plausibility is deemed as the place where the object of interest is located.

When to use Fuzzy Logic? If the system to be modelled is a linear system which can be represented by a mathematical equation or by a series of rules then straightforward techniques should be used. Alternatively, if the system is complex, fuzzy logic may be the technique to follow.

When to use Fuzzy Logic? We define a complex system : when it is nonlinear, time-variant, ill-defined; when variables are continuous; when a mathematical model is either too difficult to encode or does not exist or is too complicated and expensive to be evaluated; when noisy inputs; and when an expert is available who can specify the rules underlying the system behavior. Use fuzzy logic for complex systems

Summary Fuzzy logic captures intuitive, human expressions. Fuzzy sets, statements, and rules are the basis of control. The technique is extremely powerful, and appears in mills at a growing rate. It is combined with other methods and is the base of soft computing Used much in Intelligent Robotics

http://www.mendeley.com/research/realistic-behaviour-simulation-humanoid-robot-5/

Questions and Problems (1) Explain Linguistic Variables in Expert Systems. Explain and illustrate these concepts: fuzzifying, fuzzy rule base, fuzzy inference, defuzzifying Give various methods to explain the concept of uncertainty in robotics. Uncertainty versus fuzziness. Explain Fuzzy Control in robot Flakey. What is LPS? Blending of behaviors and generating a plan in Flakey. What is the advantage of fuzzy logic? Compare, subsystem after subsystem, a fuzzy controller with a classical controller. Cruise Control Example of Fuzzy Logic Controller, how can you improve it for more sensors, more motors and more advanced rules? Give an example how to create a fuzzy rule table. Read the Four-Rules example. Explain how to use graphics to calculate values of operators. Use this example to explain how a more complicated Braitenberg Vehicle would work. Assume that it has to execute both Aggressive and Shy behaviors and we use another sensor or combination of sensors to change from one to another behavior.

Questions and Problems (2) Explain stages of the development cycle using fuzzy logic for a simple Braitenberg- Vehicle like robot with more sensors than 5. Explain graphical methods for MIN, MAX, SUM, PRODUCT and other operators. Explain on example how these methods to calculate outputs work: Centroid, Maximum, Average-of-Maxima. Explain and illustrate the concepts of Static, Versus Adaptive, versus Self-Organizing Fuzzy Systems. Discuss the misconceptions about fuzzy logic: fuzzy logic is fuzzy thinking, fuzzy logic is probabilistic, fuzzy logic means no math, fuzziness is vague. Explain Mamdani’s Controller for Cement Kiln. How to go from Operator’s Manual to Fuzzy Rules. How to select values of parameters? Explain the Takagi-Sugeno Fuzzy Control System. Give and explain five examples of Fuzzy Systems and invent a new fuzzy system by yourself.

HOMEWORK 3 (not this year) This homework should be returned by December 1. Homework 3 should involve Fuzzy Logic control for a robot. (besides this constrain you have a complete freedom to make software of your interest, you can use also ANN, kinematics, inverse kinematics, etc). This can be a simulated robot or a robot from your project. Robot should have some kind of sensors and some kind of effectors. The robot should respond with its motions to the changes of the environment (mobile robot avoids obstacles, follow a line, follow a corridor, etc, robot arm puts blocks on top of one another, etc). The control of the robot should use fuzzy logic. Example of good robot arm is here http://www.androidworld.com/prod61.htm

Sources Paul and Mildred Burkey Weilin Pan Xuekun Kou A. Ferworn Kevin Morris Dr Dimitris Tsaptsinos Kingston University, Mathematics http://www.kingston.ac.uk/~ma_s435 ma_s435@kingston.ac.uk