CS344: Introduction to Artificial Intelligence (associated lab: CS386)

Similar documents
CS344: Introduction to Artificial Intelligence (associated lab: CS386)

2010/07/12. Content. Fuzzy? Oxford Dictionary: blurred, indistinct, confused, imprecisely defined

Fuzzy control systems. Miklós Gerzson

Where are we? Operations on fuzzy sets (cont.) Fuzzy Logic. Motivation. Crisp and fuzzy sets. Examples

SOFT COMPUTING (PECS 3401)-FUZZY LOGIC

Chapter 13 Uncertainty

ME 534. Mechanical Engineering University of Gaziantep. Dr. A. Tolga Bozdana Assistant Professor

Islamic University of Gaza Electrical Engineering Department EELE 6306 Fuzzy Logic Control System Med term Exam October 30, 2011

Rule-Based Fuzzy Model

So, we can say that fuzzy proposition is a statement p which acquires a fuzzy truth value T(p) ranges from(0 to1).

OUTLINE. Introduction History and basic concepts. Fuzzy sets and fuzzy logic. Fuzzy clustering. Fuzzy inference. Fuzzy systems. Application examples

Models for Inexact Reasoning. Fuzzy Logic Lesson 8 Fuzzy Controllers. Master in Computational Logic Department of Artificial Intelligence

Reasoning in Uncertain Situations

Lecture 1: Introduction & Fuzzy Control I

Applied Logic. Lecture 3 part 1 - Fuzzy logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw

This time: Fuzzy Logic and Fuzzy Inference

Fuzzy Logic and Computing with Words. Ning Xiong. School of Innovation, Design, and Engineering Mälardalen University. Motivations

This time: Fuzzy Logic and Fuzzy Inference

Fuzzy Sets and Systems. Lecture 4 (Fuzzy Logic) Bu- Ali Sina University Computer Engineering Dep. Spring 2010

Fuzzy Expert Systems Lecture 6 (Fuzzy Logic )

Outline. Introduction, or what is fuzzy thinking? Fuzzy sets Linguistic variables and hedges Operations of fuzzy sets Fuzzy rules Summary.

Revision: Fuzzy logic

Fuzzy expert systems

Fuzzy Sets and Fuzzy Techniques. Joakim Lindblad. Outline. Constructing. Characterizing. Techniques. Joakim Lindblad. Outline. Constructing.

EEE 8005 Student Directed Learning (SDL) Industrial Automation Fuzzy Logic

Hamidreza Rashidy Kanan. Electrical Engineering Department, Bu-Ali Sina University

cse 311: foundations of computing Fall 2015 Lecture 6: Predicate Logic, Logical Inference

Fuzzy Logic. By Clifton F. Cobb

Fuzzy Logic. An introduction. Universitat Politécnica de Catalunya. Departament de Teoria del Senyal i Comunicacions.

Review. Propositions, propositional operators, truth tables. Logical Equivalences. Tautologies & contradictions

CS344: Introduction to Artificial Intelligence. Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 10 Club and Circuit

Financial Informatics IX: Fuzzy Sets

CHAPTER V TYPE 2 FUZZY LOGIC CONTROLLERS

1. Brief History of Intelligent Control Systems Design Technology

Uncertain System Control: An Engineering Approach

Introduction to fuzzy logic

Intelligent Systems and Control Prof. Laxmidhar Behera Indian Institute of Technology, Kanpur

Towards Smooth Monotonicity in Fuzzy Inference System based on Gradual Generalized Modus Ponens

MODELLING OF TOOL LIFE, TORQUE AND THRUST FORCE IN DRILLING: A NEURO-FUZZY APPROACH

A Hybrid Approach For Air Conditioning Control System With Fuzzy Logic Controller

Fuzzy Sets, Fuzzy Logic, and Fuzzy Systems II

Section 2.2 Set Operations. Propositional calculus and set theory are both instances of an algebraic system called a. Boolean Algebra.

Financial Informatics XI: Fuzzy Rule-based Systems

Computational Intelligence Lecture 13:Fuzzy Logic

Introduction to fuzzy sets

Fuzzy Logic Notes. Course: Khurshid Ahmad 2010 Typset: Cathal Ormond

What is Fuzzy Logic? Fuzzy logic is a tool for embedding human knowledge (experience, expertise, heuristics) Fuzzy Logic

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH SPRING

CS 354R: Computer Game Technology

n Empty Set:, or { }, subset of all sets n Cardinality: V = {a, e, i, o, u}, so V = 5 n Subset: A B, all elements in A are in B

5. Lecture Fuzzy Systems

What is fuzzy? A dictionary definition. And so what is a Fuzzy Set? events. a not clear Set? 1. Of or resembling fuzz.

Motivation. From Propositions To Fuzzy Logic and Rules. Propositional Logic What is a proposition anyway? Outline

Adam Blank Spring 2017 CSE 311. Foundations of Computing I

Seminar Introduction to Fuzzy Logic I

Fuzzy Rules and Fuzzy Reasoning (chapter 3)

Packet #2: Set Theory & Predicate Calculus. Applied Discrete Mathematics

Computational Intelligence Lecture 6:Fuzzy Rule Base and Fuzzy Inference Engine

Today s s lecture. Lecture 16: Uncertainty - 6. Dempster-Shafer Theory. Alternative Models of Dealing with Uncertainty Information/Evidence

A Zadeh-Norm Fuzzy Description Logic for Handling Uncertainty: Reasoning Algorithms and the Reasoning System

Predicate Logic. Andreas Klappenecker

The Problem. Sustainability is an abstract concept that cannot be directly measured.

Handling Uncertainty using FUZZY LOGIC

Logic and Proofs. (A brief summary)

Fundamentals. 2.1 Fuzzy logic theory

MATH 2001 MIDTERM EXAM 1 SOLUTION

With Question/Answer Animations. Chapter 2

Fuzzy and Rough Sets Part I

3. Lecture Fuzzy Systems

System Performance Ratings of High Speed Nano Devices Using Fuzzy Logic

Using Lyapunov Theory I

Unit I LOGIC AND PROOFS. B. Thilaka Applied Mathematics

CSE 311: Foundations of Computing. Lecture 6: More Predicate Logic

Efficient Approximate Reasoning with Positive and Negative Information

RULE-BASED FUZZY EXPERT SYSTEMS

OPTIMAL CAPACITOR PLACEMENT USING FUZZY LOGIC

Lecture Notes On- K. Sridhar Patnaik(Lecturer) & Rashmi Sahay (Lecturer) Computer Sc. Dept. Birla Institute of Technology, Mesra

Classical Set Theory. Outline. Classical Set Theory. 4. Linguistic model, approximate reasoning. 1. Fuzzy sets and set-theoretic operations.

Language of Propositional Logic

Propositional Logic Arguments (5A) Young W. Lim 10/11/16

EECS 1028 M: Discrete Mathematics for Engineers

UNIVERSITY OF SURREY

Propositional Logic Arguments (5A) Young W. Lim 11/30/16

Application of Fuzzy Logic and Uncertainties Measurement in Environmental Information Systems

CSCE 222 Discrete Structures for Computing. Review for Exam 1. Dr. Hyunyoung Lee !!!

AI Programming CS S-09 Knowledge Representation

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

COMP219: Artificial Intelligence. Lecture 19: Logic for KR

An Integrated Approach for Process Control Valves Diagnosis Using Fuzzy Logic

n logical not (negation) n logical or (disjunction) n logical and (conjunction) n logical exclusive or n logical implication (conditional)

Knowledge based Agents

Fuzzy Controller. Fuzzy Inference System. Basic Components of Fuzzy Inference System. Rule based system: Contains a set of fuzzy rules

Sec$on Summary. Mathematical Proofs Forms of Theorems Trivial & Vacuous Proofs Direct Proofs Indirect Proofs

FUZZY LOGIC CONTROL Vs. CONVENTIONAL PID CONTROL OF AN INVERTED PENDULUM ROBOT

LECTURE NOTES DISCRETE MATHEMATICS. Eusebius Doedel

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING. MSc SYSTEMS ENGINEERING AND ENGINEERING MANAGEMENT SEMESTER 2 EXAMINATION 2015/2016

Fuzzy Logic and Fuzzy Systems Properties & Relationships

Propositional Logic: Models and Proofs

FS Part 1 : Uncertainty, Intervals and FS. André Bigand, LISIC, ULCO Université Lille-Nord de France Web:www-lisic.univ-littoral.

Transcription:

CS344: Introduction to Artificial Intelligence (associated lab: CS386) Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 2: Fuzzy Logic and Inferencing

Disciplines which form the core of AI- inner circle Fields which draw from these disciplines- outer circle. Robotics NLP Expert Systems Search, Reasoning, Learning Planning Computer Vision

Allied Disciplines Philosophy Maths Economics Psychology Brain Science Knowledge Rep., Logic, Foundation of AI (is AI possible?) Search, Analysis of search algos, logic Expert Systems, Decision Theory, Principles of Rational Behavior Behavioristic insights into AI programs Learning, Neural Nets Physics Computer Sc. & Engg. Systems for AI Learning, Information Theory & AI, Entropy, Robotics

Fuzzy Logic tries to capture the human ability of reasoning with imprecise information Models Human Reasoning Works with imprecise statements such as: In a process control situation, If the temperature is moderate and the pressure is high, then turn the knob slightly right The rules have Linguistic Variables, typically adjectives qualified by adverbs (adverbs are hedges).

Underlying Theory: Theory of Fuzzy Sets Intimate connection between logic and set theory. Given any set S and an element e, there is a very natural predicate, μ s (e) called as the belongingness predicate. The predicate is such that, μ s (e) = 1, iff e S = 0, otherwise For example, S = {1, 2, 3, 4}, μ s (1) = 1 and μ s (5) = 0 A predicate P(x) also defines a set naturally. S = {x P(x) is true} For example, even(x) defines S = {x x is even}

Fuzzy Set Theory (contd.) Fuzzy set theory starts by questioning the fundamental assumptions of set theory viz., the belongingness predicate, μ, value is 0 or 1. Instead in Fuzzy theory it is assumed that, μ s (e) = [0, 1] Fuzzy set theory is a generalization of classical set theory also called Crisp Set Theory. In real life belongingness is a fuzzy concept. Example: Let, T = set of tall people μ T (Ram) = 1.0 μ T (Shyam) = 0.2 Shyam belongs to T with degree 0.2.

Linguistic Variables Fuzzy sets are named by Linguistic Variables (typically adjectives). Underlying the LV is a numerical quantity E.g. For tall (LV), height is numerical quantity. Profile of a LV is the plot shown in the figure shown alongside. μ tall (h) 1 0 1 2 3 4 5 6 height h 4.5 0.4

Example Profiles μ rich (w) μ poor (w) wealth w wealth w

Example Profiles μ A (x) μ A (x) x Profile representing moderate (e.g. moderately rich) x Profile representing extreme

Concept of Hedge Hedge is an intensifier Example: LV = tall, LV 1 = very tall, LV 2 = somewhat tall 1 somewhat tall tall very operation: μ very tall (x) = μ 2 tall(x) μ tall (h) very tall somewhat operation: μ somewhat tall (x) = (μ tall (x)) 0 h

Representing sets 2 ways of representing sets By extension actual listing of elements A = {2, 4, 6, 8,...} By intension assertion of properties of elements belonging to the set A = {x x mod 2 = 0 }

Belongingness Predicate Let U = {1,2,3,4,5,6} Let A = {2,4,6} A = {0.0/1, 1.0/2, 0.0/3, 1.0/4, 0.0/5, 1.0/6} Every subset of U is a point in a 6 dimensional space

Representation of Fuzzy sets Let U = {x 1,x 2,..,x n } U = n The various sets composed of elements from U are presented as points on and inside the n-dimensional hypercube. The crisp sets are the corners of the hypercube. μ A (x 1 )=0.3 (0,1) (1,1) μ A (x 2 )=0.4 U={x 1,x 2 } x 2 (x 1,x 2 ) x 2 A(0.3,0.4) (0,0) (1,0) Φ x 1 x 1 A fuzzy set A is represented by a point in the n-dimensional space as the point {μ A (x 1 ), μ A (x 2 ), μ A (x n )}

Degree of fuzziness The centre of the hypercube is the most fuzzy set. Fuzziness decreases as one nears the corners Measure of fuzziness Called the entropy of a fuzzy set Fuzzy set Farthest corner E( S) d( S, nearest ) / d( S, farthest ) Entropy Nearest corner

(0,1) (1,1) x 2 A (0.5,0.5) d(a, nearest) (0,0) x 1 (1,0) d(a, farthest)

Definition Distance between two fuzzy sets n d( S, S2) s ( x ) 1 i s2 ( x 1 i i 1 ) L 1 - norm Let C = fuzzy set represented by the centre point d(c,nearest) = 0.5-1.0 + 0.5 0.0 = 1 = d(c,farthest) => E(C) = 1

Definition Cardinality of a fuzzy set n m( s) s ( x i ) [generalization of cardinality of i 1 classical sets] Union, Intersection, complementation, subset hood s s x) max[ s ( x), s ( x)] x U ( 1 2 1 2 s s x) min[ s ( x), s ( x)] x U ( 1 2 1 2 s c ( x) 1 ( x) s

Note on definition by extension and intension S 1 = {x i x i mod 2 = 0 } Intension S 2 = {0,2,4,6,8,10,..} extension How to define subset hood? Conceptual problem μ B (x) <= μ A (x) means B ε P(A), i.e., μ P(A) (B)=1; Goes against the grain of fuzzy logic

History of Fuzzy Logic Fuzzy logic was first developed by Lofti Zadeh in 1967 µ took values in [0,1] Subsethood was given as µb(x) <= µa(x) for all x This was questioned in 1970s leading to Lukasiewitz formula

Lukasiewitz formula for Fuzzy Implication t(p) = truth value of a proposition/predicate. In fuzzy logic t(p) = [0,1] t( P Q ) = min[1,1 -t(p)+t(q)] Lukasiewitz definition of implication

Fuzzy Inferencing Two methods of inferencing in classical logic Modus Ponens Given p and p q, infer q Modus Tolens Given ~q and p q, infer ~p How is fuzzy inferencing done?

Classical Modus Ponens in tems of truth values Given t(p)=1 and t(p q)=1, infer t(q)=1 In fuzzy logic, given t(p)>=a, 0<=a<=1 and t(p >q)=c, 0<=c<=1 What is t(q) How much of truth is transferred over the channel p q

Use Lukasiewitz definition t(p q) = min[1,1 -t(p)+t(q)] We have t(p->q)=c, i.e., min[1,1 -t(p)+t(q)]=c Case 1: c=1 gives 1 -t(p)+t(q)>=1, i.e., t(q)>=a Otherwise, 1 -t(p)+t(q)=c, i.e., t(q)>=c+a-1 Combining, t(q)=max(0,a+c-1) This is the amount of truth transferred over the channel p q

ANDING of Clauses on the LHS of implication t( P Q) min( t( P), t( Q)) Eg: If pressure is high then Volume is low t( high( pressure) low( volume)) Low Volume High Pressure Pressure/ Volume

Fuzzy Inferencing Core The Lukasiewitz rule t( P Q) = min[1,1 + t(p) t(q)] An example Controlling an inverted pendulum θ. d / dt = angular velocity Motor i=current

The goal: To keep the pendulum in vertical position (θ=0) in dynamic equilibrium. Whenever the pendulum departs from vertical, a torque is produced by sending a current i Controlling factors for appropriate current Angle θ, Angular velocity θ. Some intuitive rules If θ is +ve small and θ. is ve small then current is zero If θ is +ve small and θ. is +ve small then current is ve medium

Control Matrix θ. θ -ve med -ve small Zero +ve small +ve med -ve med -ve small +ve med +ve small Zero Region of interest Zero +ve small Zero -ve small +ve small Zero -ve small -ve med +ve med

Each cell is a rule of the form If θ is <> and θ. is <> then i is <> 4 Centre rules 1. if θ = = Zero and θ. = = Zero then i = Zero 2. if θ is +ve small and θ. = = Zero then i is ve small 3. if θ is ve small and θ. = = Zero then i is +ve small 4. if θ = = Zero and θ. is +ve small then i is ve small 5. if θ = = Zero and θ. is ve small then i is +ve small

Linguistic variables 1. Zero 2. +ve small 3. -ve small Profiles -ve small zero 1 +ve small -ε -ε ε ε 3 2 2 3 -ε +ε Quantity (θ, θ., i)

Inference procedure 1. Read actual numerical values of θ and θ. 2. Get the corresponding μ values μ Zero, μ (+ve small), μ (-ve small). This is called FUZZIFICATION 3. For different rules, get the fuzzy I-values from the R.H.S of the rules. 4. Collate by some method and get ONE current value. This is called DEFUZZIFICATION 5. Result is one numerical value of i.

Rules Involved if θ is Zero and dθ/dt is Zero then i is Zero if θ is Zero and dθ/dt is +ve small then i is ve small if θ is +ve small and dθ/dt is Zero then i is ve small if θ +ve small and dθ/dt is +ve small then i is -ve medium -ve small zero 1 +ve small -ε -ε ε ε 3 2 2 3 -ε +ε Quantity (θ, θ., i)

Fuzzification Suppose θ is 1 radian and dθ/dt is 1 rad/sec μ zero (θ =1)=0.8 (say) Μ +ve-small (θ =1)=0.4 (say) μ zero (dθ/dt =1)=0.3 (say) μ +ve-small (dθ/dt =1)=0.7 (say) -ve small zero 1 +ve small -ε -ε ε ε 3 2 2 3 -ε +ε 1rad 1 rad/sec Quantity (θ, θ., i)

Fuzzification Suppose θ is 1 radian and dθ/dt is 1 rad/sec μ zero (θ =1)=0.8 (say) μ +ve-small (θ =1)=0.4 (say) μ zero (dθ/dt =1)=0.3 (say) μ +ve-small (dθ/dt =1)=0.7 (say) if θ is Zero and dθ/dt is Zero then i is Zero min(0.8, 0.3)=0.3 hence μ zero (i)=0.3 if θ is Zero and dθ/dt is +ve small then i is ve small min(0.8, 0.7)=0.7 hence μ -ve-small (i)=0.7 if θ is +ve small and dθ/dt is Zero then i is ve small min(0.4, 0.3)=0.3 hence μ-ve-small(i)=0.3 if θ +ve small and dθ/dt is +ve small then i is -ve medium min(0.4, 0.7)=0.4 hence μ -ve-medium (i)=0.4

Finding i -ve medium -ve small zero 1 -ve small 0.7 0.4 -ε 3-4.1-2.5 -ε +ε 0.3 Possible candidates: i=0.5 and -0.5 from the zero profile and μ=0.3 i=-0.1 and -2.5 from the -ve-small profile and μ=0.3 i=-1.7 and -4.1 from the -ve-small profile and μ=0.3 -ε 2

Defuzzification: Finding i by the centroid method -ve medium -4.1 -ve small -2.5 Required i value Centroid of three trapezoids -ε +ε zero Possible candidates: i is the x-coord of the centroid of the areas given by the blue trapezium, the green trapeziums and the black trapezium