F UZZY L OGIC Ranga Rodrigo March 30, 2014 Most of the sides are from the Matlab tutorial. 1.

Slides:



Advertisements
Similar presentations
Fuzzy Logic 11/6/2001. Agenda General Definition Applications Formal Definitions Operations Rules Fuzzy Air Conditioner Controller Structure.
Advertisements

Fuzzy Inference Systems
 Negnevitsky, Pearson Education, Lecture 5 Fuzzy expert systems: Fuzzy inference n Mamdani fuzzy inference n Sugeno fuzzy inference n Case study.
Fuzzy Expert System  An expert might say, “ Though the power transformer is slightly overloaded, I can keep this load for a while”.  Another expert.
AI – CS364 Fuzzy Logic Fuzzy Logic 3 03 rd October 2006 Dr Bogdan L. Vrusias
Lecture 4 Fuzzy expert systems: Fuzzy logic
Fuzzy Inference and Defuzzification
CS 561, Sessions This time: Fuzzy Logic and Fuzzy Inference Why use fuzzy logic? Tipping example Fuzzy set theory Fuzzy inference.
CLASSICAL LOGIC and FUZZY LOGIC. CLASSICAL LOGIC In classical logic, a simple proposition P is a linguistic, or declarative, statement contained within.
Fuzzy Logic Steve Foster.
Fuzzy Expert System Fuzzy Logic
AI TECHNIQUES Fuzzy Logic (Fuzzy System). Fuzzy Logic : An Idea.
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.
Fuzzy Sets and Fuzzification Michael J. Watts
Fuzzy Logic E. Fuzzy Inference Engine. “antecedent” “consequent”
Lecture 07 Fuzzy Reasoning
Fuzzy Expert System.
Fuzzy Logic E. Fuzzy Inference Engine. “antecedent” “consequent”
Chapter 18 Fuzzy Reasoning.
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.
The Equivalence between fuzzy logic controllers and PD controllers for single input systems Professor: Chi-Jo Wang Student: Nguyen Thi Hoai Nam Student.
Fuzzy Rule-based Models *Neuro-fuzzy and Soft Computing - J.Jang, C. Sun, and, E. Mizutani, Prentice Hall 1997.
Fuzzy Logic. Sumber (download juga): 0logic%20toolbox.pdf
BEE4333 Intelligent Control
Indian Institute of Technology Bombay GIS-based mineral resource potential mapping - Modelling approaches  Exploration datasets with homogenous coverage.
9/3/2015Intelligent Systems and Soft Computing1 Lecture 4 Fuzzy expert systems: Fuzzy logic Introduction, or what is fuzzy thinking? Introduction, or what.
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,
Fuzzy Rules 1965 paper: “Fuzzy Sets” (Lotfi Zadeh) Apply natural language terms to a formal system of mathematical logic
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 Expert Systems. 2 Motivation On vagueness “Everything is vague to a degree you do not realise until you have tried to make it precise.” Bertrand.
Fuzzy Inference (Expert) System
Logical Systems and Knowledge Representation Fuzzy Logical Systems 1.
Lógica difusa  Bayesian updating and certainty theory are techniques for handling the uncertainty that arises, or is assumed to arise, from statistical.
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.
Fuzzy Inference Systems. Fuzzy inference (reasoning) is the actual process of mapping from a given input to an output using fuzzy logic. The process involves.
“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 Inference Systems
Chapter 4: Fuzzy Inference Systems Introduction (4.1) Mamdani Fuzzy models (4.2) Sugeno Fuzzy Models (4.3) Tsukamoto Fuzzy models (4.4) Other Considerations.
Fuzzy Expert System n Introduction n Fuzzy sets n Linguistic variables and hedges n Operations of fuzzy sets n Fuzzy rules n Summary.
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.
Introduction of Fuzzy Inference Systems By Kuentai Chen.
Dinner for Two. Fuzzify Inputs Apply Fuzzy Operator.
© Negnevitsky, Pearson Education, Lecture 5 Fuzzy expert systems: Fuzzy inference Mamdani fuzzy inference Mamdani fuzzy inference Sugeno fuzzy inference.
VIDYA PRATISHTHAN’S COLLEGE OF ENGINEERING, BARAMATI.
Lecture 4 Fuzzy expert systems: Fuzzy logic n Introduction, or what is fuzzy thinking? n Fuzzy sets n Linguistic variables and hedges n Operations of fuzzy.
Introduction to Fuzzy Logic and Fuzzy Systems
Fuzzy Inference System
Artificial Intelligence CIS 342
Fuzzy expert systems Fuzzy inference Mamdani fuzzy inference
Fuzzy Logic 11/6/2001.
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ć
CLASSICAL LOGIC and FUZZY LOGIC
Dr. Unnikrishnan P.C. Professor, EEE
FUZZIFICATION AND DEFUZZIFICATION
Homework 9 Min Max “Temperature is low” AND “Temperature is middle”
Lecture 5 Fuzzy expert systems: Fuzzy inference
Dr. Unnikrishnan P.C. Professor, EEE
This time: Fuzzy Logic and Fuzzy Inference
Fuzzy Inference Systems
Presentation transcript:

F UZZY L OGIC Ranga Rodrigo March 30, 2014 Most of the sides are from the Matlab tutorial. 1

I NTRODUCTION Fuzzy logic is due to the 1965 paper by Prof. Lofti A. Zadeh. Fuzzy logic is a form of many- valued logic; it deals with reasoning that is approximate rather than fixed and exact. Compared to traditional binary sets (true or false values) fuzzy logic variables may have a truth value that ranges in degree between 0 and 1 (no and yes). 2

H UMAN R EASONING Fuzzy systems attempts to mimic human reasoning. It can capture the degree of belongingness. E.g., – Is a student short, or tall? – In classical logic: h > 6 feet is tall and h  6 is short. – How about 5 feet 11 inches? Some may call this tall, and some may call it short. – This information is captured as a matter of degree This “degree” is called a truth value. 3

O VERVIEW OF A F UZZY I NFERENCE S YSTEM The point of fuzzy logic is to map an input space to an output space. The input space consists of a vector of truth values. The primary mechanism for doing this is a list of if- then statements called rules. 4

P ROCESS 5 Crisp input  Fuzzy input Fuzzification  Fuzzy set Apply Fuzzy Operators and Implication  Crisp output Defuzzyfication

A F UZZY I NFERENCE S YSTEM (FIS) 6 InputOutput Rules Input terms (interpret) Output terms (assign) A General Case ServiceTip If service is good then tip is cheap If service is good then tip is average If service is excellent then tip is generous Service is interpreted as {poor, good, excellent} Tip is assigned to be {cheap, average, generous} A Specific Example A FIS interprets the values in the input vector and, based on some set of rules, assigns values to the output vector.

F UZZY S ETS Fuzzy logic starts with the concept of a fuzzy set. A fuzzy set is a set without a crisp, clearly defined boundary. It can contain elements with only a partial degree of membership. 7

F UZZY S ETS E XAMPLE 8 A classical set: The set of days of the week unquestionably includes Monday, Thursday, and Saturday. It just as unquestionably excludes butter, liberty, and dorsal fins, and so on. A fuzzy set: Most would agree that Saturday and Sunday belong, but what about Friday? It feels like a part of the weekend, but somehow it seems like it should be technically excluded. Of any subject, one thing must be either asserted or denied In fuzzy logic, the truth of any statement becomes a matter of degree.

F UZZY S ETS E XAMPLE C ONTD. Reasoning in fuzzy logic is a matter of generalizing the familiar yes-no (Boolean) logic. If true = 1 and false = 0, fuzzy logic also permits in- between values like 0.2 and Q: Is Saturday a weekend day? – A: 1 (yes, or true) Q: Is Tuesday a weekend day? – A: 0 (no, or false) Q: Is Friday a weekend day? – A: 0.8 (for the most part yes, but not completely) Q: Is Sunday a weekend day? – A: 0.95 (yes, but not quite as much as Saturday). 9

10 Truth values for weekend-ness if forced to respond with an absolute yes or no response Truth value for weekend-ness if allowed to respond with fuzzy in- between values Continuous-scale Time Plot of Weekend-ness for Two-valued And Multi-Valued Membership

E XAMPLE OF A PPLYING T RUTH V ALUES A temperature measurement for anti-lock brakes Each function maps the same temperature value to a truth value in the 0 to 1 range. These truth values can then be used to determine how the brakes should be controlled Truth values of each of the three functions at a particular temperature

M EMBERSHIP F UNCTIONS A membership function (MF) is a curve that defines how each point in the input space is mapped to a membership value (or degree of membership) between 0 and 1. The input space is sometimes referred to as the universe of discourse. 12

M EMBERSHIP F UNCTIONS C ONTD. A smoothly varying curve that passes from not-tall to tall is the right way to represent. The output-axis is a number known as the membership value between 0 and 1. The curve is known as a membership function and is often given the designation of µ. 13

14

M EMBERSHIP F UNC. IN F UZZY L OGIC T OOLBOX 15 Triangular Membership Function Trapezoidal Membership Function Gaussian Membership Function Sigmoid Membership Function

L OGICAL O PERATIONS Fuzzy logical reasoning is the fact that it is a superset of standard Boolean logic. 16 Standard Truth Table Fuzzy Truth Table AND: min(A,B) OR: max(A,B) NOT: 1-A

A PPLICATION OF L OGICAL O PERATORS 17

I F -T HEN R ULES Fuzzy sets and fuzzy operators are the subjects and verbs of fuzzy logic. These if-then rule statements are used to formulate the conditional statements that comprise fuzzy logic. A single fuzzy if-then rule assumes the form An example of such a rule might be 18 if x is A then y is B If service is good then tip is average The if-part of the rule "x is A" is called the antecedent or premise. While the then-part of the rule "y is B" is called the consequent or conclusion.

I F -T HE R ULES C ONTD. In general, the input to an if-then rule is the current value for the input variable (in this case, service) The output is an entire fuzzy set (in this case, average). This set will later be defuzzified, assigning one value to the output. 19

P ROCESS 20 Crisp input  Fuzzy input Fuzzification  Fuzzy set Apply Fuzzy Operators and Implication  Crisp output Defuzzyfication

L OGICAL O PERATION OF T HEN The implication function then modifies that fuzzy set to the degree specified by the antecedent. The most common ways to modify the output fuzzy set are – truncation using the min function – scaling using the prod function 21

22

S UMMARY OF I F -T HEN R ULES Interpreting if-then rules is a three-part process. Fuzzify inputs: Resolve all fuzzy statements in the antecedent to a degree of membership between 0 and 1. If there is only one part to the antecedent, then this is the degree of support for the rule. Apply fuzzy operator to multiple part antecedents: If there are multiple parts to the antecedent, apply fuzzy logic operators and resolve the antecedent to a single number between 0 and 1. This is the degree of support for the rule. Apply implication method: Use the degree of support for the entire rule to shape the output fuzzy set. The consequent of a fuzzy rule assigns an entire fuzzy set to the output. This fuzzy set is represented by a membership function that is chosen to indicate the qualities of the consequent. If the antecedent is only partially true, (i.e., is assigned a value less than 1), then the output fuzzy set is truncated according to the implication method. 23

S UMMARY OF I F -T HEN R ULES C ONTD. In general, one rule alone is not effective. Two or more rules that can play off one another are needed. The output of each rule is a fuzzy set. The output fuzzy sets for each rule are then aggregated into a single output fuzzy set. Finally the resulting set is defuzzified, or resolved to a single number. 24

FUZZY INFERENCE SYSTEMS 25

W HAT A RE F UZZY I NFERENCE S YSTEMS ? Fuzzy inference is the process of formulating the mapping from a given input to an output using fuzzy logic. The mapping then provides a basis from which decisions can be made, or patterns discerned. The process of fuzzy inference involves all of the pieces: – Membership Functions – Logical Operations – If-Then Rules. We concentrate on the Mamdani-type FIS (Ebrahim Mamdani in 1975). 26

A PPLICATIONS OF FIS Automatic control Data classification Decision analysis Expert systems Computer vision 27 WT-H650-top-loader-washing-machine

O VERVIEW OF F UZZY I NFERENCE P ROCESS 28

S TEP 1. F UZZIFY I NPUTS The first step is to take the inputs and determine the degree to which they belong to each of the appropriate fuzzy sets via membership functions. 29

S TEP 2. A PPLY F UZZY O PERATOR After fuzzification, the degree to which each part of the antecedent is satisfied for each rule is known. If the antecedent of a given rule has more than one part, the fuzzy operator is applied to obtain one number that represents the result of the antecedent for that rule. 30

S TEP 3. A PPLY I MPLICATION M ETHOD After applying a weight to each rule, the implication method is implemented. A consequent is a fuzzy set represented by a membership function, which weights appropriately the linguistic characteristics that are attributed to it. The consequent is reshaped using a function associated with the antecedent (a single number). 31

32

S TEP 4. A GGREGATE A LL O UTPUTS Because decisions are based on the testing of all of the rules in a FIS, the rules must be combined in some manner in order to make a decision. Aggregation is the process by which the fuzzy sets that represent the outputs of each rule are combined into a single fuzzy set. Methods: – max (maximum) – probor (probabilistic OR) – sum (simply the sum of each rule's output set) 33

34 fuzzy tipper

S TEP 5. D EFUZZIFY The input for the defuzzification process is a fuzzy set (the aggregate output fuzzy set) and the output is a single number. As much as fuzziness helps the rule evaluation during the intermediate steps, the final desired output for each variable is generally a single number. However, the aggregate of a fuzzy set encompasses a range of output values, and so must be defuzzified in order to resolve a single output value from the set. Methods: centroid, bisector, middle of max, largest of max, smallest of max. 35

36

S UMMARY 37

38