emu, computer engineering department 1999/2000 academic year, spring semester

107
EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER C M P E 586 Software Implementation of Fuzzy Systems PREPARED BY DR. KONSTANTIN DEGTIAREV FEBRUARY/JUNE 2000 Slides use the material of books and journal papers

Upload: marcy

Post on 14-Jan-2016

29 views

Category:

Documents


0 download

DESCRIPTION

EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER. C M P E 586 Software Implementation of Fuzzy Systems PREPARED BY DR. KONSTANTIN DEGTIAREV FEBRUARY/JUNE 2000 Slides use the material of books and journal papers. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

EMU, COMPUTER ENGINEERING DEPARTMENT

1999/2000 ACADEMIC YEAR, SPRING SEMESTER

C M P E 586Software Implementation of Fuzzy Systems

PREPARED BY DR. KONSTANTIN DEGTIAREVFEBRUARY/JUNE 2000Slides use the material of books and journal papers

Page 2: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

CMPE 586

Reference G.J.Klir, U.H.St.Clair, Bo Yuan. Fuzzy Set Theory. Foundations &

Applications, Prentice Hall PTR, 1997

B.Kosko. Fuzzy Engineering, Prentice Hall, 1997

T.J.Ross. Fuzzy Logic with Engineering Applications, McGraw-Hill, 1995

J.Yen, R.Langari. Fuzzy Logic. Intelligence, Control, and Information, Prentice Hall, 1999

L.-X.Wang. A Course in Fuzzy Systems and Control, Prentice Hall, 1997

W.Pedrycz (ed.). Fuzzy Modelling. Paradigms and Practice (Int. Series in Intelligent Technologies), Kluwer Academic Publ., 1996

J.Yen. Fuzzy Logic - A Modern Perspective // IEEE Transactions on Knowledge and Data Engineering, vol.11, #1, January/February 1999

L.A.Zadeh. The Birth and Evolution of Fuzzy Logic // Int. Journal on General Systems, vol.17, 1990, pp.95-105

Software Implementation of Fuzzy Systems

1

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 1

Page 3: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Section1 Outline

Introduction. Uncertainty, Imprecission and Vagueness Fuzzy Systems. Brief History of Fuzzy Logic. Foundation of

Fuzzy Theory. Fuzzy Sets and Systems. Fuzzy Systems in Commercial

Products Research fields in Fuzzy Theory

[ the discussion of these topics takes approximately 4 lecture hours. One example is explained (CubiCalc and fuzzyTECH software packages are used) ]

CMPE 586 Software Implementation of Fuzzy Systems

2

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 2

Page 4: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

CMPE 586

Most of the phenomena we encounter everyday are impreciseimprecise - the imprecision may be associated with their shapes, position, color, texture, semantics that describe what they are

Fuzziness primarily describes uncertaintyuncertainty (partial truth) and imprecisionimprecision

The key idea of fuzziness comes from the multivalued logicmultivalued logic: Everything is a matter of degree

Imprecision raises in several faces, e.g. as a semantic ambiguitysemantic ambiguity

Software Implementation of Fuzzy Systems

3

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 3

Page 5: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

By fuzzifying crisp datafuzzifying crisp data obtained from measurements, FL

enhances the robustness of a systemrobustness of a system Imprecision raises in several faces - for example, as

a semantic ambiguity

the statement “the soup is HOTthe soup is HOT” is ambiguous, but not fuzzy

e.g. [20º,80º]

CMPE 586 Software Implementation of Fuzzy Systems

The temperature of the soupHot

The amount of spices used

Definition of the domain

of discourse

Transaction to FuzzinessTransaction to Fuzziness

4

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 4

Page 6: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

The word “fuzzy”“fuzzy” can be defined as “imprecisely defined, confused, vague”

Humans represent and manage natural language terms (data) which are vaguevague. Almost all answers to questions raised in everyday life are within some proximity of the absolute truth

CMPE 586 Software Implementation of Fuzzy Systems

empty half-full full? almost full?

or half-empty? nearly full? ……

Does itremainempty?

5

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 5

Page 7: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Probability theoryProbability theory is one of the most traditional theories for representing uncertainty in mathematical models

Nature of uncertaintyNature of uncertainty in a problem is a point which should be clearly recognized by engineer - there is uncertainty that arises from chance, from imprecision, from a lack of knowledge, from vagueness, from randomness…

probability theory deals with the expectation of an expectation of an eventevent (future event, its outcome is not known yet), i.e. it is a theory of random events

CMPE 586 Software Implementation of Fuzzy Systems

6

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 6

Page 8: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

FuzzinessFuzziness deals with the impression of meaning of concepts expressed in natural language - it is not concerned with events at all

Fuzzy theory handles nonrandom uncertaintynonrandom uncertainty

CMPE 586 Software Implementation of Fuzzy Systems

Random

Uncertain Certain

Fuzzy, imprecise, vague

7

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 7

Page 9: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

As it is stated by L.Zadeh, “in many cases there is more to be gained from cooperation than from arguments over which methodology is best…”

Many situations cover both kinds of uncertainty:

assume the weather forecast - “tomorrow “tomorrow slight rains are highly probable”slight rains are highly probable”

CMPE 586 Software Implementation of Fuzzy Systems

slight rains highly probable

includes both fuzziness and randomness ambiguious ?

8

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 8

Page 10: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

The principle of incompatibilityprinciple of incompatibility (L.Zadeh, 1973):

“As the complexity of a system increases, our ability to make precise and yet significant statements about its behavior diminishes until a threshold is reached beyond which precision and significance (or relevance) become almost mutually exclusive characteristics”

CMPE 586 Software Implementation of Fuzzy Systems

Math. equations

Model-free methods

Fuzzy systems

Complexity of a system

9

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 9

Page 11: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Intimate connectionconnection between fuzziness and complexity (L.A.Zadeh)

a new approach to system analysisnew approach to system analysis: approximate and yet effective means of describing the behavior of systems which are too complex or too ill-defined to admit of precise mathematical analysis

CMPE 586 Software Implementation of Fuzzy Systems

Cost

Utility (usefulness)

imprecise precise

10

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 10

Page 12: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

A new approach to system analysisA new approach to system analysis: a departure from the conventional quantitative techniques of system analysis

A new paradigmA new paradigm: to develop approximate solutions that are both cost-effective and highly useful

a Fuzzy SystemFuzzy System (FS) is defined as a system with operating principles based on fuzzy information processing and decision making

There are several ways to represent knowledgerepresent knowledge, but the most commonly used has a form of rules:

IF (premise)A THEN (conclusion)B

CMPE 586 Software Implementation of Fuzzy Systems

11

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 11

Page 13: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

From a knowledge representation viewpoint, a fuzzy IF-THEN rule is a schemescheme for capturing knowledge that involves imprecision - if we know a premise (fact), then we can infer another fact (conclusion)

A fuzzy system (FS) is constructed from a collection of fuzzy IF-THEN rules

Acquisition of knowledgeAcquisition of knowledge captured in IF-THEN rules is NOT a trivial task (expert knowledge, systems measurements, etc.)

The building blocks for fuzzy IF-THEN fuzzy IF-THEN rulesrules are FUZZY SETSFUZZY SETS

CMPE 586 Software Implementation of Fuzzy Systems

12

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 12

Page 14: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

The rule

“IF the air is cool THEN set the motor speed to slow”

has a form:

IF x is A THEN y is B,

where fuzzy sets “cool”“cool” and “slow”“slow” are labeled by A and B, correspondingly

A and B characterize fuzzy propositionsfuzzy propositions about variables xx and yy

Most of the information involved in human communication uses natural language termsnatural language terms that are often vague, imprecise, ambiguous by their nature, and fuzzy setsfuzzy sets can serve as the mathematical foundation of natural language

CMPE 586 Software Implementation of Fuzzy Systems

13

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 13

Page 15: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

A Fuzzy SetFuzzy Set is a set with a smooth boundaries Fuzzy Set TheoryFuzzy Set Theory generalizes classical set theory

to allow partial membership Fuzzy Set AA is a universal set UU is determined by a

membership function AA(x)(x) that assigns to each element xU a number A(x) in the unit interval [0,1]

Universal set UU (Universe of Discourse) contains all possible elements of concern for a particular application

Fuzzy set has a one-to-one correspondenceone-to-one correspondence with its membership function

CMPE 586 Software Implementation of Fuzzy Systems

14

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 14

Page 16: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Fuzzy set AA is defined as

A = { (x, A(x)) }, xU, A(x)[0,1]

A(x) = Degree(xDegree(xA)A) is a grade of membership of element xU in set A

CMPE 586 Software Implementation of Fuzzy Systems

X1 X2 X3 . 0 1/2 1

.

. unit interval

xN

.

. U (universe of discourse)

15

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 15

Page 17: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

The membership functions themselves are NOT fuzzyNOT fuzzy - they are precise mathematical functions; once a fuzzy property is represented by a membership function, nothing is fuzzy nothing is fuzzy anymoreanymore

Suppose UU is the interval [0,85] representing the age of age of ordinary human beingsordinary human beings, and the linguistic term “young”“young” as a function of age (value of the variable age) can be defined as

[see the graphical representation on the next slide]

[ !! pay attention to the usage of the symbol “ / “ ]

CMPE 586 Software Implementation of Fuzzy Systems

16

x5

25-x1 x

1 young"" A

-185

25

225

0

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 16

Page 18: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

If U is a set of integersset of integers from 1 to 10 ( U={1,2,…,10} ), then “small” is a fuzzy subset of U, and it can be defined using enumeration (summation notation):

A = “small” = 1/1+1/2+0.85/3+0.75/4+0.5/5+0.3/6+0.1/7

CMPE 586 Software Implementation of Fuzzy Systems

1

25

0 U (universe of discourse) 85

31

0.41

A

(x) Universe of discourse U is

continuos

17

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 17

Page 19: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

In the previous example elements of U (universal universal setset) with zero membership degrees are not included into enumeration

A notion of a fuzzy set provides a convenient way of defining abstractiondefining abstraction - a process which plays a basic role in human thinking and communication

All theories that use the basic concept of fuzzy set can be called in a whole Fuzzy TheoryFuzzy Theory

Rough classification of Fuzzy Theory can be depicted as follows [note that dependencies between

the branches are not shown] :

CMPE 586 Software Implementation of Fuzzy Systems

18

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 18

Page 20: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

CMPE 586 Software Implementation of Fuzzy Systems

Fuzzy Theory

Fuzzy Fuzzy Uncertainty & Mathematics Decision-Making Information

Fuzzy Systems Fuzzy Logic & AI

19

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 19

Page 21: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

The idea of Fuzzy Sets appeared in 19641964 : L.A.Zadeh (Professor of the University of California at Berkeley): “We need a radically different kind of mathematics, the mathematics of fuzzy or cloudy quantities which are not described in terms of probability distributions…”

The paper “Fuzzy Sets” (Zadeh L.A., Information and Control, vol.8, pp.338-353, 1965) first used the word “fuzzy”“fuzzy” to mean “vague”“vague” in technical literature

criticized by academic community the idea caused a development of fuzzy set theory foundation (1965-19801965-1980)

academic research work stimulates first industrial applications of fuzzy systems (1977-19901977-1990) - cement kiln controller (Denmark), train control system (Sendai subway, Japan), digital and analog fuzzy chips (USA, Japan)

CMPE 586 Software Implementation of Fuzzy Systems

20

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 20

Page 22: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Currently, the application fields of fuzzy systems cover signal processing, communications, expert systems, medicine, business/finance, control (industrial processes and consumer electronics), …

widening of collaboration between universities and industry, “fuzzy boom” (1987-present1987-present): Japan Europe USA

19921992: 1st IEEE International Conference on Fuzzy Systems appearance of software companies (INFORMINFORM, AptronixAptronix,etc.) Fuzzy Logic ToolboxFuzzy Logic Toolbox for MATLAB was released in 1994 Courses on fuzzy sets and systems in Universities curricula

“Engineering consists largely of recommending decisions based on insufficient information.... It is essential that these students be exposed to ways of treating uncertainty and vagueness. This also requires that existing faculty utilize these methods…” (Colin Brown, conference of NAFIPS)

CMPE 586 Software Implementation of Fuzzy Systems

21

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 21

Page 23: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Appearance of the new computational paradigmsnew computational paradigms and intensification of research in certain areas (genetic algorithms/evolutionary strategies, neural networks)

L.A.Zadeh introduced a term soft computing (19921992)

------------ EXAMPLE 1 -------------

Fuzzy Toolbox Demo (MATLAB)by Dr.R.Babuška (Delft University of Technology, The Netherlands)

If-Then Rules. Fuzzy reasoning (example) Word 97 document (preliminary explanations)

* * * * * end of the Section 1 * * * * *

CMPE 586 Software Implementation of Fuzzy Systems

22

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 22

Page 24: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

CMPE 586 Software Implementation of Fuzzy Systems

Section 2 Outline

Mathematical Background of Fuzzy Systems. Classical (crisp) vs. Fuzzy Sets. Representation of Fuzzy Sets

Types of Membership Functions. Basic concepts (support, singleton, height, -cut, convexity). Fuzzy Set Operations

S- and T-norms. Properties of Fuzzy Sets. Sets as points in Hypercubes. Cartesian Product. Crisp and Fuzzy Relations

Linguistic variables and hedges. Membership function design (shape analysis)

[ the discussion of these topics takes approximately 10 lecture hours. Examples are explained using CubiCalc, fuzzyTECH and FL Toolbox packages]

23

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 23

Page 25: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Fuzzy SystemsFuzzy Systems F: n p use m rules to map vector input x to vector or scalar outputs F(x)

Fuzzy (Rule-based) Systems make use of linguistic linguistic variablesvariables in their antecedents and consequents

Linguistic variables can be naturally represented by fuzzy fuzzy setssets and logical connectives of these sets

CMPE 586 Software Implementation of Fuzzy Systems

Function f : X Y

input X

24

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 24

Page 26: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

A classical (crisp) set A in the universe of discourse U can be defined in three ways:

- by enumerating (listing) elements (often called listlist or extensionalextensional definition)

- by specifying the common properties of elements (intensionalintensional or rule rule definition)

the notation A = {x | P(x)} means that set A is composed of elements x such that every x has the property P(x)

- by introducing a zero-one membership function (characteristiccharacteristic or indicator indicator definition)

CMPE 586 Software Implementation of Fuzzy Systems

3 by divisiblenot is x and U,x if 0,

3 by divisible is x and U,x if , 1 (x)m )x(

3} by divisible is x | U{x A numbers), integer of(set U

AA

25

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 25

Page 27: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Crisp set is a set with precise boundary, and classical set theory is founded on the idea that we can make crisp, exact distinctions between two groups, i.e. between those individuals (elements) that are definitely in the result set (group 1), and those that are definitely outside it (group 2)

The basic operations on classical sets (A and B are crisp sets in the universe of discourse U):

complementcomplement divides the universal set U into 2 (two) parts

CMPE 586 Software Implementation of Fuzzy Systems

A\U AB}; x andA x | {x B\ A B-A

A}x and Ux | {x A A

B}x orA x | {x BA

B}x andA x | {x BA

C

C

26

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 26

Page 28: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Fundamental propertiesFundamental properties of the basic operations (these properties are also encountered in propositional logic):

CMPE 586 Software Implementation of Fuzzy Systems

A B)(A A A, B)(A A: absorption of Laws

set empty A A:ioncontradict ofLaw

U A A:middle excluded of Law

BA BA ,BA BA : laws sMorgan' De

U set empty set, empty U

n)(involutio A A : ationcomplement double

C)(AB)(A C)(B A

C)(AB)(A C)(B A: vitydistributi

CB)(A C)(B A

CB)(A C)(B A: ityassociativ

AA A A,A A: tautology) or cy(idempoten

AB B AA,B B A:itycommutativ

27

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 27

Page 29: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Fundamental properties satisfy to a principle of dualityprinciple of duality: replacing of empty set, U, , with U, empty set, , , respectively, brings again valid property

The notion of membership in fuzzy sets becomes a matter of degree (number in the closed interval [0,1])

Membership of an element from the universe in fuzzy set is measured by a function that attempts to describe vagueness and ambiguity

CMPE 586 Software Implementation of Fuzzy Systems

crisp (classical) set A A = set of TALL people fuzzy set A

1.0 1.0

0.65

0.0 0.0

1.75m height 1.75m

28

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 28

Page 30: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Membership functions can be represented (a) graphically, (b) in a tabular or list form, (c ) analytically and (d) geometrically (as a points in the unit cube)

Geometrical representation for two-element universal set U = ({x1,x2}) has a following vizualization:

CMPE 586 Software Implementation of Fuzzy Systems

membership values

1.0 (0,1) (1,1)

2

1

0.0 U (0,0)

x1 x2 1 (1,0)

graphical (standard) set of maximum “fuzziness” representation form

29

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 29

Page 31: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

[see the previous figure] Vertices (0,0), (0,1), (1,0) and (1,1) represent all crisp sets that can be defined for the universal set U, e.g. the point (1,0) corresponds to the crisp set {x1} (element x2 has no membership)

Membership functions can be symmetrical or asymmetrical, and the most commonly used forms are triangulartriangular, trapezoidaltrapezoidal, GaussianGaussian and bellbell (the first two dominate in applications due to simplicity and computational efficiency)

Membership functions are typically defined on one-dimensional universes, and in most cases, the membership function appears in the continuos formcontinuos form

Fuzzy Toolbox Demo (MATLAB)by Dr.R.Babuška (Delft University of Technology)

FuzzyTECH and CubiCalc (explanations)

CMPE 586 Software Implementation of Fuzzy Systems

30

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 30

Page 32: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

The height of a fuzzy set Aheight of a fuzzy set A is the highest (maximum) value of its membership function, i.e. height(A) =

If a fuzzy set has a height 1, then it is called a normal fuzzy normal fuzzy setset; in contrast, if height(A) < 1, the fuzzy set is said to be subnormalsubnormal

A subnormal set is a fuzzy set that contains only elements with partial (<1) membership

In most of applications fuzzy sets are normal, and during the reasoning process usually subnormal fuzzy sets are generated

A set of all elements of the universal set U whose degree of membership in a fuzzy set A is nonzero is called the support support of a fuzzy set Aof a fuzzy set A, i.e. supp(A) =

CMPE 586 Software Implementation of Fuzzy Systems

)x( max iAxi

})x( | Ux{ A 0

31

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 31

Page 33: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

A set of all elements x of the universal set U with a property A(x) = 1 (A is a fuzzy set) is called the core of a fuzzy set Acore of a fuzzy set A (core(A))

CMPE 586 Software Implementation of Fuzzy Systems

1

0

a b U = [a,b]

core(A)

supp(A)

height(A) = 1 (normal fuzzy set)

Membershipfunction has a

trapezoidal form

32

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 32

Page 34: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

A fuzzy set whose support is a single point in the universe of discourse U is called a fuzzy singletonfuzzy singleton

Each fuzzy set A is associated with a family of crisp subsetsfamily of crisp subsets of A - their elements have such membership degrees that they are restricted to a crisp subset of [0,1]

A crisp set A that contains those xU for which is called an -cut-cut of a fuzzy set Aof a fuzzy set A

The general property of -cuts: for any fuzzy set A and two values 1, 2 [0,1] that satisfy to the condition 1< 2 the following is true:

CMPE 586 Software Implementation of Fuzzy Systems

)x(A

121221

2

A A A A A A

result a as and , A A

1

33

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 33

Page 35: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

CMPE 586 Software Implementation of Fuzzy Systems

Membership degree

1

2

1

0 U =[a,b] a b

A

1 U

A

2 U

Fuzzy sets may be completely characterized by their -cuts: (decomposition theorem of fuzzy sets)

Example (Lecture hours)34

[0,1]

A A

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 34

Page 36: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Consider a fuzzy set A which is represented analytically in the universe of discourse U = [5,15] as follows:

CMPE 586 Software Implementation of Fuzzy Systems

otherwise , 0

14 x 6 if , 4 / ) |10-x| ( - 1 )x(A

10.9

0.7

0.5

0.3

0.1

0 5 10 15

Triangularmembership function

0.3-cut (crisp set)

set 0.7-cut

Ex

amp

le

35

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 35

Page 37: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

step 1: Several particular values of are chosen from the unit interval [0,1] - they are 0.1, 0.3, 0.5, 0.7 and 0.9

step 2: converting each of the -cuts A to fuzzy sets for each xU using the formula:

(fuz_set) = A(x)

CMPE 586 Software Implementation of Fuzzy Systems

36

Ex

amp

le 10.9

0.7

0.5

0.3

0.1

0 5 10 15

Sometimes the theorem is referred as resolution principle (approximate

representation of membership function):

Sometimes the theorem is referred as resolution principle (approximate

representation of membership function):

Ux

)],x([ (x)AA

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 36

Page 38: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Fuzzy set A is convexconvex if for any elements x1, x2 and x3 from the universal set U, the relation x1< x2< x3 implies that

General property: the intersection of two convex sets produces a convex set

Convexity and -cuts:

CMPE 586 Software Implementation of Fuzzy Systems

37

] )x( ),x(min[ )x( AAA 312

1 1

a0

universe of discourse U = [0,a]

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 37

Page 39: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Generalization of set operations to fuzzy sets is not obvious Operations on fuzzy sets are crucial to the fuzzy inference

process In the rule IF (A or B) THEN C the true value of C is

the true value of the disjunction (operation or) Assume two fuzzy sets A and B are defined on the universe

of discourse U - three basic operations can be represented as follows:

Fuzzy set A is equal toequal to fuzzy set B if and only if A(x) = B(x), xU

CMPE 586 Software Implementation of Fuzzy Systems

38

)complement fuzzy (standard )x( - 1 )x( (3)

on)intersecti fuzzy (standard ])x( ),x([ min )x( (2)

union) fuzzy (standard ])x( ),x([ max )x( )(

AA

BABA

BABA

1

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 38

Page 40: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

CMPE 586 Software Implementation of Fuzzy Systems

39

1

0 A(x)

universe of discourse U B(x)

AB

(x)

AB

(x)

Fuzzy sets overlap with their complementsoverlap with their complements (an element may partially belong to both fuzzy set and set’s complement) In contrast, classical (crisp) sets never overlap with their complements

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 39

Page 41: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Two fundamental laws of Classical Set theory - law of Excluded Middle and law of Contradiction

are violated in Fuzzy Set Theory (!!) Standard fuzzy operations are quite adequate in many

practical applications of FS, but they do not utilize the real expressive power of fuzzy sets (what are the other possibilities that may satisfy the requirements of practice? )

In practice, algebraic sumalgebraic sum (1’) and algebraic productalgebraic product (2’) are used for a definition of union and intersection of two fuzzy sets, respectively:

CMPE 586 Software Implementation of Fuzzy Systems

40

)x((x) )x( )'(

)x((x) - )x()x( )x( )'(

BABA

BABABA

2

1

U AA AA

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 40

Page 42: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

General notation:

Operator s is called an s-norms-norm if it satisfies to the following axioms for any x, y, z and w [0,1]:

Some of the operators (s-normss-norms) that “model” (i.e. extend) fuzzy union:

operator) nconjunctio (fuzzy )]x( ),x([t )x(

operator) ndisjunctio (fuzzy )]x( (x),[ s )x(

BABA

BABA

CMPE 586 Software Implementation of Fuzzy Systems

41

vity)(associati z] y],s[x,s[ ]z]s[y, s[x, [Ax.4]

vity)(commutati x]s[y, y]s[x, [Ax.3]

ity)(monotonic w yand z x if w]s[z, y]s[x, [Ax.2]

identity)-(zero x s[x,0] x]s[0, 1, s[1,1] [Ax.1]

see the next slide...

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 41

Page 43: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

(S1) Drastic sum:

(S2) Hamacher sum:

(S3) Dubois-Prade class:

(S4) Yager class:

Note:Note: for arbitrary fuzzy sets A and B membership values x and y stand for A(x) and B(x), correspondingly

CMPE 586 Software Implementation of Fuzzy Systems

42

0 yand 0 x if 1,

0 y)min(x, if y),max(x, ]y,x[sD

yx - 1

y2x - y x y]s[x,

[0,1]

, y)- 1 x, - 1 ,max(

y)x, ,-min(1 - yx - y x ]y,x[s

[[0, ,) y (x 1,min ]y,x[s1

Continuation: t-norms (triangular norms)Continuation: t-norms (triangular norms)

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 42

Page 44: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Operator t is called an t-normt-norm (triangular norm) if it satisfies to the following axioms for any x, y, z and w [0,1]:

Some of the operators (t-normst-norms) that “model” (extend) fuzzy intersection:

(T1) Drastic product:

(T2) Hamacher product:

CMPE 586 Software Implementation of Fuzzy Systems

43

vity)(associati z] y],t[x,t[ ]z]t[y, t[x, [Ax.4]

vity)(commutati x]t[y, y]t[x, [Ax.3]

ity)(monotonic w yand z x if w]t[z, y]t[x, [Ax.2]

identity)-(one x t[x,1] x]t[1, 0, t[0,0] [Ax.1]

1 yand 1 x if 0,

1 y)max(x, if y),min(x, ]y,x[tD

yx - y x

yx y]t[x,

More still to come...More still to come...

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 43

Page 45: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

(T3) Dubois-Prade class:

(T4) Yager class:

Self-studying exercise:Self-studying exercise: Prove that the Yager t-norm (class T4) converges to the min operator when the parameter is in the infinite limit :

An important properties of s-norms and t-norms can be summarized as follows:

CMPE 586 Software Implementation of Fuzzy Systems

44

[0,1] , y)x, ,max(

yx ]y,x[t

[[0,

, y)- (1 x)- (1 1,min - 1 ]y,x[t1

)]x( ),x(min[ (i.e. y]min[x, ]y,x[t lim BA

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 44

Page 46: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

s-norms are bounded below by maxmax (standard fuzzy union) and bounded above by drastic sumdrastic sum (S1):

t-norms are bounded below by drastic productdrastic product (T1) and bounded above by minmin (standard fuzzy intersection):

s-norms (a set of fuzzy disjunction operators) are often called triangular conormstriangular conorms or shortly, t-conormst-conorms

The alternative forms of operators AND and OR are called compensatory operators (they compensate the

strictness of min and max operators proposed by L.A.Zadeh)

CMPE 586 Software Implementation of Fuzzy Systems

45

])x( ),x([ s ])x( ),x([ s ])x( ),x([ max BAD

BABA

])x( ),x([ min ])x( ),x([ t ])x( ),x([ t BABABAD

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 45

Page 47: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Operator c is called a fuzzy complementfuzzy complement if it satisfies to the following axioms for any x and y [0,1]:

Some of the operators that “model” (extend) fuzzy complement:

(C1) Sugeno’s complement:

(C2) Yager’s complement:

Demonstration (MATLAB environment)

CMPE 586 Software Implementation of Fuzzy Systems

46

n)(involutio x ]c[x]c[ [Ax.3]

ity)(monotonic y x if c[y] c[x] [Ax.2]

(boundary) 0 c[1] and 1 c[0] 1].Ax[

[ 1,( , x 1

x - 1 ]x[c

[ (0, ,)x - (1 ]x[c

1

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 46

Page 48: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Main types of membership functions (MF):

(a) Triangular MF is specified by 3 parameters {a,b,c}:

(b) Trapezoidal MF is specified by 4 parameters {a,b,c,d}:

CMPE 586 Software Implementation of Fuzzy Systems

47

c x if 0,

c x b if b),-(cx)-(c

b x a if a),-(ba)-(x

a x if , 0

)c,b,a:x(trn

d x if 0,

d x c if c),-(dx)-(d

c x b if 1,

b x a if a),-(ba)-(x

a x if 0,

d)c,b,a, : x(trp

More to come...More to come...

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 47

Page 49: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

(c) Gaussian MF is specified by 2 parameters {a,}:

(d) Bell-shaped MF is specified by 3 parameters {a,b,}:

(e) Sigmoidal MF is specified by 2 parameters {a,b}:

CMPE 586 Software Implementation of Fuzzy Systems

48

2

2a) - (x-exp )a, : x(gsn

2b

a - x

1

1 )b,a, : x(bll

b)-a(x-e1

1 b)a, : x(sgm

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 48

Page 50: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

CMPE 586 Software Implementation of Fuzzy Systems

49

Imag

e f

orm

“N

eu

ro-F

uzz

y a

nd

Soft

C

om

pu

tin

g” (

J.-S

.R.J

an

g,

C.-

T.S

un

, E.M

izu

tan

an

i -

su

pp

lem

en

tary

slid

es

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 49

Page 51: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Assume X and Y are two arbitrary classical sets. The Cartesian product of sets X and Y is a set of all ordered pairs (xi,yj), xiX, yjY; that is

Suppose X = { x1, x2, x3, x4 }, Y = { y1, y2, y3 }; the set XxY consists of 12 ordered pairs (xi,yj), i=1,2,3,4, j=1,2,3 - in this case, a graphical representation (as nodes of a grid) is convenient…

Generalization of Cartesian product to n arbitrary classical sets X1, X2,…, Xn:

CMPE 586 Software Implementation of Fuzzy Systems

50

} m1, j ,n1, i ,Y y,Xx | )y,(x { YX jiji

} X x , ... ,X x ,X x | ) x , ... ,x ,x ( { X...XX nkn2

j21

i1

kn

j2

i1n21

nn2211 )card(X , ... , )card(X , )X(card

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 50

Page 52: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

CMPE 586 Software Implementation of Fuzzy Systems

Y

y3

y2

y1

x1 x2 x3 x4 X

12 pairs – elements ofthe set XxY

51

If the cardinality of the set X is n(X) and the cardinality of the

set Y is n(Y), then the cardinality of the Cartesian product (set of elements) is

n(XxY) = n(X)*n(Y) Y

y2

y1 X =[x1,x2], Y=[y1,y2]

x1 x2 X

Set XxY (Cartesianproduct)

See the previous slide...

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 51

Page 53: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Omitting superscripts, an ordered sequence of n elements (x1, x2, …, xn) is called an ordered n-tupleordered n-tuple

A subset of the Cartesian product is called an n-ary relationn-ary relation built over domains (sets) X1,X2,…, Xn - if n=2, the binary relation on X1 and X2 (from X1 to X2) can be formally defined as a set of ordered pairs in X1

xX2 ; that is

where P(x1,x2) is a property to which each pair (x1,x2) satisfies

Example Suppose that both X1 and X2 are sets of real numbers [5,20], i.e. X1 = X2 = [5,20].

The binary relation (X1,X2) «less than» has

CMPE 586 Software Implementation of Fuzzy Systems

52

22112121 X x ,X x ),x ,P(x | )x ,(x

n21 X ... XX

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 52

Page 54: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

the following formal analytical representation:

Graphical form of the binary relation :

A binary relation can be also represented by

CMPE 586 Software Implementation of Fuzzy Systems

53

X x ,X x ,x x | )x ,(x 22112121

20

X2

5

5 20 X1

Set is built on theCartesian product X1xX2

Points located onthe diagonal

(x1 = x2) of the

square do notbelong to the set.

The area is definedas follows

x1 5

x2 20x1 < x2

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 53

Page 55: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

means of membership functionmembership function:

(arbitrary n-ary relation is a mapping:

(X1,X2,…, Xn) : X1xX2

x …xXn {0,1} )

If a set X1xX2 is finite, then the values of function can be

collected into a relational matrixrelational matrix Relations are intimately involved in logic, approximate

reasoning, rule-based systems, etc. A rule «IF x is A THEN y is B» describes a relation between the

variables x and y - as implication A B, rule expresses a mapping (subset of Cartesian product) between input and output domains

CMPE 586 Software Implementation of Fuzzy Systems

54

)x ,...,x,(x if 0,

)x ,...,x,(x if , 1

n21

n21)X ..., ,X,(X n1 2

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 54

Page 56: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

A fuzzy relationfuzzy relation generalizes the concept of classical (crisp) relation introducing a degree of membership for each ordered n-tuple (x1, x2,…, xn) in

For 2D case it can be defined as follows:

Examples

a) x1 is close to x2 (both x1 and x2 are numbers)

b) if x1 is medium, then x2 is high (x1 is an observed state, whereas x2 is a result state or action)

c) x1 is similar to x2 (x1 and x2 can be objects, human beings, properties)

CMPE 586 Software Implementation of Fuzzy Systems

55

XX )x,(x | ) )x ,x( ),x,(x ( ~

212121~21

n21 X ... XX

relation fuzzy a denotes ~

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 55

Page 57: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Formally, fuzzy relation in can be defined as a fuzzy set

where is a mapping:

In different sources notations and can be used for crispcrisp and fuzzyfuzzy relations, correspondingly (if it is clear from the

contents which of two relations is used, sign ~ can be dropped)

means «membership degree of the ordered n-tuple in the fuzzy relation , where

», or «a degree to which fuzzy relation holds true for objects »

Example (Lecture hours)

CMPE 586 Software Implementation of Fuzzy Systems

56

X ...XX )x ..., ,x,(x | ))x..., ,x,x( ),x ..., ,x,((x ~

n21n21n21~n21

~ n21 X ... XX

~ [0,1] X ... XX n21

R R~

)x ..., ,x,x( n21~)X ..., ,X,X(

~n21

n1, i , X x ii ~)x, ... ,x,x( n21

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 56

Page 58: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Suppose that X1 and X2 are line segments [0,50] and [20,40], respectively, on the set of real numbers . A fuzzy relation «x1 is approximately equal to x2» may be defined by the membership function

CMPE 586 Software Implementation of Fuzzy Systems

57

2211)x(x-

)X,X(~ Xx ,Xx , e

221

21

)X,X(

~

~2111

Fuzzy relations enhance our capability to deal with

relational concepts expressed in a natural

language !

21 XX 2X

1X

Exa

mpl

e

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 57

Page 59: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

A fuzzy relation «x1 is much larger than x2» may be defined by the membership function

CMPE 586 Software Implementation of Fuzzy Systems

58

)x(x0.5- )X,X(~

21212 e1

1

Membership values; line segment [0,1]

Fuzzy relations are also fuzzy sets, and

fundamental properties of fuzzy sets hold for fuzzy relations as well

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 58

Page 60: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Fuzzy set operations (complements, unions, intersections) are applicable to fuzzy relationsfuzzy relations too

CMPE 586 Software Implementation of Fuzzy Systems

59

Sugeno’s complement

(parameter = 2)Standard

complement

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 59

Page 61: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Operations on fuzzy sets defined on different universal domains produce a multidimensional fuzzy set (the following shows graphically the result of operation )

CMPE 586 Software Implementation of Fuzzy Systems

60result of intersection AB

1

Cartesianproduct XxY

Domain X

Domain Y

Membership values

Fuzzy set A

Fuzzy set B

YX )BA(

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 60

Page 62: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

CMPE 586 Software Implementation of Fuzzy Systems

61

Example (Lecture hours)

(MATLAB 5.2 environment)

Contour plot

Fuzzy sets Ai and Bi have Gaussian and bell-shaped forms

IF x is Ai ...

THEN y is Bi

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 61

Page 63: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

A fuzzy rule is described formally by a fuzzy relationfuzzy relation between antecedent and consequent, and it defines a partition (fuzzy relation ) in the space (Cartesian product). The union of all partitions

forms a fuzzy graphfuzzy graph (term introduced by L.A.Zadeh) of a fuzzy model. The more partitions (patches) the more accurate description of the functional dependency Y=f(X), where f is a crisp function

Fuzzy system approximates a crisp function f by means of patches – the approximation is uniform, and it allows specification of error level (accuracy) in advance:

CMPE 586 Software Implementation of Fuzzy Systems

62

y)(x, B A R R in,1i

in1,i

i*

YXiR

set) (universal Xx , ε )x(F - )x(f *

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 62

Page 64: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

A patch covering leads to major serious problem of fuzzy systems: exponential explosion of rulesexponential explosion of rules (number of rules) as a result of increasing the number of input variables

Fuzzy Approximation Theorem (B.Kosko, L.A.Zadeh)

CMPE 586 Software Implementation of Fuzzy Systems

63

A function can be approximated to «any prescribed accuracy

provided that sufficient … fuzzy rules are

available» [S.Wu and M.J.Er]

References: 1. L.Wang. Fuzzy Systems are Universal Approximators // Proc. Int.Conf.Fuzzy Syst., 1992

2. B.Kosko. Fuzzy Systems as Universal Approximators // IEEE Transactions on Computers, vol.43, #11, 1994

Domain X

Crisp function f

Fuzzy graph R* (fuzzy relation)

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 63

Page 65: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

In a framework of fuzzy rules as conjunctions (IF x is Ai THEN y is Bi Ai Bi Ai Bi =

(functional relationshipfunctional relationship between input and output on a base of linguistic terms, i.e. Ai and Bi, i = 1,n)

(A) Mamdani implication: (correlation-minimum)

(B) Larsen implication: (correlation-product : dilution of membership values that are both small)

cases (A) and (B)

Compound fuzzy propositions (e.g. x1 is Ai1 and x2 is Ai2) are interpreted as fuzzy relations

CMPE 586 Software Implementation of Fuzzy Systems

64

]μ ,μ[ tii BA

])y(μ ),x(μ[ min )y,x(μiii BAR

)y(μ )x(μ )y,x(μiii BAR

Demonstration (MATLAB environment)

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 64

Page 66: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

(1) x1 is Ai1 and x2 is Ai2 : ,

where t : [0,1][0,1] [0,1] is a t-normt-norm

(2) x1 is Ai1 or x2 is Ai2 : ,

where s : [0,1][0,1] [0,1] is a s-norms-norm

As an implication, fuzzy rules “represents” human abilities of imprecise reasoning

Fuzzy rule is an implication between fuzzy propositions:

IF <fuzzy proposition>Ai THEN <fuzzy proposition>Bi (Ai Bi )

Fuzzy rule describes an entailmententailment of Bi by Ai (Ai entails Bi)

Fuzzy logic can be considered as a generalization of a classical binary and multivalued logic

CMPE 586 Software Implementation of Fuzzy Systems

65

])x(μ ),x(μ[ t )x,x(μ 2A1A21AA 2i

1i

2i

1i

])x(μ ),x(μ[ s )x,x(μ 2A1A21AA 2i

1i

2i

1i

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 65

Page 67: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

“The foundation of a fuzzy implication rule is the narrow sense of fuzzy logic”

In the classical propositional calculuspropositional calculus (algebra of propositions), implication PQ, where P and Q are two simple propositions, is logically equivalent (gives the same truth table values) to

(1) and

(2)

As Ai and (or) Bi have fuzzy predicates,the implication becomes a fuzzy implication

Two-valued logic:

CMPE 586 Software Implementation of Fuzzy Systems

66

P Q P Q

1 1 1

1 0 0

0 1 1

0 0 1

Q) or P(not QP

Pnot or Q) and (P P)QP(

calculus) onal(propositi PQ)(P QP

n)implicatio (material QP QP

forms (1) and (2)

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 66

Page 68: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

For the crisp propositions P and Q the implication PQ becomes global, i.e. the truth table covers all possible combinations of 0/1 values of P and Q)

Fuzzy implication can be considered as a local one, i.e. it gives a large truth value only when both and have large truth values

Having a rule IF x is Ai THEN y is Bi, we may propose a following interpretation:

IF x is Ai THEN y is Bi ELSE <nothing>

(each rule covers a local part of the whole “working space”) Implication as a conjunctionconjunction: Ai Bi Ai Bi

(Mamdani (min) and Larsen (product) [slide 64] implications are the most widely used in fuzzy systems and fuzzy control)

CMPE 586 Software Implementation of Fuzzy Systems

67

Q~

P~ P~ Q

~

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 67

Page 69: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Fuzzy rules can be considered as not being local as well, and this fact opens a way to classification of fuzzy rules as:

(A) fuzzy mapping rules (FMR)

(B) fuzzy implication rules (FIR)

Case (A): FMR describe a functional dependencyfunctional dependency between system’s inputs and outputs by means of linguistic terms (a totality of rules is represented by a fuzzy graph). A collection of fuzzy mapping rules are often called fuzzy model

Case (B): FIR describe an implication logic relationshipimplication logic relationship between two fuzzy propositions that use linguistic terms and hedges (generalization of two-valued logic)

CMPE 586 Software Implementation of Fuzzy Systems

68

Both types of rules:(1) are represented as a fuzzy relations between antecedent and

consequent parts(2) use compositional rule of inference as an inference engine

similarities

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 68

Page 70: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

!

A major stages in fuzzy modelingfuzzy modeling are as follows:

1. fuzzy partition

2. mapping of regions to local models

3. fusing of local models into a global model

4. defuzzification (quantitative summary of possibility distribution of model’s output)

The representatives of fuzzy implication familiesfuzzy implication families (FI) are shown on the next slide (form FI1’ is also refered in

the literature as Dienes-Rescher implication)

CMPE 586 Software Implementation of Fuzzy Systems

69

But…(1) the semantics of relations is different(2) different operators are used in compositional rule of inference(3) two types of rules behave the same in the case when

antecedent parts of rules are satisfied, but the behavior is different if antecedents are not satisfied…

differences

Fuzzy Rule-Based Modeling

Fuzzy Rule-Based Modeling

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 69

Page 71: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Selected fuzzy implication (FI) operators:

(FI1) Zadeh’s classical maximum FI:

(FI1’) Zadeh’s classical maximum FI:

(FI2) Lukasiewicz’ implication:

(FI3) Godelian FI:

(FI4) Standard sequence implication: (it is shown on the next slide…)

CMPE 586 Software Implementation of Fuzzy Systems

70

])x(μ - 1 ],)y(μ ),x(μ[ min[ max )y,x(μiiii ABAR

])y(μ ),x(μ - 1[ max )y,x(μiii BAR

] ])y(μ ))x(μ - (1[ 1,[ min )y,x(μiii BAR

)y(μ )x(μ if ),y(μ

)y(μ (x)μ if , 1 )y,x(μ

iii

iii BAB

BAR

equivalent to (FI1) when

)x(μ )y(μii AB

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 70

Page 72: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Standard sequence implication:

“… Although some have been more extensively used, there is no such thing as the fuzzy implication operator and any practical application should consider different alternatives, checking the effectiveness of each one” (A.Kandel, R.Pacheco, A.Martins, S.Khator. “The foundations of rule-based computations in fuzzy models” )

(fuzzy implication operators: (1) Zadeh’s, (2) Lukasiewicz’, (3) Godelian)PS. Godelian fuzzy implication is also referred in the literature

as Brouwerian implication )

CMPE 586 Software Implementation of Fuzzy Systems

71

)y(μ )x(μ if , 0

)y(μ )x(μ if , 1 )y,x(μ

ii

iii BA

BAR

Demonstration (MATLAB environment)

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 71

Page 73: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

The relationship between implications:

Two questions of interest:

(1) What are the criteria for choosing a combination of fuzzy operators , and in order to obtain a certain form of fuzzy implication? For example, Lukasiewicz implication (FI2) is a member of a family that generalizes a material implication of a classical logic: (disjunction ) Yager’s s-norm with equal to 1 and (complement ) standard complementation “1-…”

(2) For the fuzzy implication what we mean by “equivalence”“equivalence” to and ?

CMPE 586 Software Implementation of Fuzzy Systems

72

YX y)(x, all for - FI2] n,implicatio cz[Lukasiewi )y,x(μ

]FI1' n,implicatio Rescher-[Dienes )y,x(μ

FI1] n,implicatio [Zadeh )y,x(μ

i

i

i

R

R

R

Q~

P~ QP P)QP(

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 72

Page 74: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

When a fuzzy relation is NOT finite, and it is defined in n-dimensional space, we have to specify it analytically (through appropriate formula)

A fuzzy relation on a finite Cartesian product X1xX2 is usually

represented by a fuzzy relational matrixfuzzy relational matrix with elements taken from [0,1]

Example Assume X1 = { a1, a2, a3 }, X2 = { b1, b2, b3, b4 } are two sets of cities. The relational concept

«close» (distance expressed in Km) is represented by the (3,4)-matrix:

CMPE 586 Software Implementation of Fuzzy Systems

73

4321

3

2

1

bb b b

a

a

a

0.510.950.7

0.310.61

000.20.4

: R~

0.2 )b,a(close""

)b,a(

21

21R~

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 73

Page 75: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Two kinds of questions we can keep in mind:

a) what is the degreedegree that particular pair of cities are considered to be close to each other? (membership function of a fuzzy set)

b) what is a possibilitypossibility that a short distance (closeness to each other) corresponds to a specific pair of city ai ( ) and city bj ( )? (possibility distribution of a short distance (closeness))

Composition of relations

Composition of two crisp binary relations R1 and R2 requires their compatibilitycompatibility

CMPE 586 Software Implementation of Fuzzy Systems

74

1,3 i1,4 j

ZY R Y,X R 21 21 R R as denoted is

relations two of ncompositio the

Crisp case

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 74

Page 76: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Relation T=R1°R2 (composition of two crisp relationscomposition of two crisp relations) consists of those pairs (x,z) ,xX, zZ, of the Cartesian product XxZ that via the given relations R1 and R2 «share» at least one element yY

Example Assume that X = [20,40] , Y = [0,50] ,

Z = [10,40]; X,Y,Z (set of real numbers). Two crisp relations R1 XxY and R2 YxZ are defined (shown on the next slide), and it is required to find their composition:

- relation T(as a result of compositional operation) is a subsetof the Cartesian product XxZ

CMPE 586 Software Implementation of Fuzzy Systems

75

(see the next slide for the graphical representation)

[20,40] x x, z 10, z | z)(x, )z,x(T

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 75

Page 77: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

CMPE 586 Software Implementation of Fuzzy Systems

76

5 0

4 0

1 0

2 0 4 0 X 5 0 Y

z" to equal or greater is y" y"to equal is x"

ZY R relation crisp YX R relation crisp 21

line z=yCartesian product

XxY

relation R2 YxZ

Both relations are defined in two-dimensional Euclidean space

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 76

Page 78: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Two common forms of composition operationcomposition operation:

a) max-min composition

or in terms of 0/1 membership functions:

b) max-product (in general, max-star) composition

For example, max-product composition has a following form:

CMPE 586 Software Implementation of Fuzzy Systems

77

])z,y(R ),y,x(R[ min max )z,x)(R(R )z,x(T 21Yy

21

) ( )z,x( )z,y(R)y,x(RYy

T 21

])z,y(R)y,x(R[ max )z,x)(R(R )z,x(T 21Yy

21

) ( )z,x( )z,y(R)y,x(RYy

T 21

sign

denotes any t-norm

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 77

Page 79: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

It is stressed that “max-min method of composition effectively expresses the approximate and interpolative reasoning used by humans when they employ linguistic propositions for deductive reasoning” (T.Ross. “Fuzzy Logic with Engineering Applications”, McGraw-Hill, 1995; N.Vadiee. “Fuzzy rule based expert systems – I”, 1993)

A main goal of fuzzy logic is to form a foundation for reasoning (inference) with imprecise propositions; such reasoning is called approximate reasoning

Consider a given rule IF x is A THEN y is B, where A and B are fuzzy sets (fuzzy propositions, fuzzy predicates), and a

fact: x is A’ (A’ and A are not necessarily identical). The result produced by fuzzy inference engine:

y is B’ = A’R, where R is a fuzzy relation whichrepresents an implication (x is A) (y is B)

CMPE 586 Software Implementation of Fuzzy Systems

78

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 78

Page 80: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

An ordinary-language term represented by a fuzzy set is called linguistic valuelinguistic value

A linguistic variable can be considered as a composition of a symbolic variable and a numeric variable

Linguistic variable is a fundamental element in human knowledge representation

Transition from crisp mathematics to fuzzy mathematics by means of fuzzy set theory has allowed mathematical representations to become compatible with expressions in natural language

Linguistic hedgeshedges are special linguistic terms by which other (primary) linguistic terms are modified

Linguistic hedge (modifier) may be interpreted as an unary unary operator operator that modifies the meaning of a fuzzy set

CMPE 586 Software Implementation of Fuzzy Systems

79

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 79

Page 81: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Some of the most commonly used operators (hedgeshedges) and their functions are as follows:

CMPE 586 Software Implementation of Fuzzy Systems

80

G r o u p 1 ( c o n c e n t r a t i o n h e d g e s )

v e r y ( A ) = 2)x(A e x t r e m e l y ( A ) = 3)x(A

v e r y , v e r y ( A ) = 4)x(A p l u s ( A ) = 251 .)x(A G r o u p 2 ( d i l a t i o n o r d i l u t i o n h e d g e s )

m o r e o r l e s s ( A ) = s l i g h t l y ( A ) = n o t s o ( A ) = )x(A

m i n u s ( A ) = 750 .)x(A s o m e w h a t ( A ) = 30 .)x(A G r o u p 3 ( i n t e n s i f i c a t i o n h e d g e s )

r e a l l y ( A ) =

1.0 A(x) 0.5 A(x))- (12 - 1

0.5 A(x) 0 A(x)22

2

Be cautious when treating the meaning

of NOT…

Functions of hedgesFunctions of hedges

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 80

Page 82: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Brief comments on the previously mentioned functions:

(A) Concentration functionConcentration function: keeping the original shape (form) of a membership function, “shrink” it over the universe of discourse, and a level of concentration can be adjusted by changing a value of power (>1) applied to membership values)

(B) Dilution functionDilution function: opposite to concentration function – it results in “spreading” of membership function over universal set through changing a power (<1) of MF values

(C) Contrast intensificationContrast intensification: changes slightly a shape of membership function, “widening” MF for possibility values > 0.5 and “narrowing” it when the latter is 0.5

(D) NegationNegation (not mentioned above): “mirrors” imaging

of MF with respect to (x)=0.5

CMPE 586 Software Implementation of Fuzzy Systems

81

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 81

Page 83: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Example (Lecture hours)

CMPE 586 Software Implementation of Fuzzy Systems

82

Contrastintensification

Concentration & dilution

Negation

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 82

Page 84: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

A definition of linguistic variablelinguistic variable proposed by L.A.Zadeh (“The concept of a linguistic variable and its application to approximate reasoning I,II”, Information Sciences,8,pp.199-251,301-357) can be formulated as follows:

A linguistic variable is characterized by (a) its name N (b) a set L of linguistic values it can take (c) universal set U (physical domain) in which it is defined (d) a rule R that associates each linguistic value of L with a fuzzy set in U

Some observations on MF shape analysisMF shape analysis:

(1) The location and granularity (number) of MFs are the two relatively more important (from the standpointof affecting performance of the fuzzy inference

CMPE 586 Software Implementation of Fuzzy Systems

83

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 83

Page 85: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

algorithm) issues compared to the shape of each member- ship function

(2) The shape of MF characterizes uncertainty in the fuzzy variable – in general, a high level of detail in shape design is considered as a conceptual error

(3) Most of applications nowadays use simple convex membership functions (due to computational simplicity and relative easiness of implementation in hardware, the commonly practical are piece-wise-linearpiece-wise-linear forms, e.g. triangular and trapezoidal MFs)

(4) In most cases heights of membership functionsof antecedent variables are equal to 1.0 (normalnormalsetssets); if the heights of MFs in consequent part of the rules is less than 1.0, then it may cause …

CMPE 586 Software Implementation of Fuzzy Systems

84

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 84

Page 86: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

so-called paralysis of implication resultsparalysis of implication results:

CMPE 586 Software Implementation of Fuzzy Systems

85

1 0 input domain X output domain Y xa xb

Dead zone ]b,1]

Interval of paralysis

height < 1

(5) OverlappingOverlapping is an important design consideration: each antecedent MF should overlap only with imme- diate neighboring membership functions, i.e.

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 85

Page 87: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

formally it can be expressed as: . Overlap of MFs determines a degree of cooperationdegree of cooperation (or, switching degree) between corresponding rules

(6) Each consequent MF represents one rule; a heightheight of MF determines the strength of contribution from each rule, and MF’s locationMF’s location affects the actual decision value

(7) In general, shape modifications of antecedent MFantecedent MF (compared to those of consequent ones) produce more significant effects on the output behavior

(8) Adjustment (symmetric changes in overlap) of all consequent MFsconsequent MFs do not produce significant changes of output’s behavior

* * * * * end of the Section 2 * * * * *

CMPE 586 Software Implementation of Fuzzy Systems

86

1i ,i ,1ij , AA ji

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 86

Page 88: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Section 3 Outline

Basic Principles of Inference in Fuzzy Logic (Entailment, Conjunction, Generalized Modus Ponens, Generalized Modus Tollens). Fuzzy IF-THEN rules. Canonical form

Fuzzy Systems and Algorithms. Approximate Reasoning Fuzzy Inference Engines. Graphical Techniques of

Inference. Fuzzification/Defuzzification Fuzzy System Design and its Elements (conceptual model).

Design Options

[ the discussion of these topics takes approximately 810 lecture hours. Examples are explained using fuzzyTECH, FL Toolbox packages andMATLAB demonstrations]

CMPE 586 Software Implementation of Fuzzy Systems

87

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 87

Page 89: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

«Contrariwise» , continued Tweedledee, «if it was so, it might be; and if it were so, it would be; but as it isn’t , it ain’t. That’s logic»

(Lewis Carroll, Through the Looking Glass)

In the propositional logicpropositional logic the inference can be depicted as follows:

If the resulting premises are both true, then the conclusion is also true (the truth conclusion is inferred or deduced from truth premises – we call it a valid deductionvalid deduction). For example, the following form is invalid:

CMPE 586 Software Implementation of Fuzzy Systems

88

Q

P

QP

• P and Q are propositions (variables)• sign represents the relation “if-then”“if-then”• symbol (therefore) is placed before conclusion

Q

P

QP

premise 1: IF P THEN Qpremise 2: not P

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 88

Page 90: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Among basic inference rules (the premises logically imply rules’ conclusions) we can mention the following:

(a) Modus Ponens (b) Modus Tollens (Lat. “method of affirming”): (Lat. “method of denying”):

(c) Hypothetical Syllogism (many mathematical arguments contain a chain of if-thenif-then statements):

A test for validity of Modus Tollens is as follows:

CMPE 586 Software Implementation of Fuzzy Systems

89

P

Q

QP

Q

P

QP

SP SQ

QP

The implication connective () is especially important as a basis of fuzzy implication rules

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 89

Page 91: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

premises are conjuncted in the antecedent part of implication, and conclusion form its consequent part:

CMPE 586 Software Implementation of Fuzzy Systems

90

P)( )Q()QP(

 P

 Q

 PQ

 Q

 (PQ)(Q)

0 0 1 1 1

1 0 0 1 0

0 1 1 0 0

1 1 1 0 0

How validity is checked?

How validity is checked?

Fuzzy Logic (FL) generalizes the notion of

truth values in classical logic, and provides a background for reasoningreasoning (inferencing) when …

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 90

Page 92: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

corresponding conditions are only partially satisfied Approximate reasoningApproximate reasoning (original rule IF x is A THEN y is B):

1. Possibility distribution of the variable x2. Implication possibility from x to y

possibility distribution of y

Both fuzzy implicationfuzzy implication and fuzzy mapping rulesfuzzy mapping rules use a compositional rule of inference for calculation of output results, but there are still some differences…

If proposition P is described by set A X, and proposition Q is described by set B Y, then the classical implication PQ can be represented by the relation R as follows:

; its schematical representation (Venn diagram, Figure 1)

CMPE 586 Software Implementation of Fuzzy Systems

91

)YA()BA(R

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 91

Page 93: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

is as follows:

A rule IF x is A THEN y is B can be expressed as a compound conditional statement IF x is A THEN y is B ELSE y is Nothing (no action). In general,expression IF x is A THEN y is B ELSE y is C

CMPE 586 Software Implementation of Fuzzy Systems

92

Y Y C B B A universal set X A universal set X Figure 1 Figure 2

See comments related to Figure 2 below…

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 92

Page 94: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

can be expressed as a disjunction:

«IF x is A THEN y is B» «IF x is THEN y is C»

In the logic of compound statements this can be written as:

, where S is a proposition

described by set C Y (see Venn diagram, Figure 2)

Figure 1 (shaded area – truth domain of the implication PQ)

Figure 2 (shaded area – truth domain of the form , where )

Consider a given rule IF x is A THEN y is B, where A and B are fuzzy setsfuzzy sets (fuzzy propositions, fuzzy predicates) defined on universes X and Y, correspondingly,and a fact x is A’ (A’ and A are not necessarilyidentical)

CMPE 586 Software Implementation of Fuzzy Systems

93

)SP()QP(

A

)SP()QP( CB

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 93

Page 95: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Having a rule and a fact, what can we say about conclusion (consequent) B’ ?

Generalized Modus Ponens:

Rule (premise 1): x is A y is B

Fact (premise 2): x is A’

Infer (result produced by fuzzy inference enginefuzzy inference engine): y is B’

B’ = A’ R, where R is a fuzzy relationfuzzy relation (associations between the elements of two fuzzy sets) which represents an implication (x is A) (y is B)

Everyday (“reasonable”) intuitive criteria which relate Fact (premise 2) and the Conclusion (infer) can be summarized in the table form as follows:

CMPE 586 Software Implementation of Fuzzy Systems

94

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 94

Page 96: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

In approximate reasoning, Generalized Modus Ponens is an inference mechanisminference mechanism that allows to obtain imprecise conclusion from imprecise (vague) fact

Classical (fundamental) Modus Ponens: The reasoning process when a given implication PQ istrue, and proposition P has a true value leads to the

CMPE 586 Software Implementation of Fuzzy Systems

95

Criterion

Fact: x is A’

Infer: y is B’

Comments

criterion 1 x is A y is B Fundamental MP

criterion 2 x is very A y is B Consider A’ A

criterion 3 x is very A y is very B Extension of hedges to fundamental MP

criterion 4 x is more or less A y is B Closeness of A’ to A

criterion 5 x is more or less A y is more or less B Extension of hedges to fundamental MP

criterion 6 x is not A y is not B Think about ELSE y is not B part in the rule (premise 1)

criterion 7 x is not A y is unknown Rule does not say anything about mismatch case

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 95

Page 97: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

conclusion ( Q):

Compositional rule of inference (classicalcase):

CMPE 586 Software Implementation of Fuzzy Systems

96

10 10

00 proj

10

11

11

00 proj

Q)(PCylEx(P) proj )Q(tv

QQ

Q

repetition of all points x of P in the domain Q (variable y)

repetition of all points x of P in the domain Q (variable y)

101

110

10

P

Q

Implication PQ truth

table

{0,1} y

)y,x(R)y(tv )QP(PQ{0,1}x

P

relation R(x,y) relation R(x,y) max { min… } max { min… }

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 96

Page 98: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

The inference process based on Generalized Modus Ponens (GMP) can be implemented differently depending on the calculus used, i.e. the inference process is not unique

Compositional operators (the most commonly used in practice):

a) max-min compositional operator

b) max-product compositional operator

In general, GMP states that for the premise x is A’ and the fuzzy relation R(x,y) A B (the rule IF x is A THEN y is B), the inferred set B’ (conclusion y is B’) iscalculated as follows: (see the next slide)

CMPE 586 Software Implementation of Fuzzy Systems

97

))y,x(μ ),x(μ min( max)y(μ BAA'Xx

'B

))y,x(μ)x(μ max)y(μ BA'AXx

'B

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 97

Page 99: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

(see the previous slide)

where X is a domain of the variable x (antecedent domain), and the letter «t» denotes a t-norm. As a result, represents a possibility distribution over the domain of output variable

Similarly, Generalized Modus Tollens states the inferred set A’ (conclusion x is A’):

where Y is a domain of the variable y (B’Y, premise 2: y is B’) Important note: “Even though both fuzzy implications and fuzzy

mapping rules use the compositional rules of inference to compute their inference results, their usages differin two ways. First, the compositional rule of inference

CMPE 586 Software Implementation of Fuzzy Systems

98

]))y,x(μ ),x(μ[ t max)y(μ BAA'Xx

'B

]))y,x(μ ),y(μ[ t max)x(μ BAB'Yy

'A

)y(μ 'B

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 98

Page 100: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

is applied to a set of fuzzy mapping rules that approximate a functional mapping. Second, the fuzzy relation of a fuzzy mapping rule is a Cartesian product of the rule’s antecedent and its consequent part. An entry in the fuzzy implication relation, however, is the possibility that a particular input value implies a particular output value” (J.Yen, R.Langari. “Fuzzy Logic. Intelligence, Control, and Information”, Prentice Hall, 1999)

Consider a fuzzy rule base (totality of n rules) : IF x is Ai THEN y is Bi, where Ai X and Bi Y are fuzzy setsfuzzy sets; x and y are input and output variables, respectively (it can be expanded to multiple input/output case)

Composition Inference (CI):

a) calculation of Ri(x,y) (Ai Bi) for each i-th rule

b) calculation of a single relation defined on XxY as

b1) Mamdani combination:

CMPE 586 Software Implementation of Fuzzy Systems

99n

1iiM )y,x(R )y,x(R

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 99

Page 101: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

(constituent elements of fuzzy rule base are independent), or

b2) Gödel combination: (rules are dependent)

c) generation of a fuzzy output B’Y for a given input A’

Generalized Modus Ponens (GMPGMP), Mamdani combination:

One of the commonly used inference engines (algorithms) is a Product EngineProduct Engine which is based on:

a) Larsen’s implication (product operator)

CMPE 586 Software Implementation of Fuzzy Systems

100

)y,x(R )y,x(Rn

1iiG

)B(A , A't max μ ),x(μ t max)y(μn

1iii

Xx)y,x(RA'

Xx'B i

union of conjunctionsn

1iR )y,x(μ

i

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 100

Page 102: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

b) Composition Inference (CI) with Mamdani combination (s-norm: standard maximum)

c) t-norm: algebraic product, i.e. formally, Product EngineProduct Engine has the following representation:

(Generalized Modus Ponens)

Individual Rules Inference (IRI):

a) calculation of Ri(x,y) (Ai Bi) for each i-th rule

b) calculation of Bi’Y (fired THEN-part set) as a composition of input A’ and implication Ai Bi using GMP

c) generation of a fuzzy output B’Y as a combi-

CMPE 586 Software Implementation of Fuzzy Systems

101

)y(μ)x(μ max)y,x(μ

))y,x(μ)x(μ ( max)y(μ

iiM

M

BAy,x

R

RA'Xx

'B

Larsen implicationLarsen implication

standard maximumstandard maximum

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 101

Page 103: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

nation of separate Bi’ ,i.e

b1) Mamdani combination ,or

b2) Gödel combination

One of the commonly used inference engines (algorithms) is a Minimum EngineMinimum Engine which is based on:

a) Mamdani implication (minimum operator)b) Individual Rules Inference (IRI) with Mamdani combination (s-norm: standard maximum)

c) t-norm: standard minimum

CMPE 586 Software Implementation of Fuzzy Systems

102

)y(μ )y(μ

)y(μ )y(μ

n

1iB'B

n

1iB'B

'i

'i

Zadeh Engine Lukasiewicz Engine

a) Zadeh’s Implication a) Lukasiewicz Implication b) both Engines use Individual Rules Inference with Gödel combination c) both Engines use standard minimum as a t-norm

Zadeh Engine Lukasiewicz Engine

a) Zadeh’s Implication a) Lukasiewicz Implication b) both Engines use Individual Rules Inference with Gödel combination c) both Engines use standard minimum as a t-norm

Two other

Inference

Engines

Two other

Inference

Engines

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 102

Page 104: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

Schematically, CI and IRI can be represented as follows: • Composition Inference

• Individual Rules Inference

CMPE 586 Software Implementation of Fuzzy Systems

103

Rule 1 Implication 1 input A’ Rule 2 Implication 2 Combination Inference …….. (Aggregation) Rule Defuzzification (Composition) Rule n Implication n GMP

Rule 1 Implication 1 Composition Rule 2 Implication 2 Composition Combination …….. Composition (Aggregation) Defuzzification Rule n Implication n Composition input A’

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 103

Page 105: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

DefuzzificationDefuzzification is a process of conversion of fuzzy output (possibility distribution of the output) to precise (crisp) value

Among the major defuzzification techniques we can mention:

a) Mean of Maximum (Middle of Maxima) method (MoMMoM)

b) Centroid (Center of Area, Center of Gravity) method (CoACoA)

MoMMoM calculates the average of all variable values having maximum membership degree

CMPE 586 Software Implementation of Fuzzy Systems

104

1 y* - defuzzified output 0 a b output y y*

CoACoA calculates the weighted

average of the fuzzy output

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 104

Page 106: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

If the inferred fuzzy output is denoted as B’(y), then the CoACoA defuzzified output is calculated as follows:

Which of defuzzification methods is the best? One of criteria is plausibilityplausibility – to be plausible, y* should lie approximately in the middle of the support region of B’(y) and have a high degree of membership in B’(y) (see also C.Thomas, H.Hellendoorn. “Defuzzification in fuzzy controllers”, Intelligent and Fuzzy Systems, vol.1, pp.109-123,1993)

CMPE 586 Software Implementation of Fuzzy Systems

105

iiB'

iiiB'

*

YB'

YB'

*

domainoutput discrete - )y(y)y( y

domainoutput continuous - dy)y(ydy)y( y

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 105

Page 107: EMU, COMPUTER ENGINEERING DEPARTMENT 1999/2000 ACADEMIC YEAR, SPRING SEMESTER

CMPE 586 Software Implementation of Fuzzy Systems

Prepared Dr.Konstantin Degtiarev, February-June 2000 Slide 106

106

fuzzyTECH 5.31

CubiCalc 2.0

SINE 1.0

Fuzzy Logic Toolbox 2.0