Fuzzy Foundations for EEs, CpEs, CSs

Post on 02-Feb-2016

27 views 0 download

description

Fuzzy Foundations for EEs, CpEs, CSs. By P. D. Olivier, Ph.D., P.E. Fuzzy Foundations. Fuzzy “stuff” can be developed from two (albeit related) classical areas Classical (crisp) logic leads to Fuzzy Logic (path taken here) - PowerPoint PPT Presentation

Transcript of Fuzzy Foundations for EEs, CpEs, CSs

Fuzzy Foundationsfor EEs, CpEs, CSs

By

P. D. Olivier, Ph.D., P.E.

Fuzzy Foundations• Fuzzy “stuff” can be developed from two (albeit

related) classical areas

– Classical (crisp) logic leads to Fuzzy Logic (path taken here)

– Classical set theory leads to Fuzzy Set Theory (more common path, see book)

• Logic and set theory are related since

– AND and INTERSECTION are related

– OR and UNION are related

– NOT and COMPLEMENT are related

Classical Logic• Invented by ancient Greeks, used by “classical

scholars”, used by mathematicians

• Every statement is either TRUE or FALSE

• Statements can be combined with the logical connections AND and OR

• A statement can be modified with NOT

• Truth tables are used to evaluate the truth value (i.e. TRUEness or FALSEness) of a complicated statement

• Logical IF – THEN statements are very important, used to express “THEOREMS”

Truth Table

examples

p q pANDq pORq IF p THEN q

T T T T T

T F F T F

F T F T T

F F F F T

{IF p THEN q}

{NOT(p)ORq}

p q NOT(p) NOT(p)ORq

T T F T

T F F F

F T T T

F F T T

Note: Logical IF premise THEN conclusion not programming IF condition THEN action

Boolean Algebra

• Based on Classical Logic

• Truth values TRUE=T=1, FALSE=F=0

• Mathematizes classical logic– Formulas evaluate truth values

Truth Table

example

p q pANDq pORq IF p THEN q

T=1 T=1 T=1 T=1 T=1

T=1 F=0 F=0 T=1 F=0

F=0 T=1 F=0 T=1 T=1

F=0 F=0 F=0 F=0 T=1

•TV(p) = truth value of p = 0 or 1•TV(pANDq) = min(TV(p),TV(q)) = TV(p)*TV(q) = …•TV(pORq) = max(TV(p),TV(q))

= TV(p)+TV(q)-TV(p)*TV(q) = …•TV(NOT(p))=1-TV(p)•Any logical expression can be expressed in terms of AND, OR, NOT.

TV{IF p THEN q} = TV{NOT(p)ORq}= (1-TV(p))+TV(q)- (1-TV(p))*TV(q)

Fuzzy Logic

• Truth values are continuous between 0 and 1• Choose mathematical formulas for AND, OR, NOT• Compute truth values of complicated statements using

chosen formulas• Are there other reasonable formulas of AND, OR,

NOT?• What kind of vagueness does FL help with? • TV() function related to the characteristic function in

classical set theory and classical logic• TV() function related to the membership function in

FL

Types of Vagueness• Imprecision: Inaccurate measurement

• Statistical: Precise, incomplete, measurements

• Classification (membership in a set)• Determining membership in a group based on a

measurement(s)

• Fuzzy Logic/Set theory helps when set membership is not clear. Consider the set of TALL people. Determine if a given person is tall. Context, subjectivity.

Crisp SET operations

• An element x is either in a set or not in the set.

• VENN diagrams

• Union of A and B

• Intersection of A and B

• Complement of A

|A B x x x BRAO

|A B x x DA x BAN

|'A x is ANOT x

Table 2.2

• Convert set equations to logical equations– CORRECTION: item one should read (A’)’=A

Mathematizing CRISP set theory

• Characteristic function

1( )

0A

when x Ax

when x A

• Complement '( ) 1 ( )A Ax x

• Intersection ( ) min( ( ), ( ))

( )* ( )A B A B

A B

x x x

x x

• Union ( ) max( ( ), ( ))

( ) ( ) ( )* ( )A B A B

A B A B

x x x

x x x x

Others?

( ) ( )

.75 .25 ( ) ( ) ( ) ( )A B

A B A B

x x

x x x x

Fuzzy Set theory

• Characteristic functions become fuzzy membership functions

• Fuzzy membership functions produce continuum of values between 0 and 1

• Not just 0 or 1.

• The value of the membership function at a point is the membership value of the point in the set.

Fuzzy Set theory - Logic

• Interpretation of Membership functions– truth value of a statement– Level of membership in a set

• We will go back and forth between interpretations as convenient.

• Fuzzy sets Fuzzy membership functions

Example 2.7: Expensive Cars

• Logic statement:– Car X is an expensive car

• Set theory statement– X is an element of the set of expensive cars

• Consider Ferraris, Rolls Royce’s, Mercedes, BMWs, Buicks, Toyotas– Produce a membership function

Example 2.8: Natural numbers close to 6

• Logic statement– n is a Natural number close to 6

• Set theory statement– n is an element of the set of Natural numbers

close to 6

• Consider the natural numbers 3 … 9

• Produce a membership function

Typical Fuzzy sets• Increasing (s or gamma functions) pg 50

• Decreasing (z or L functions)

• Approximating (triangular/lambda, trapezoidal, bell)

• Linguistic variables– Age

• Old, young, middle aged, very old, very young

– Temperature• Hot, cold, tepid, very hot, very cold, comfortable

– Generic variable• NB, NM, NS, Z, PS, PM, PB

Mathematical shorthand

• For all, or for every

• There exists

• Such that

• With respect to

: or s.t.

w.r.t.

2.1.5 Properties of Fuzzy Sets (see pp 52-54)

• Support• Width

– sup

– inf

• Nucleus• Height• convexity

( ) | ( ) 0AS A u X u

sup( ) :

0 :

A iff x A x and

x A x

inf( ) :

0 :

A iff x A x and

x A x

( ) sup( ( )) inf( ( ))width A S A S A

( ) | ( ) 1Anucleus A u X u Largest membership degree

, [0,1] :

( (1 ) ) min( ( ), ( ))A A A

x y X

x y x y

2.1.6 Operations on Fuzzy Sets (see pp. 55-61)

• Equality

• Subset and strict subset

• Superset and strict superset

• Union, intersection and complement

• Intersections are described by Triangular-norms (T-norms)– Archimedean

• Unions are described by Triangular co-norms (S-norms)

T-norms (generic intersection)• A triangular norm (T-norm) is a binary function

(operator) that is– Commutative

– Associative

– Non dedreasing

– T-norm identity is 1

1:T a b b a

2 : ( ) ( )T a b c a b c

3:T a c and b d implies a b c d

4 : 1T a a

Archimedean T-norms

• A T-norm that satisfies T-1 to T-4, together with

5 (0,1) :T a a a a

S-norms (generic union)• A triangular co-norm (S-norm) is a binary function

(operator) that is– Commutative

– Associative

– Non dedreasing

– S-norm identity is 0

1:S a b b a

2 : ( ) ( )S a b c a b c

3:S a c and b d implies a b c d

4 : 0S a a

Complement

• The complement function (operator) is a unary operator that has the following properties

• Boundary

values

• Non-increasing

• idempotent

1: (0) 1;c c

2 : ( ) ( );c a b implies c a c b

3: ( ( )) ;c c c a a

Exercises1. Prove that min(a,b) and a*b are T-norms

2. Prove that max(a,b) and a+b-a*b are S-norms

3. Prove that min(a,b) and max(a,b) are conjugate T and S norms according to eq. 2.44

4. Prove that a*b and a+b-a*b are conjugate T and S norms according to eq. 2.44

5. Prove that 1-a is a complement operation

PROVE means to demonstrate to a skeptic that the conclusion follows from the basic rules of mathematics.

Classical to Fuzzy Relations• A classical relation is a set of tuples

– Binary relation (x,y)– Ternary relation (x,y,z)

– N-ary relation (x1,…xn)

– Connection with Cross product– Married couples– Nuclear family– Points on the circumference of a circle– Sides of a right triangle that are all integers

Characteristic Function

• Any set has a characteristic function.

• A relation is a set of points

• Review definition of characteristic function

• Apply this definition to a set defined by a relation

Properties of some binary relations• Reflexive

• Anti-reflexive

• Symmetric

• Anti-symmetric

• Transitive

• Equivalence

• Partial order

• Total order

• Assignment: Classify: =,<,>,<=,>=