These slides introduce Fuzzy Logic and compare it with Classical Logic. Further the topics on the linguistic aspects, inference etc are also discussed.

© All Rights Reserved

10 vues

These slides introduce Fuzzy Logic and compare it with Classical Logic. Further the topics on the linguistic aspects, inference etc are also discussed.

© All Rights Reserved

- Inductive Logic 00 Hib Bu of t
- lua-51-reference
- Math Symbols
- 2009 - Fuzzy Logic Based XQuery Operations for Native XML Database Systems
- Badiou's Mistake
- syllabus
- Argument for Impossibility of Willing Corruption
- LoQ
- Introduction to Fuzzy Logic
- [Ch 1] Logic
- Article 5
- Philo
- Article - Delay Computation
- n-ValuedReﬁned Neutrosophic Soft Sets and its Applications in Decision MakingProblems and Medical Diagnosis
- Annual Report Project
- 301 portfolio slo rubric
- Surround Systems Feather Optimization Through Bebavior
- argument writing rubric
- Fuzzy Theory 1
- Plato%27s Logic

Vous êtes sur la page 1sur 301

Dr S.Natarajan

Professor

Department of Information Science and Engineering

PESIT, Bangalore

Part I Logic

Classical Predicate Logic tautologies, Contradictions,

Equivalence, Exclusive Or Exclusive Nor, Logical Proofs,

Deductive Inferences

Fuzzy Logic, Approximate Reasoning, Fuzzy

Tautologies, Contradictions, Equivalence and Logical

Proofs, Other forms of the Implication Operation

Part II Fuzzy Systems

Natural language processing, Lingustic Hedges, Rule

Based Systems, Multiple conjunctve antecedents ,

Aggregation of Fuzzy Rules, Graphical techniques of

inference

2

Classical Logic

What is

LOGIC- Small part of Human body to reason

LOGIC- means to compel us to infer correct answers

What is

NOT LOGIC- Not responsible for our creativity or ability to

remember

LOGIC helps in organizing words to form words- not

context dependent

3

Fuzzy Logic

capacity to Imprecise learning called Approximate

Reasoning

Such reasoning represents human ability to reason

approximately and judge under uncertainty

Here, the reasoning has been termed as Interpolative

reasoning

4

Negation (NOT)

Unary Operator, Symbol:

September 5, 2006

true

false

false

true

Week 1: Logic and Sets

Conjunction (AND)

Binary Operator, Symbol:

September 5, 2006

PQ

true

true

true

true

false

false

false

true

false

false

false

false

Week 1: Logic and Sets

Disjunction (OR)

Binary Operator, Symbol:

September 5, 2006

P Q

true

true

true

true

false

true

false

true

true

false

false

false

Week 1: Logic and Sets

Exclusive Or (XOR)

Binary Operator, Symbol:

September 5, 2006

P Q

true

true

false

true

false

true

false

true

true

false

false

false

Week 1: Logic and Sets

Binary Operator, Symbol:

September 5, 2006

P Q

true

true

true

true

false

false

false

true

true

false

false

true

Week 1: Logic and Sets

Binary Operator, Symbol:

September 5, 2006

P Q

true

true

true

true

false

false

false

true

false

false

false

true

Week 1: Logic and Sets

10

Statements and operators can be combined in any

way to form new statements.

P

true

Q (P)(Q)

false

true

false true

true

true false

September 5, 2006

true

Week 1: Logic and Sets

true

11

Statements and operators can be combined in any way

to form new statements.

true

true

PQ (PQ) (P)(Q)

true

false

false

true

true

true

true

true

true

September 5, 2006

Week 1: Logic and Sets

12

Equivalent Statements

P

true

true false

false

true

true

true

false true

true

true

true

true

true

equivalent, because (PQ) (P)(Q) is always true.

September 5, 2006

Week 1: Logic and Sets

13

Conditional (Implication)

This one is probably the least intuitive. Its only

partly akin to the English usage of if,then or

implies.

DEF: p q is true if q is true, or if p is false. In

the final case (p is true while q is false) p q

is false.

Semantics: p implies q is true if one can

mathematically derive q from p.

September 5, 2006

Week 1: Logic and Sets

14

Truth Tables

P

PQ

PQ

PQ

PQ

False

False

True

False

False

True

True

False

True

True

False

True

True

False

True

False

False

False

True

False

False

True

True

False

True

True

True

True

15

A tautology is a statement that is always true.

Examples:

R(R)

(PQ) (P)(Q)

If S T is a tautology, we write ST.

If S T is a tautology, we write ST. This symbol

is also used for logical equivalence.

September 5, 2006

Week 1: Logic and Sets

16

A contradiction is a statement that is always

false.

Examples:

R(R)

((PQ) (P)(Q))

The negation of any tautology is a contradiction, and the negation of any contradiction is

a tautology.

September 5, 2006

Week 1: Logic and Sets

17

TAUTOLOGIES

Tautologies Compound Propositions which are

ALWAYS TRUE , irrespective of TRUTH VALUES

of INDIVIDUAL SIMPLE PROPOSITIONS

APPLICATIONS- DEDUCTIVE REASONING,

THEOREM PROVING ,

DEDUCTIVE INFERENCING ETC.,

Example: A is a set of prime numbers given by

(A1 = 1 , A2 = 2, A3 = 3, A4 = 5, A5 = 7, A6 = 11 ) on

the real line universe X, then the proposition Ai

is not divisible by 6 is A TAUTOLOGY

18

Proof by Contradiction

Assume p, and prove that p (q q)

(q q) is a trivial contradiction, equal to F

Thus pF, which is only true if p=F

19

Definition: The real number r is rational if there

exist integers p and q 0, with no common factors

other than 1 (i.e., gcd(p,q)=1), such that r=p/q. A

real number that is not rational is called irrational.

Theorem: Prove that 2 is irrational.

20

Classical Logic

disjunction ()

conjunction ()

negation ()

implication ()

equivalence ()

Classical predicate logic

T: uU [0,1]

U: universe of all propositions.

All elements u U are true for proposition P are called

the truth set of P: T(P).

Those elements u U are false for P are called falsity

set of P: F(P).

T(Y) = 1 T() = 0

22

Logic

Example 5.1. Let P be the proposition The

structural beam is an 18WF45 and let Q be

the proposition The structural beam is made

of steel. Let X be the universe of structural

members comprising girders, beams, and

columns;

x is an element (beam);

A is the set of all wide-flange (WF) beams; and

B is the set of all steel beams. Hence,

P : x is in A

Q : x is in B

Given a proposition P: xA, P: xA, we have the

following logical connectives:

Disjunction

PQ: x A or x B

hence, T(PQ) = max(T(P),T(Q))

Conjunction

PQ: xA and xB

hence T(P Q)= min(T(P),T(Q))

Negation

If T(P) =1, then T(P) = 0 then T(P) =1

Implication

(P Q): xA or xB

Hence , T(P Q)= T(P Q)

(P Q) : T (P Q) = 1, for T (P) = T (Q)

= 0, for T (P) T (Q)

24

Equivalence

(P Q): T(PQ)=

1,

0,

Q) presented here is also known as the classical

implication.

P is referred to as hypothesis or antecedent

Q is referred to as conclusion or consequent.

25

T(PQ)=(T(P)T(Q))

Or PQ= (AB is true)

T(PQ) = T(PQ is true) = max (T(P),T(Q))

(A B)= (AB)= AB

So (AB)= A B

Or AB false A B

Truth table for various compound propositions

P

PQ

PQ

PQ

PQ

T(1)

T(1)

F(0)

T(1)

T(1)

T(1)

T(1)

T(1)

F(0)

F(0)

T(1)

F(0)

F(0)

F(0)

F(0)

T(1)

T(1)

T(1)

F(0)

T(1)

F(0)

F(0)

F(0)

T(1)

F(0)

F(0)

T(1)

T(1)

26

Classical Logic

P : truth that x A

Q : truth that x B where truth is measured in terms of the

truth value, that is,

if x A, T (P) = 1; otherwise, T (P) = 0

if x B, T (Q) = 1; otherwise, T (Q) = 0

or, using the characteristic function to represent truth (1) and

falsity (0), the following notation results:

A(x) = 1 x A

=0 x A

A notion of mutual exclusivity arises in this calculus.

For the situation involving two propositions P and Q, where T

(P) T (Q) = , we have that the truth of P always implies the

falsity of Q and vice versa;

hence, P and Q are mutually exclusive propositions.

Logic

(P Q) : T (P Q) = 1, for T (P) = T (Q)

= 0, for T (P) T (Q)

Logic

Example 5.2. (Similar to Gill, 1976). Consider the following four

propositions:

1. if 1 + 1 = 2, then 4 > 0; conclusion is T regardless of the

Hypothesis

2. if 1 + 1 = 3, then 4 > 0; conclusion is T regardless of the

Hypothesis

3. if 1 + 1 = 3, then 4 < 0; both propositions are false but this does

not

disprove the implication

4. if 1 + 1 = 2, then 4 < 0. a true hypothesis cannot produce a false

conclusion

Hence, the classical form of the implication is true for all

propositions of P and Q except for those propositions that are in

both the truth set of P and the false set of Q

_ __ _

T (P Q) = T (P) T (Q)

Logic

__

(P Q) (A B is true) (either not in A or in B)

_

___

so that T (P Q) = T (P Q) = max(T (P), T (Q))

This expression is linguistically equivalent to the statement P

Q is true when either not A or B is true (logical or)

Graphically, this implication and the analogous set operation

are represented by the Venn diagram in Figure

Logic

universes of discourse:

P is a proposition described by set A, which is defined on

universe X, and

Q is a proposition described by set B, which is defined on

universe Y. Then, the implication P Q can be represented in

set-theoretic terms by the relation R, where R is defined as

_

R = (A B) (A Y) IF A, THEN B IF x A where x X

and A X

THEN y B where y Y and B Y

The graphic in the figure below, represents the space of the

Cartesian product X Y showing typical sets A and B;

superposed on this space is the set-theoretic equivalent of

the implication. That is,

PQ: If x A, Then y B, or PQ AB

The shaded regions of the compound Venn diagram in

the following figure represent the truth domain of the

implication, If A, then B(PQ).

X

A

B

Y

32

33

34

A coupled with B

A entails B

Two ways to interpret If x is A then y is B:

A coupled with B

35

IF A, THEN B, or IF A , THEN C

PREDICATE LOGIC

(PQ)(PS)

Where P: xA, AX

Q: yB, BY

S: yC, CY

SET THEORETIC EQUIVALENT

(A X B)(A X C) = R = relation ON X Y

Truth domain for the

above compound

proposition.

36

37

38

Classical Logic

(A B).

Example:

Suppose we consider the universe of positive integers, X =

{1 n 8}. Let P = n is an even number and let Q = (3

n 7) (n = 6). Then T (P) = {2, 4, 6, 8} and T (Q) = {3, 4,

5, 7}. The equivalence

Q has

setT (Q)) (T (P)

___ T (Q))

___ = {4}

TP (P

Q) the

= (Ttruth

(P )

{1} = {1, 4}

Classical Logic

Example . Prove that P Q if P = n is an integer power of 2

less than 7 and greater than zero and Q = n2 6n + 8 = 0.

Since T (P) = {2, 4} and T (Q) = {2, 4}, it follows that P Q is

an equivalence

Classical Logic

Tautologies

Modus ponens deduction, is a very common inference scheme used in

forwardchaining rule-based expert systems

It is an operation whose task is to find the truth value of a consequent in a

production rule, given the truth value of the antecedent in the rule

Modus ponens deduction concludes that given two propositions,

P and P Q, if both of which are true, then the truth of the simple

proposition Q is automatically inferred.

Modus tollens, an implication between two propositions is combined with a

second

proposition and both are used to imply a third proposition

Common Tautologies

_

B B X.

_

A X; A X X.

(A (A B)) B (modus ponens)

_

_

(B (A B)) A (modus tollens).

Exclusive or

Exclusive Nor

Exclusive or P Q

(AB) (AB)

Exclusive Nor

(P Q)(PQ)

Logical proofs

Logic involves the use of inference in everyday life.

In natural language if we are given some hypothesis it is

often useful to make certain conclusions from them the

so called process of inference (P1P2.Pn) Q is

true.

Hypothesis : Engineers are mathematicians. Logical

thinkers do not believe in magic. Mathematicians are

logical thinkers.

Conclusion : Engineers do not believe in magic.

Let us decompose this information into individual

propositions

P: a person is an engineer

Q: a person is a mathematician

R: a person is a logical thinker

S: a person believes in magic

The statements can now be expressed as algebraic

propositions as

((PQ)(RS)(QR))(PS)

It can be shown that the proposition is a tautology.

ALTERNATIVE: proof by contradiction.

Deductive inferences

The modus ponens deduction ( for p q if p holds the q is inferred)

is used as a tool for making inferences in rule based systems. This

rule can be translated into a relation between sets A and B.

R = (AB)(AY) Y is the universe

Now suppose a new antecedent say A is known, since A implies B

is defined on the cartesian space X Y, B can be found through the

following set theoretic formulation

__

B= AR= A((AB)(AY))

Denotes the composition operation. Modus ponens deduction can

also be used for compound rule.

Whether A is contained only in the complement of A

or whether A and A overlap to some extent as

described next:

IF AA, THEN y=B

IF AA THEN y =C

IF AA , AA, THEN y= BC

Fuzzy Logic

The restriction of classical propositional calculus to a twovalued logic has created many interesting paradoxes over

the ages. For example, the barber of Seville is a classic

paradox (also termed as Russells barber). In the small

Spanish town of Seville, there is a rule that all and only

those men who do not shave themselves are shaved by a

barber. Who shaves the barber?

Another example comes from ancient Greece. Does the liar

from Crete lie when he claims, All Cretians are liars? If he

is telling the truth, then the statement is false. If the

statement is false, he is not telling the truth.

Fuzzy Logic

Let

S: he does not

S S and S S

T(S) = T(S) = 1 T(S)

T(S) = 1/2

But for binary logic T(S) = 1 or 0

Fuzzy propositions are assigned for fuzzy sets:

T P A x

~

0 A 1

~

Some common tautologies follow:

BB X

AX;

A X X

(B(AB))A (modus tollens)

Proof:

(A(AB)) B

(A(AB)) B Implication

((AA) (AB))B

Distributivity

((AB))B

Excluded middle laws

(AB)B

Identity

(AB)B

Implication

(AB)B

Demorgans law

A(BB)

Associativity

AX

Excluded middle laws

X T(X) =1

Identity; QED

50

Proof

(B(AB))A

(B(AB))A

((BA)(BB)) A

((BA))A

(BA)A

(BA)A

(BA)A

B(AA)

BX = X T(X) =1

Truth table

(modus ponens)

AB

(A(AB)

(A(AB)B

O 0

O 1

51

52

Exclusive or

Exclusive Nor

Exclusive or P Q

(AB) (AB)

Exclusive Nor

(P Q)(PQ)

Logical proofs

Logic involves the use of inference in everyday life.

In natural language if we are given some hypothesis it is

often useful to make certain conclusions from them the

so called process of inference (P1P2.Pn) Q is

true.

53

Hypothesis : Engineers are mathematicians. Logical

thinkers do not believe in magic. Mathematicians are

logical thinkers.

Conclusion : Engineers do not believe in magic.

Let us decompose this information into individual

propositions

P: a person is an engineer

Q: a person is a mathematician

R: a person is a logical thinker

S: a person believes in magic

The statements can now be expressed as algebraic

propositions as

((PQ)(RS)(QR))(PS)

It can be shown that the proposition is a tautology.

ALTERNATIVE: proof by contradiction.

54

Deductive inferences

The modus ponens deduction is used as a tool for

making inferences in rule based systems. This rule can

be translated into a relation between sets A and B.

R = (AB)(AY)

Now suppose a new antecedent say A is known, since A

implies B is defined on the cartesian space X Y, B can

be found through the following set theoretic formulation

B= AR= A((AB)(AY))

Denotes the composition operation. Modus ponens

deduction can also be used for compound rule.

55

Whether A is contained only in the complement of A

or whether A and A overlap to some extent as

described next:

IF AA, THEN y=B

IF AA THEN y =C

IF AA , AA, THEN y= BC

56

Fuzzy Logic

Negation

T P 1 T P

Disjunction

P Q : x A or B

T P Q max T P , T Q

~

~ ~

~

Conjunction

P Q : x A and B

~

T P Q min T P , T Q

~

~ ~

~

PQ

~

T P Q T P Q max T P , T Q

~

~

~

~ ~

~

Fuzzy Logic

When the logical conditional implication is of the

compound form,

IF x is A~ , THEN y is B~ , ELSE y is C~

Then fuzzy relation is:

R A B A C

~

R x, y max A x B y , 1 A x C y

~

~

~

~

~

Fuzzy Logic

Rule-based format to represent fuzzy information.

Rule 1: IF x is A

, THEN y is B~ , where A

and B~ represent

~

~

fuzzy propositions (sets)

Now suppose we introduce a new antecedent, say, and we

consider the following rule

' , THEN y is B '

Rule 2: IF x is A

~

~

B ' A'R

~

Fuzzy Logic

Fuzzy Logic

Suppose we use A in fuzzy composition, can we get

B B R

~

Example:

For the problem in pg 127, let

A = A

B = A R

= A R

= {0.4/1 + 0.4/2 + 1/3 + 0.8/4 + 0.4/5 + 0.4/6} B

Logic connectives

Disjunction

Conjunction

Negation

Implication

Equivalence

If xA, T(P) =1 otherwise T(P) = 0

Or

xA(x)={ 1 if x A, otherwise it is 0 }

If T(p)T()=0 implies P true, false, or true P false.

P and are mutually exclusive propositions.

62

General format:

If x is A then y is B (where A & B are linguistic

values defined by fuzzy sets on universes of

discourse X & Y).

x is A is called the antecedent or premise

y is B is called the consequence or

conclusion

Examples:

If the road is slippery, then driving is dangerous.

If a tomato is red, then it is ripe.

If the speed is high, then apply the brake a little.

63

64

It is a relation between two variables x & y;

therefore it is a binary fuzzy relation R defined on

X*Y

There are two ways to interpret A B:

A coupled with B

A entails B

if A is coupled with B then:

65

If A entails B then:

R = A B = A B ( material implication)

R = A B = A (A B) (propositional calculus)

R = A B = ( A B) B

(extended propositional calculus)

66

67

Rules of Inference

Rules of inference provide the justification of

the steps used in a proof.

One important rule is called modus ponens or the

law of detachment. It is based on the tautology

(p (p q)) q. We write it in the following

way:

The two hypotheses p and p q are

p

written in a column, and the conclusion

p q below a bar, where means therefore.

____

q

Spring 2003

68

Rules of Inference

The general form of a rule of inference is:

p1

p2

.

.

.

pn

____

q

Spring 2003

and pn are all true, then q is true as well.

Each rule is an established tautology of

p1 p 2 p n q

These rules of inference can be used in

any mathematical argument and do not

require any proof.

CMSC 203 - Discrete Structures

69

CS 173

Proofs - Modus Ponens

I am Mila.

If I am Mila, then I am a great swimmer.

I am a great swimmer!

p

pq

Tautology:

(p (p q)) q

Inference

Rule:

Modus

Ponens

70

CS 173

Proofs - Modus Tollens

I am not a great skater.

If I am Erik, then I am a great skater.

I am not Erik!

q

pq

Tautology:

(q (p q)) p

Inference

Rule:

Modus

Tollens

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

Fuzzy Logic

The restriction of classical propositional calculus to a twovalued logic has created many interesting paradoxes over

the ages. For example, the barber of Seville is a classic

paradox (also termed as Russells barber). In the small

Spanish town of Seville, there is a rule that all and only

those men who do not shave themselves are shaved by a

barber. Who shaves the barber?

Another example comes from ancient Greece. Does the liar

from Crete lie when he claims, All Cretians are liars? If he

is telling the truth, then the statement is false. If the

statement is false, he is not telling the truth.

92

Fuzzy Logic

Let

S: he does not

S S and S S

T(S) = T(S) = 1 T(S)

T(S) = 1/2

But for binary logic T(S) = 1 or 0

Fuzzy propositions are assigned for fuzzy sets:

T P A x

~

0 A 1

~

93

Fuzzy Logic

Negation

T P 1 T P

Disjunction

P Q : x A or B

T P Q max T P , T Q

~

~ ~

~

Conjunction

P Q : x A and B

~

T P Q min T P , T Q

~

~ ~

~

PQ

~

T P Q T P Q max T P , T Q

~

~

~

~ ~

~

94

Fuzzy Logic

R A B A Y

~

R x, y max A x B y , 1 A x

~

Example:

A = medium uniqueness =

~

0.6 1 0.2

2 3 4

~

5

2 3 4

Then

95

Fuzzy Logic

96

Fuzzy Logic

When the logical conditional implication is of the

compound form,

IF x is A~ , THEN y is B~ , ELSE y is C~

Then fuzzy relation is:

R A B A C

~

R x, y max A x B y , 1 A x C y

~

~

~

~

~

97

Fuzzy Logic

Rule-based format to represent fuzzy information.

Rule 1: IF x is A

, THEN y is B~ , where A

and B~ represent

~

~

fuzzy propositions (sets)

Now suppose we introduce a new antecedent, say, and we

consider the following rule

' , THEN y is B '

Rule 2: IF x is A

~

~

B ' A'R

~

98

Fuzzy Logic

99

Fuzzy Logic

Suppose we use A in fuzzy composition, can we get

B B R

~

Example:

For the problem in pg 127, let

A = A

B = A R

= A R

= {0.4/1 + 0.4/2 + 1/3 + 0.8/4 + 0.4/5 + 0.4/6} B

100

Equivalence, and Logical Proofs

The following form of the implication operator show

different techniques for obtaining the membership function

values of fuzzy relation R defined on the Cartesian product

~

space X Y:

101

Equivalence, and Logical Proofs

The following common methods are among those proposed

B A R

A

in the literature for the composition operation

,

~

~

~

~

B

where is the input, or antecedent defined on the universe~ X,

is the output, or consequent defined on the universe Y, R~

and

is a fuzzy relation characterizing the relationship

between specific inputs (x) and specific outputs (y):

102

Equivalence, and Logical Proofs

The extension of truth operations for tautologies,

contradictions, equivalence, and logical proofs is no

different for fuzzy sets; the results, however, can differ

considerably from those in classical logic. If the truth

values for the simple propositions of a fuzzy logic

compound proposition are strictly true (1) or false (0), the

results follow identically those in classical logic. However,

the use of partially true (or partially false) simple

propositions in compound propositional statements results

in new ideas termed quasi tautologies, quasi

contradictions, and quasi equivalence. Moreover, the idea

of a logical proof is altered because now a proof can be

shown only to a matter of degree. Some examples of

these will be useful.

103

Equivalence, and Logical Proofs

Truth table (approximate modus ponens)

A

AB

(A(AB))

.3

.2

.7

.3

.7

.3

.8

.8

.3

.8

.7

.2

.3

.3

.7

.7

.8

.8

.7

.8

(A(AB))B

Quasi tautology

A

AB

(A(AB))

.4

.1

.6

.4

.6

.4

.9

.9

.4

.9

.6

.1

.4

.4

.6

.6

.9

.9

.6

.9

(A(AB))B

Quasi tautology

104

Equivalence, and Logical Proofs

The following form of the implication operator show

different techniques for obtaining the membership function

values of fuzzy relation R defined on the Cartesian product

~

space X Y:

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

Part I Logic

Classical Predicate Logic tautologies, Contradictions,

Equivalence, Exclusive Or Exclusive Nor, Logical Proofs,

Deductive Inferences

Fuzzy Logic, Approximate Reasoning, Fuzzy

Tautologies, Contradictions, Equivalence and Logical

Proofs, Other forms of the Implication Operation

Part II Fuzzy Systems

Natural language processing, Lingustic Hedges, Rule

Based Systems, Multiple conjunctve antecedents ,

Aggregation of Fuzzy Rules, Graphical techniques of

inference

132

133

NATURAL LANGUAGE

information.

Despite its vagueness and ambiguity it is the

vehicle for human communication, and it seems

appropriate that a mathematical theory that deals

with fuzziness and ambiguity is also the same

tool used to express and interpret the linguistic

character of our language. Natural language is

used in the expression of knowledge form

known as RULE BASED SYSTEMS

NATURAL LANGUAGE

thinking primarily on conceptual patterns and

mental images rather than on any numerical

quantities.

In fact the expert system paradigm known as

Frames is based on the notion of a cognitive

picture in one's mind.

Furthermore, humans communicate with their own

natural language by referring to previous mental

images with rather vague but simple terms.

Despite the vagueness and ambiguity in natural

language, humans communicating in a common

language have very little trouble in basic

understanding.

human communication involves natural language

terms that, by their very nature, are often vague,

imprecise, ambiguous, and fuzzy, we will propose

the use of fuzzy sets as the mathematical

foundation of our Natural Language (NL).

NL consists of

- atomic terms :The fundamental terms.

Ex: slow, medium, young, beautiful etc.

composite : a collection of of atomic terms or

set of terms.

Ex: very slow horse, heavy-weight female,

fairly beautiful painting, etc

Natural Language

The time interval x was the period exhibiting a 100 percent maximum of

possible values as measured along some arbitrary social scale, [and]

the interval x was the period of time exhibiting 100 percent minimum of

these values as measured along the same scale.

Crisp version of this passage is identical to that posed by the law of

excluded middle of probability theory.

The decomposition of compound rules into canonical (equivalent)

forms and the treatment of rules forms as logical propositions. The

characterization of the confidence in a particular rule is addressed

by using the truth qualifications. The expression of rules as a

collection of logical implications manipulated by inference schemes

137

Knowledge is a collection of facts from

some domain.

What we need is a representation of facts

that can be manipulated by a program.

Some symbolic representation is necessary.

Need to be able to map facts to symbols.

Need to be able to map symbols to facts?

138

Game playing - need rules of the game,

strategy, heuristic function(s).

Expert Systems - list of rules, methods to

extract new rules.

Learning - the space of all things learnable

(domain representation), concept

representation.

Natural Language - symbols, groupings,

semantic mappings, ...

139

Representation Properties

Representational Adequacy - Is it possible to

represent everything of interest ?

Inferential Adequacy - Can new information

be inferred?

Inferential Efficiency - How easy is it to infer

new knowledge?

Acquisitional Efficiency - How hard is it to

gather information (knowledge)?

140

Each state could be represented as a

collection of facts.

Keeping many such states in memory may

be impossible.

Most facts will not change when we move

from one state to another.

141

Determining how to best represent facts that

change from state to state along with those

facts that do not change is the Frame

Problem.

Sometimes the hard part is determining

which facts change and which do not.

142

Using fuzzy sets as a calculus to interpret natural

language. It is vague, imprecise, ambiguous and fuzzy.

Fundamental terms atoms

Collection of atomic terms composite or set of terms

An atomic term (a linguistic variable) can be interpreted

using fuzzy sets.

An atomic term in the universe of natural language, X.

Define a fuzzy set A

~ in the universe of interpretations or

meanings, Y as a specific meaning of .

143

universe of NL, X, as element and we define

fuzzy set A in the universe of interpretations , or

meanings, Y, as a specific meaning for the term .

then NL can be expressed as a mapping, M from a

set of atomic terms in X to a corresponding set of

interpretations defined on Y.

set A in Y, which is the interpretation of

A

MA

M , y A y

~

1 y 25

25

M youg y

~

y 25

y 25

145

Composite

or :

or y max y , y

and :

and y min y , y

Not : y 1 y

146

LINGUISTIC HEDGES

modified with adjectives (nouns) or

adverbs (verbs) .

like very, low, slight, almost, more-or-less, etc

Using fuzzy sets as the calculus of interpretation,

these linguistic hedges have the effect of

modifying the membership function for a basic

atomic term

Define = a(y)/y, then

y

very = 2 = [(y)]2/y

Very, very = 4

plus =1.25

minus = 0.75

concentrations

known as intensification.

Intensification can be expressed by numerous

algorithms, one of which, proposed by Zadeh, is

2 2(y)

2

1-2[1-

(y)]

intensify a = =

for 0.5 <= (y) <= 1

Parentheses may be used to change the precedence

order and ambiguities may be resolved by the use

of association-to-the-right. For example, plus

very minus as plus(very(minus))

Concentration

of A

Dilation of A

x

Intensification

of A

which are partly in the set

Hedge very with membership of .9 reduced by 10 percent to a value

.81 whereas, membership value of .1 is reduced by an order of

magnitude .01.

Decrease Manifestation of the properties of the properties of the

membership value itself for 0 1 then >= 2

Dilation- Stretch or dilate fuzzy set by increasing the membership

of elements that are partly in the set

For the hedge slightly membership value .81 is increased by 11% to

get 0.9 and the membership value of 0.01 is increased by an order

of magnitude to 0.1

151

and logical operations

Precedence

Operation

First

Hedge, not

Second

and

Third

or

Linguistic Hedges

Very

y

y

y

Very

very 4

plus 1.25

Slightly

y

y

y

Minus 0.75

2 y

Intensify

1 21 y 2

0 y 0.5

0.5 y 1

It increases contrast.

153

Example:

Suppose we have a universe of integers, Y = {1,2,3,4,5}.

We define the following linguistic terms as a mapping onto

Y:

small = 1 .8 .6 .4 .2

large =

3

4

5

1 2

.2 .4 .6 .8 .1

2

3

4

5

1

154

+0.04/5}

Not very small = 1- very small = {0/1 + 0.36/2 + 0.64/3+

0.84/4+ 0.96/5}

Thus we construct a phrase, or a composite term:

= not very small and not very very large which

involves the following set-theoretic operations:

155

Example (contd)

1 21 1 2 1 21 0.8 2 1 21 0.6 2

1

2

3

Intensely small =

2

2

2 0.4 2 0.2

4

5

1 0.92 0.68 0.32 0.08

2

3

4

5

1

156

Rule-based systems

represent knowledge.

IF premise (antecedent), THEN conclusion

(consequent)

Commonly referred to as the IF-THEN rule-based

form

The rule-based system is distinguished from

expert systems in the sense that the rules

comprising a rule-based system might derive from

sources other that human experts and, in this

context, are distinguished from expert systems.

Rule-based Systems

IF-THEN rule based form

Canonical Rule Forms

1. Assignment statements

x = large, x y

2. Conditional statements

If A then B,

If A then B, else C

3. Unconditional statements

stop

go to 5

unconditional can be

If any conditions, then stop

If condition Ci, then restrict Ri

158

Assignment statements

x = large

bananas color = yellow

x approx= s

Conditional statements

IF the tomato is red THEN the tomato is ripe

IF x is very hot THEN stop

Unconditional statements

go to 9

stop

divide by x

turn the pressure higher

described using a collection of conditional

restrictive statements. These statements may also

be modeled as fuzzy conditional statements, such

as

IF condition C1 THEN restriction R1.

R1: The output is B1

AND

R2: The output is B2

AND

etc.

Where B1, B2, . Are fuzzy consequents.

Rule 2: IF cond C2, THEN restriction R2

.

.

Rule n: IF cond Cn, THEN restriction Rn.

Example

if the temperature is hot, then the pressure is

rather high.

if the temperature is cold, then the pressure is

very low.

The vague term rather high in the first statement

places a fuzzy restriction on the pressure , based

on a fuzzy hot temperature condition in the

antecedent.

Any compound rule structure can be decomposed and

reduced to a number of simple canonical rules.

The most commonly used techniques

Multiple Conjunctive Antecedents

2

L

S

A

If x is and A A , then y is B

~

Define

A A A A

~

A x min A x , , A x

S

S

IF A THEN B

~

163

involve compound rule structures

as an example, consider a rule-based for a simple

home temperature control problem, which might

contain the following rules.

IF it is raining hard

THEN close the window.

IF the room temp is very hot,

THEN

IF the heat is on

THEN turn the heat lower

AND IF it is not raining hard

THEN open the window. etc..

1

A or or A

If x is A

or

~

~

~

then y is B

~

S

S

A A A A

~

AS x max A1 x , , A L x

S

B

IF A

THEN

~

~

165

IF x is A1 and A2 and AL THEN y is Bs

As = A1 A2 AL

As(x) = min [A1(x), , Al(x)]

IF As THEN Bs

IF x is A1 or A2 or AL THEN y is Bs

As = A1 A2 A L

As(x) = max [A1(x), , Al(x)]

IF x is As THEN y is Bs

Condition Statements

1

1

B ) decomposed into:

B

1. IF A

THEN

(

ELSE

~

~

1

1~

1

2

B

A THEN B

IF A

THEN

or

IF

NOT

~

~

~

~

1

1

2

B

A

2. IF A

(THEN

)

unless

decomposed into:

~

~

~

1

1

2

1

IF A THEN B

or

IF NOT A THEN NOT B

~

1

A THEN ( B 2 )) decomposed into:

B

3. IF A

THEN

(

ELSE

IF

~

~

1

1~

1 ~

2

2

B

A and A THEN NOT B

IF A

THEN

or

IF

NOT

~

~

~

~

~

1

1

2

B

IF A THEN (IF A , THEN ( ~ )) becomes

~1

~

2

IF A and A THEN B1

~

the rules to a series of relations.

167

Condition Statements

likely very likely highly likely true fairly true very true

false fairly false very false

x X

anything x 1

Let be a fuzzy truth value very true true fairly true

fairly false false

A truth qualification proposition can be expressed as:

x is A~ is

or

x is A~ is = A x

~

A x 0.5

~

168

The process of obtaining the overall consequent

(conclusion) from the individual consequent contributed by

each rule in the rule-base is known as aggregation of

rules.

Conjunctive System of Rules:

y y1 y 2 y r

y y min y1 y , , y r y y Y

y y1 y 2 y r

y y max y1 y , , y r y y Y

169

170

171

(very

very unlikely)0.75 = 1/0 + 1/.1 + 1/.2 + .5/.3 + .3/.4}

Ex: if a fuzzy variable x has a membership value equal to .85 in

the fuzzy set A i.e., (x)=.85 as shown in the figure then its

membership values for the following truth qualification

statements are determined from figure

: x is A is

true

: x is A is

false

: x is A is

fairly true

: x is A is

very false

A(x) = .85

A(a)

1

A(x) = .15

.96

.85

A(x) = .96

.15

a

.85

A(x) = .04

y = y1 and y2 and and yr

Or

y = y1 y2 yr

Defined by y(y) = min (y1(y),yr(y))

for y belongs to Y

y = y1 or y2 or or yr

Or

y = y1 U y2 U U y r

Defined by y(y) = max (y1(y), y(r-1)(y), yr(y))

for y belongs to Y

175

176

177

178

179

180

181

182

183

184

185

186

from human experts knowledge or experience

by statistical analysis of numerical data obtained

from experimentation

through neuro-fuzzy optimisation (learning)

process ANFIS (Adaptive Neuro-Fuzzy

Inference System), FuNe (Neuro-Fuzzy learning

network with rule generation)

Slide 187

188

Fuzzy Logic

The most commonly used fuzzy inference technique is the

so-called Mamdani method.

In 1975, Professor Ebrahim Mamdani of London

University built one of the first fuzzy systems to control a

steam engine and boiler combination. He applied a set of

fuzzy rules supplied by experienced human operators.

189

reasoning

price of crude oil which has edged higher in recent

weeks after being remarkably stable through much

of the year, may fluctuate as much as a dollar a

barrel in the months ahead, but abrupt changes are

not likely, many analysts believe.

Almost all our everyday reasoning is approximate

in nature.

Slide 190

FIS: Inspiration

park the car

park the car 10cm from the curb

reduce the precision of information to make a

complex problem more tractable

Slide 191

FIS: Applications

Sendai subway (Hitachi), Elevator control (Hitachi,

Toshiba)

Nuclear reactor control (Hitachi)

Automobile transmission (Nissan, Subaru, Honda)

Video image stabilisation (Canon, Minolta)

medical diagnosis

Securities

Fault diagnosis

Credit worthiness

Slide 192

FIS

Defuzzifier

Slide 193

Fuzzy Operations

A B ( x) max A , B

A B ( x) min A , B

A ( x) 1 A

Slide 194

Rule: if x is A then y is B

Fact: x is A

Inference: y is B

Graphical Representation:

A A

x is A

B

X

y is B

Y

Slide 195

1. Determine the degree of membership of each input to

different fuzzy terms Aji:

2. Determine the strength of each rule antecedent

j runs on each fuzzy term

i runs on each rule

4. Rule aggregation

5. Defuzzification

Slide 196

Fuzzy Logic

in four steps:

2. Rule evaluation (inference)

3. Aggregation of the rule outputs (composition)

4. Defuzzification.

13th October 2005

197

Fuzzy Logic

We examine a simple two-input one-output problem that includes three

rules:

Rule: 1

IF

OR

THEN

Rule: 1

x is A3 IF

project_funding is adequate

y is B1 OR

project_staffing is small

z is C1 THEN risk

is low

Rule: 2

IF

AND

THEN

Rule: 2

x is A2 IF

project_funding is marginal

y is B2 AND project_staffing is large

z is C2 THEN risk

is normal

Rule: 3 Rule: 3

IF

x is A1 IF

project_funding is inadequate

THEN z is C3 THEN risk

is high

13th October 2005

198

Fuzzy Logic

Step 1: Fuzzification

The first step is to take the crisp inputs, x1 and y1 (project funding and

project staffing), and determine the degree to which these inputs

belong to each of the appropriate fuzzy sets.

Crisp Input

x1

1

0.5

0.2

0

A1

A2

x1

(x = A1) = 0.5

(x = A2) = 0.2

Crisp Input

y1

1

0.7

A3

X

B1

0.1

0

Project Funding

13th October 2005

B2

y1

(y = B1) = 0.1

(y = B2) = 0.7

Project Staffing

Bogdan L. Vrusias 2005

Fuzzy Logic

The second step is to take the fuzzified inputs,

(x=A1) = 0.5, (x=A2) = 0.2, (y=B1) = 0.1 and (y=B2) = 0.7,

and apply them to the antecedents of the fuzzy rules.

If a given fuzzy rule has multiple antecedents, the fuzzy

operator (AND or OR) is used to obtain a single number

that represents the result of the antecedent evaluation.

This number (the truth value) is then applied to the

consequent membership function.

200

Fuzzy Logic

RECALL:

To evaluate the disjunction of the rule antecedents, we use the

OR fuzzy operation. Typically, fuzzy expert systems make

use of the classical fuzzy operation union:

Similarly, in order to evaluate the conjunction of the rule

antecedents, we apply the AND fuzzy operation intersection:

13th October 2005

201

Fuzzy Logic

1

A3

B1

0.1

0.0

0

x1

Rule 1: IF x is A3 (0.0)

OR

y1

y is B1 (0.1)

A2

0

x1

y1

1

A1

AND

(min)

Y

0.2

C1

C2

z is C2 (0.2)

C2

THEN

Bogdan L. Vrusias 2005

C3

1

0.5 C1

Rule 3: IF x is A1 (0.5)

C3

z is C1 (0.1)

THEN

0.5

x1

C2

B2

0

C1

THEN

0.7

0.2

X

OR

(max)

0.1

C3

Z

z is C3 (0.5)

202

Fuzzy Logic

Now the result of the antecedent evaluation can be applied

to the membership function of the consequent.

There are two main methods for doing so:

Clipping

Scaling

203

Fuzzy Logic

The most common method of correlating the rule

consequent with the truth value of the rule antecedent is to

cut the consequent membership function at the level of the

antecedent truth. This method is called clipping (lambdacut).

Since the top of the membership function is sliced, the

clipped fuzzy set loses some information.

However, clipping is still often preferred because it

involves less complex and faster mathematics, and

generates an aggregated output surface that is easier to

defuzzify.

13th October 2005

204

Fuzzy Logic

While clipping is a frequently used method, scaling offers

a better approach for preserving the original shape of the

fuzzy set.

The original membership function of the rule consequent

is adjusted by multiplying all its membership degrees by

the truth value of the rule antecedent.

This method, which generally loses less information, can

be very useful in fuzzy expert systems.

205

Fuzzy Logic

Degree of

Membership

1.0

Degree of

Membership

1.0

C2

C2

0.2

0.2

0.0

0.0

clipping

scaling

206

Fuzzy Logic

Aggregation is the process of unification of the outputs of

all rules.

We take the membership functions of all rule consequents

previously clipped or scaled and combine them into a

single fuzzy set.

The input of the aggregation process is the list of clipped

or scaled consequent membership functions, and the output

is one fuzzy set for each output variable.

207

Fuzzy Logic

C1

C2

C3

0.5

0.2

0.1

0

z is C 1 (0.1)

0.5

0.1

z is C 2 (0.2)

z is C 3 (0.5)

0.2

0

208

Fuzzy Logic

Step 4: Defuzzification

The last step in the fuzzy inference process is

defuzzification.

Fuzziness helps us to evaluate the rules, but the final

output of a fuzzy system has to be a crisp number.

The input for the defuzzification process is the aggregate

output fuzzy set and the output is a single number.

209

Fuzzy Logic

Step 4: Defuzzification

There are several defuzzification methods, but probably

the most popular one is the centroid technique. It finds

the point where a vertical line would slice the aggregate set

into two equal masses. Mathematically this centre of

gravity (COG) can be expressed as:

b

COG

A x x dx

a

b

A x dx

a

210

Fuzzy Logic

Step 4: Defuzzification

Centroid defuzzification method finds a point representing

the centre of gravity of the fuzzy set, A, on the interval, ab.

A reasonable estimate can be obtained by calculating it

over a sample of points.

(x)

1.0

0.8

A

0.6

0.4

0.2

0.0

150

13th October 2005

160

170

180

190

200

X

210

211

Fuzzy Logic

Step 4: Defuzzification

Degree of

Membership

1.0

0.8

0.6

0.4

0.2

0.0

0

10

20

30

40

50

60

70

67.4

COG

80

90

100

Z

67.4

0.1 0.1 0.1 0.2 0.2 0.2 0.2 0.5 0.5 0.5 0.5

212

Fuzzy Logic

Mamdani-style inference, as we have just seen, requires us

to find the centroid of a two-dimensional shape by

integrating across a continuously varying function. In

general, this process is not computationally efficient.

Michio Sugeno suggested to use a single spike, a singleton,

as the membership function of the rule consequent.

A singleton, or more precisely a fuzzy singleton, is a fuzzy

set with a membership function that is unity at a single

particular point on the universe of discourse and zero

everywhere else.

13th October 2005

213

Fuzzy Logic

Sugeno-style fuzzy inference is very similar to the

Mamdani method. Sugeno changed only a rule

consequent. Instead of a fuzzy set, he used a mathematical

function of the input variable. The format of the Sugenostyle fuzzy rule is

IF x is A

AND

y is B

THEN

z is f(x, y)

where x, y and z are linguistic variables; A and B are fuzzy

sets on universe of discourses X and Y, respectively; and

f(x, y) is a mathematical function.

13th October 2005

214

Fuzzy Logic

The most commonly used zero-order Sugeno fuzzy

model applies fuzzy rules in the following form:

IF

x is A

AND y is B

THEN z is k

where k is a constant.

In this case, the output of each fuzzy rule is constant. All

consequent membership functions are represented by

singleton spikes.

13th October 2005

215

Fuzzy Logic

216

Fuzzy Logic

1

0.1

0

0.5

0.5

0.1

0

0.2

k1

z is k1 (0.1)

k2

z is k2 (0.2)

k3

z is k3 (0.5)

0.2

k1

k2

k3

217

Case 1 : CRISP SETS max-min

Case 2: CRISP SETS: Using max-product (or correlation product)

implication technique, aggregated output for r rules would be:

k

~

~1

~2

k

~

~2

~1

k 1,2, , r

k 1,2, , r

requires us to find the centroid of a two-dimensional

shape by integrating across a continuously varying

function. In general, this process is not

computationally efficient.

Michio Sugeno suggested to use a single spike, a

singleton, as the membership function of the rule

consequent. A singleton, or more precisely a fuzzy

singleton, is a fuzzy set with a membership function

that is unity at a single particular point on the

universe of discourse and zero everywhere else.

220

Mamdani method. Sugeno changed only a rule

consequent. Instead of a fuzzy set, he used a

mathematical function of the input variable. The

format of the Sugeno-style fuzzy rule is

IF

x is A

AND y is B

THEN z is f (x, y)

where x, y and z are linguistic variables; A and B are

fuzzy sets on universe of discourses X and Y,

respectively; and f (x, y) is a mathematical function.

221

model applies fuzzy rules in the following form:

IF

x is A

AND y is B

THEN z is k

where k is a constant.

In this case, the output of each fuzzy rule is constant.

All consequent membership functions are represented

by singleton spikes.

222

1

A3

B1

0.1

0.0

0

x1

Rule 1: IF x is A3 (0.0)

y1

OR y is B1 (0.1)

A2

0

x1

y1

1

A1

z is k1 (0.1)

AND

(min)

Y

0.2

0

THEN

k2

z is k2 (0.2)

Rule 3: IF x is A1 (0.5)

k1

1

0.5

0.5

x1

B2

0

0.1

THEN

0.7

0.2

X

OR

(max)

THEN

k3

z is k3 (0.5)

223

1

0.1

0

0.5

0.5

0.1

0

0.2

k1

z is k1 (0.1)

k2

z is k2 (0.2)

k3

z is k3 (0.5)

0.2

k1

k2

k3

224

(k1) k1 (k 2) k 2 (k 3) k 3 0.1 20 0.2 50 0.5 80

WA

65

(k1) (k 2) (k 3)

0.1 0.2 0.5

Sugeno-style defuzzification

z1

Crisp Output

z1

225

to apply Mamdani or Sugeno?

expert knowledge. It allows us to describe the

expertise in more intuitive, more human-like

manner. However, Mamdani-type fuzzy inference

entails a substantial computational burden.

On the other hand, Sugeno method is

computationally effective and works well with

optimisation and adaptive techniques, which makes

it very attractive in control problems, particularly

for dynamic nonlinear systems.

226

ones.

A customer brings a failed item and receives a spare

of the same type.

Failed parts are repaired, placed on the shelf, and

thus become spares.

The objective here is to advise a manager of the

service centre on certain decision policies to keep

the customers satisfied.

227

1. Specify the problem and define linguistic variables.

2. Determine fuzzy sets.

3. Elicit and construct fuzzy rules.

4. Encode the fuzzy sets, fuzzy rules and procedures

to perform fuzzy inference into the expert system.

5. Evaluate and tune the system.

228

linguistic variables

There are four main linguistic variables: average

waiting time (mean delay) m, repair utilisation

factor of the service centre , number of servers s,

and initial number of spare parts n.

229

230

Fuzzy sets can have a variety of shapes. However,

a triangle or a trapezoid can often provide an

adequate representation of the expert knowledge,

and at the same time, significantly simplifies the

process of computation.

231

Degree of

Membership

1.0

0.8

VS

0.6

0.4

0.2

0.0

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Mean Delay (normalised)

232

Degree of

Membership

1.0

0.8

0.6

0.4

0.2

0.0

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Number of Servers (normalised)

233

Degree of

Membership

1.0

0.8

0.6

0.4

0.2

0.0

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Repair Utilisation Factor

234

Degree of

Membership

1.0

0.8

VS

RS

RL

VL

0.6

0.4

0.2

0.0

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Number of Spares (normalised)

235

To accomplish this task, we might ask the expert to

describe how the problem can be solved using the

fuzzy linguistic variables defined previously.

Required knowledge also can be collected from

other sources such as books, computer databases,

flow diagrams and observed human behaviour.

236

s

VS

RL

RS

VL

VS

237

238

Rule Base 1

239

s

s

L

M

S

VS VS VS

VS VS VS

S

S

VS

VS VS VS

VS VS VS

VS VS VS

VS VS VS

VS VS VS

H

VS VS VS

M

L

VS

S

M

VS

VS

VS

VS

VS

VS

VS

VS

RS

VL

VS

s

L

RS

RS

VS

VS

VS

VS

s

S

RL

240

and procedures to perform fuzzy

inference into the expert system

To accomplish this task, we may choose one of

two options: to build our system using a

programming language such as C/C++ or Pascal,

or to apply a fuzzy logic development tool such as

MATLAB Fuzzy Logic Toolbox or Fuzzy

Knowledge Builder.

241

The last, and the most laborious, task is to evaluate

and tune the system. We want to see whether our

fuzzy system meets the requirements specified at

the beginning.

Several test situations depend on the mean delay,

number of servers and repair utilisation factor.

The Fuzzy Logic Toolbox can generate surface to

help us analyse the systems performance.

242

n u m b e r_ o f_ sp a re s

0.6

0.5

0.4

0.3

0.2

0

0.2

0.4

0.6

mean_delay

0.2

0.4

0.6

0.8

number_of_servers

243

number_of_spares

0.6

0.5

0.4

0.3

0.2

0

0.2

0.4

0.6

mean_delay

0.2

0.4

0.6

0.8

utilisation_factor

244

number_of_spares

0.35

0.3

0.25

0.2

0.15

0

0.2

0.4

0.6

mean_delay

0.2

0.4

0.6

0.8

number_of_servers

245

number_of_spares

0.5

0.4

0.3

0.2

0

0.2

0.4

0.6

mean_delay

0.2

0.4

0.6

0.8

utilisation_factor

246

satisfied with the system performance.

To improve the system performance, we may use

additional sets Rather Small and Rather Large

on the universe of discourse Number of Servers,

and then extend the rule base.

247

Degree of

Membership

1.0

0.8

RS

RL

0.6

0.4

0.2

0.0

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Number of Servers (normalised)

248

s

s

L

RL

M

RS

S

VS VS VS

VS VS VS

S

S

VS

VS VS VS

VS VS VS

S

S

VS

VS VS VS

VS VS VS

VS VS VS

VS VS VS

VS VS VS

VS VS VS

VS VS VS

VS VS VS

H

VS VS VS

M

L

VS

S

M

RL

s

L

RS

RL

RS

VS

M RS

VS

M VS

VS

VS

RS VS

VS

VS

S VS

VS

VS

VS

RS

VS

VS

VS

VS

VS

VS

RS

RS

RS VL

RL

RS

S VL

VS

s

S

RL RL

249

number_of_spares

0.35

0.3

0.25

0.2

0.15

0

0.2

0.4

0.6

mean_delay

0.2

0.4

0.6

0.8

number_of_servers

250

number_of_spares

0.5

0.4

0.3

0.2

0

0.2

0.4

0.6

mean_delay

0.2

0.4

0.6

0.8

utilisation_factor

251

1. Review model input and output variables, and if

required redefine their ranges.

2. Review the fuzzy sets, and if required define

additional sets on the universe of discourse.

The use of wide fuzzy sets may cause the fuzzy

system to perform roughly.

3. Provide sufficient overlap between neighbouring

sets. It is suggested that triangle-to-triangle and

trapezoid-to-triangle fuzzy sets should overlap

between 25% to 50% of their bases.

252

rules to the rule base.

5. Examine the rule base for opportunities to write

hedge rules to capture the pathological behaviour

of the system.

6. Adjust the rule execution weights. Most fuzzy

logic tools allow control of the importance of rules

by changing a weight multiplier.

7. Revise shapes of the fuzzy sets. In most cases,

fuzzy systems are highly tolerant of a shape

approximation.

253

Example:

1

1

1

B

A

A

Rule 1: if x1 is ~ 1 and x2 is ~ 2 , then y is ~

2

2

2

B

A

A

Rule 2: if x1 is ~ 1 or x2 is ~ 2, then y is ~

input(i) = 0.35

input(j) = 55

If x1 is

and x2 is

then y is

, k = 1,2,..., r

make manual computations involving a few simple rules.

Case 1: inputs x1, and x2 are crisp.

Memberships

(x1) = (x1 input(i)) =

(x2) = (x2 input(i)) =

x1 = input(i)

otherwise

1

0

x2 = input(i)

otherwise

255

For r disjunctive rules:

B y max min A input i , A input j

k

k 1,2, , r

k

~1

~2

A12 refers to the second fuzzy antecedent of the first rule.

256

257

258

Summary

Fuzzy Modelling subjectivity

blessing rather than a curse

Vagueness present in the definition of the terms is consistent with the

information contained in the conditional rules developed by

the Engineer when observing some complex process

Set of linguistic variables and their meanings is compatible and

consistent with set of conditional rules used, the outcome of the

qualitative process is translated into objective and quantifiable results

Fuzzy mathematical tools and the calculus of fuzzy IF-THEN

rule provide a most useful paradigm for the automation and

implementation of an extensive body of human knowledge which are

not embodied in the quantitative modelling process

259

determination of the degree of membership of crisp

inputs in appropriate fuzzy sets.

an output for each rule.

the outputs of all rules.

October 2005

260

Recap

Example: Air Conditioner

Example: Cart Pole Problem

Case Study: Building a Fuzzy Expert System

Summary

October 2005

261

1a. Specify the problem

Air-conditioning involves the delivery of air, which can be

warmed or cooled and have its humidity raised or lowered.

An air-conditioner is an apparatus for controlling, especially

lowering, the temperature and humidity of an enclosed

space. An air-conditioner typically has a fan which

blows/cools/circulates fresh air and has a cooler. The cooler

is controlled by a thermostat. Generally, the amount of air

being compressed is proportional to the ambient

temperature.

Ambient Temperature

Air-conditioner Fan Speed

October 2005

262

2. Determine Fuzzy Sets: Temperature

Temp

(0C).

0< (T)<1

(T)=0

October 2005

COLD

COOL

PLEASANT

WARM

HOT

Y*

10

12.5

Y*

15

17.5

Y*

20

22.5

Y*

25

27.5

30

Y*

(T)=1

263

2. Determine Fuzzy Sets: Temperature

October 2005

264

2. Determine Fuzzy Sets: Fan Speed

Rev/sec

(RPM)

October 2005

MINIMAL

SLOW

MEDIUM

FAST

BLAST

Y*

10

20

30

Y*

40

50

Y*

60

70

Y*

80

90

100

Y*

265

2. Determine Fuzzy Sets: Fan Speed

October 2005

266

3. Elicit and construct fuzzy rules

RULE 1:

RULE 2:

RULE 3:

RULE 4:

RULE 5:

October 2005

IF

IF

IF

IF

IF

temp is

temp is

temp is

temp is

temp is

cold

THEN

cool

THEN

pleasant THEN

warm THEN

hot

THEN

speed is minimal

speed is slow

speed is medium

speed is fast

speed is blast

267

3. Encode into an Expert System

4. Evaluate and tune the system

Consider a temperature of 16oC, use the system

to compute the optimal fan speed.

Operation of a Fuzzy Expert System

October 2005

Fuzzification

Inference

Composition

Defuzzification

268

Fuzzification

Affected fuzzy sets: COOL and PLEASANT

COOL(T) = T / 5 + 3.5

PLSNT(T) = T /2.5 - 6

= 16 /2.5 - 6

= 0.4

= 16 / 5 + 3.5

= 0.3

Temp=16 COLD

0

October 2005

COOL

PLEASANT

WARM

0.3

0.4

HOT

0

269

Inference

RULE 1:

RULE 2:

RULE 3:

RULE 4:

RULE 5:

October 2005

IF

IF

IF

IF

IF

temp is

temp is

temp is

temp is

temp is

cold

THEN

cool

THEN

pleasant THEN

warm THEN

hot

THEN

speed is minimal

speed is slow

speed is medium

speed is fast

speed is blast

270

Inference

THEN

October 2005

271

Composition

October 2005

272

Defuzzification

0.25(57.5)

0.125 + 0.25 + 0.3(11) + 0.4(5) + 0.25

= 45.54rpm

October 2005

273

Recap

Example: Air Conditioner

Example: Cart Pole Problem

Case Study: Building a Fuzzy Expert System

Summary

October 2005

274

M

The problem is to balance an upright pole, with a mass m at its

head and mass M at its base. A weightless shaft connects these

two masses. The base can be moved on a horizontal axis. The

task is to determine the FORCE (F) necessary to balance the pole.

The calculation of the force F involves the measurement of the

angle and the angular velocity, of the pole .

October 2005

275

nb

nm

nb

ns

az

ps

pb

nm

ps

pm

pb

pm

pb

pm

ns

nm

ns

ps

az

nb

ns

az

ps

ps

ns

ps

pm

nm

pb

nb

nm

ps: positive small,

pm: positive medium,

pm

ns

pb: positive big

IF

is negative medium and is approximately zero

THEN F is negative medium

October 2005

276

The fuzzy sets for , and F are based on the linear equation

(x)=ax + b, and are defined based on the following table:

if

if

if

October 2005

277

(a)

the fuzzy sets (nb, nm, ns, az, ps, pm, pb) for each ,

and F individually.

(b)

Consider the case when the input variables are: = 50, = -5.

Use the rule base, execute each of the four tasks to compute

the force F necessary to balance the pole using the Centre of

Gravity in the Defuzzification task.

October 2005

278

Fuzzification

i) Determine where and the angular velocity fall in the table

: pm, pb

az

ii) Formulate possible rules from linguistic values obtained

IF is pm AND is az THEN F is pm

IF is pb AND is az THEN F is pb

October 2005

279

Fuzzification

iii) Compute membership functions

1

1/22.5 = /17.5

: pm

0.78

22.5

45 50

67.5

45 50

67.5

: pb

1/22.5 = /5

0.22

45

50

67.5

: az

1/11.25 = /6.25

0.56

-11.25

October 2005

-5

10

280

Inference

1

IF is pm AND is az THEN F is pm

The two premises in RULE 1 are conjunctive

minimum of the two: min{0.78, 0.56}=0.56

IF is pb AND is az THEN F is pb

The two premises in RULE 2 are conjunctive

minimum of the two: min{0.22, 0.56}=0.22

October 2005

281

Composition

ps

pb

Defuzzification

SoG

C

October 2005

5.30

0.2 0.56 0.56 0.56 0.22 0.22

282

Recap

Example: Air Conditioner

Example: Cart Pole Problem

Case Study: Building a Fuzzy Expert System

Summary

October 2005

283

Expert System

Step 1: Specify the problem and define

linguistic variables

A service centre keeps spare parts and repairs failed ones. A customer

brings a failed item and receives a spare of the same type. Failed

parts are repaired, placed on the shelf, and thus become spares.

The objective is to advise a manager of the service centre on certain

decision policies to keep the customers satisfied.

There are four main linguistic variables: average waiting time (mean

delay) m, repair utilisation factor of the service centre , number of

servers s, and initial number of spare parts n.

October 2005

284

October 2005

285

Fuzzy sets can have a variety of shapes.

However, a triangle or a trapezoid can often

provide an adequate representation of the expert

knowledge, and at the same time, significantly

simplifies the process of computation.

October 2005

286

Degree of

Membership

1.0

0.8

VS

0.6

0.4

0.2

0.0

0

0.1

October 2005

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Mean Delay (normalised)

287

Degree of

Membership

1.0

0.8

0.6

0.4

0.2

0.0

0

0.1

October 2005

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Number of Servers (normalised)

288

Degree of

Membership

1.0

0.8

0.6

0.4

0.2

0.0

0

0.1

October 2005

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Repair Utilisation Factor

289

Degree of

Membership

1.0

0.8

VS

RS

RL

VL

0.6

0.4

0.2

0.0

0

0.1

October 2005

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Number of Spares (normalised)

290

To accomplish this task, we might ask the expert

to describe how the problem can be solved using

the fuzzy linguistic variables defined previously.

Required knowledge also can be collected from

other sources such as books, computer

databases, flow diagrams and observed human

behaviour.

October 2005

291

October 2005

292

October 2005

293

Rule Base 1

October 2005

294

Mamdani style

If pressure is high then volume is small

high

small

Sugeno style

If speed is medium then resistance = 5*speed

medium

resistance = 5*speed

By using fuzzy sets, we can formulate fuzzy if-then rules that are commonly

used in our daily expressions. Basically, we have two types of fuzzy rules.

For Mamdani style, for instance, if pressure is high then volume is small,

where high? and small are described by fuzzy sets

For Sugeno style, if the speed of a moving object is medium then the

resistance due to atmosphere is 5 times the speed. The basic difference

between these two rules is in their THEN part, where Madman style has a

fuzzy but Surgeon style has a linear equation. Madman style fuzzy rules

were first proposed in the literature; they are more appealing to human

intuition. Surgeon style fuzzy rules are proposed later, but they are more

suited for mathematical design and analysis.

In this, we concentrate on Surgeon style fuzzy if-then rules.

297

Graphics representation:

A1

B1

C1

w1

A2

B2

C2

w2

Z

T-norm

C

x is 4.5

y is 56.8

z is zCOA

If speed is low then resistance = 2

If speed is medium then resistance = 4*speed

If speed is high then resistance = 8*speed

MFs

low

medium

high

.8

.3

.1

2

Rule 1: w1 = .3; r1 = 2

Rule 2: w2 = .8; r2 = 4*2

Rule 3: w3 = .1; r3 = 8*2

Speed

Resistance = (wi*ri) /

= 7.12

wi

Rule base

If X is A2 and Y is B2 then Z = p2*x + q2*y + r2

Fuzzy reasoning

A1

B1

w1

X

A2

x=3

Y

B2

z1 =

p1*x+q1*y+r1

y=2

w2

z2 =

p2*x+q2*y+r2

z=

w1*z1+w2*z2

w1+w 2

Graphics representation:

A1

B1

C1

w1

A2

z1

B2

C2

w2

x is 4.5

y is 56.8

z2

T-norm

z=

w1*z1+w2*z2

w1+w2

Graphics representation:

A1

B1

C1

w1

A2

za

B2

zb

C2

w2

T-norm

zc

z=

x is 4.5

y is 56.8

zd

w1*z1+w2*z2

w1+w2

Z1={Za, Zb}

Z2={Zc, Zd}

- Inductive Logic 00 Hib Bu of tTransféré parUnness
- lua-51-referenceTransféré parapi-19778559
- Math SymbolsTransféré parHoang Giang
- 2009 - Fuzzy Logic Based XQuery Operations for Native XML Database SystemsTransféré parFranck Dernoncourt
- Badiou's MistakeTransféré parBart P.S.
- syllabusTransféré parगुंजन सिन्हा
- Argument for Impossibility of Willing CorruptionTransféré paramygraceleary
- LoQTransféré parQuaesty Quaest
- Introduction to Fuzzy LogicTransféré parregi1201
- [Ch 1] LogicTransféré parJoon Ko
- Article 5Transféré parIndah Fitriani
- PhiloTransféré parJamila Hidalgo
- Article - Delay ComputationTransféré parPameswara
- n-ValuedReﬁned Neutrosophic Soft Sets and its Applications in Decision MakingProblems and Medical DiagnosisTransféré parMia Amalia
- Annual Report ProjectTransféré parfareedh_meeran
- 301 portfolio slo rubricTransféré parapi-254071917
- Surround Systems Feather Optimization Through BebaviorTransféré parAnonymous 8erOuK4i
- argument writing rubricTransféré parapi-224225781
- Fuzzy Theory 1Transféré parHesbon Moriasi
- Plato%27s LogicTransféré parJennifer Snyder
- Prescriptive Language 1.2Transféré parPantatNyanehBurik
- Chapter 4 bps.pptxTransféré parPrem Kumar
- EM2013Transféré parhandoko poca
- A Note on Entailment - Georg-Henrik Von WrightTransféré parMarcela
- Raspberry.pi.&.Hacking.&.Computer.programming.languages P2PTransféré parCosma Dragos
- Proposal for the Formalization of Dialectical LogicTransféré parMia Amalia
- PhiloTransféré parFrinz Charles Casas
- Discrete MathTransféré parPatrisha Canalda
- mpcTransféré parSamantha Brown
- Liz Design 0Transféré parAnonymous 8erOuK4i

- Roaming PromosTransféré parseanyangg
- 1x36 Pin LcdertTransféré parsdfwe
- Impedance MatchingTransféré parMadhurya Alur
- gfx_3.3_best_practices.pdfTransféré parprofesorxii
- Print - Ambeent White Paper Tackling the WiFi WasteTransféré parMustafa Ergen
- Model cvTransféré parSaravanan Gsa
- Deep WebTransféré parCarlo reyes
- 1997-06 the Computer Paper - Ontario EditionTransféré parkafralal
- RICEFWTransféré pargsba6675
- Menu.xlsTransféré parmdelacua2
- Systems-Engineering Management PlanTransféré parlbillings1
- SAP BusinessObjectTransféré parVinod Bihal
- Avaya WFM Schedulers GuideTransféré parErin Kim
- CRP Basic Settings Part 1 - Work CenterTransféré parmahendranp_siva
- Linksmart Wireless Technology v. T-Mobile et. al.Transféré parPriorSmart
- Primavera Tutorial - Version - 6.0Transféré parPerwaiz
- As-400 a Very Rough GuideTransféré parPraveen Selvaraj
- UPD_5.5.0.12834_ReleaseNotesTransféré parWalter Burton
- 7QC toolsTransféré parRaiham Effendy
- CEE272R.pdfTransféré parUtc Chattanooga
- WEG MVW-01 (EtherNetIP) Communication With Rockwell RSLogix 5000Transféré parmacaco28
- Exploring IPv6Transféré parGeorge Benekos
- ITIL PPTTransféré parAziz Shaik
- Power Vault Md 3000 Support MatrixTransféré parالفتىالمصدوم
- EPMO Program Director Insurance in Chicago IL Resume Petar KovacevichTransféré parPetarKovacevich
- IP_SubnettingTransféré parAli Akhtar
- 38640707 BT4 WEP Cheat SheetTransféré parROTTWEILERPM
- Gameloft Job Application FormTransféré parĐoàn_nhân_1
- Implico Success Story Supergasbras en j09 4pager ScreenTransféré parMuhammad Nassr
- OFDMTransféré paranandbabugopathoti

## Bien plus que des documents.

Découvrez tout ce que Scribd a à offrir, dont les livres et les livres audio des principaux éditeurs.

Annulez à tout moment.