35
Fuzzy expert systems 30 October 2014 MMFS 5013 Intelligent Manufacturing 1 Boolean logic, Fuzzy logic MMFS 5013 Intelligent Manufacturing 2

Fuzzy System

Embed Size (px)

DESCRIPTION

notes about fuzzy logic

Citation preview

Page 1: Fuzzy System

Fuzzy expert systems

30 October 2014

MMFS 5013 Intelligent Manufacturing 1

Boolean logic, Fuzzy logic

MMFS 5013 Intelligent Manufacturing 2

Page 2: Fuzzy System

Fuzzy Sets

A generalization of an ordinary set by allowing a degree of membership for each element. Fuzzy set is represented in the format <element>/<degree>. The membership function of a set maps each element to its degree. The membership degree is represented in the format (0 degree 1), which means plausibility.

3 MMFS 5013 Intelligent Manufacturing

Crisp, Fuzzy

MMFS 5013 Intelligent Manufacturing 4

Page 3: Fuzzy System

Crisp, Fuzzy

MMFS 5013 Intelligent Manufacturing 5

Fuzzy sets

Crisp set of : o Characteristic function,

o

Fuzzy set of : Membership function,

MMFS 5013 Intelligent Manufacturing 6

Page 4: Fuzzy System

Crisp, Fuzzy

MMFS 5013 Intelligent Manufacturing 7

Crisp, Fuzzy subset

If is the reference super set and is a subset of if, and only if (iff),

MMFS 5013 Intelligent Manufacturing 8

Page 5: Fuzzy System

Linguistic variables and hedges

A linguistic variable is a fuzzy variable. Kak Mah

Kak Mah: linguistic variable Beautiful: linguistic value Linguistic variables and values are used in fuzzy rules.

MMFS 5013 Intelligent Manufacturing 9

Fuzzy rules

MMFS 5013 Intelligent Manufacturing 10

Page 6: Fuzzy System

Hedges

MMFS 5013 Intelligent Manufacturing 11

MMFS 5013 Intelligent Manufacturing 12

Page 7: Fuzzy System

Mathematical expression for hedges

MMFS 5013 Intelligent Manufacturing 13

Representation of hedges

MMFS 5013 Intelligent Manufacturing 14

Page 8: Fuzzy System

Example 1: Fuzzy sets

Universe U = set of five specific men {Hishammuddin (52), Tok Janggut Bomoh Tauhid (74), Ahmad Jauhari Yahya (59), Bomoh Warisan (54), Kapten Zaharie (53)} = {a, b, c, d, e} Fuzzy set Fuzzy set

15 MMFS 5013 Intelligent Manufacturing

Example 2: Membership function Membership function function of age, .

16

Age Youngness

1 1.00

25 1.00

30 0.50

40 0.10

50 0.00

65 0.00

70 0.00

MMFS 5013 Intelligent Manufacturing

Page 9: Fuzzy System

Fuzzy sets relation

Equality: iff for Subset: iff for Fuzzy support: The support of fuzzy set A is the crisp set of every element in for which

in Support of If Then support

17 MMFS 5013 Intelligent Manufacturing

Fuzzy Sets Relation

Fuzzy singleton: A fuzzy set whose support is a set of a single element . If Then is a fuzzy singleton since its support is

.

18 MMFS 5013 Intelligent Manufacturing

Page 10: Fuzzy System

Operations of fuzzy sets

Union:

Intersection:

Complement:

19 MMFS 5013 Intelligent Manufacturing

Operations of fuzzy sets

MMFS 5013 Intelligent Manufacturing 20

Page 11: Fuzzy System

Example 3: Operation

Membership function to be young and old and their union and intersection.

21

x (Age) y (Young) z (Old) Union Intersection

1 1.00 0.00 1.00 0.00

25 1.00 0.0 1.00 0.00

30 0.50 0.0 0.50 0.00

40 0.10 0.2 0.20 0.10

50 0.00 0.6 0.60 0.00

60 0.00 0.8 0.80 0.00

65 0.00 1.0 1.00 0.00

70 0.00 1.0 1.00 0.00

MMFS 5013 Intelligent Manufacturing

Union of singletons

The union of its constituent singletons:

If is finite: where

If is continuous:

22 MMFS 5013 Intelligent Manufacturing

Page 12: Fuzzy System

Unique Operations

Concentration: , where . Reduction of membership function.

23 MMFS 5013 Intelligent Manufacturing

24

Age Youngness Oldness 1 1.00 0.00

25 1.00 0.00 30 0.50 0.00 40 0.10 0.20 50 0.00 0.60 60 0.00 0.80 65 0.00 1.00 70 0.00 1.00

CON(Youngness) CON(Oldness) 1.00 0.00 1.00 0.00 0.25 0.00 0.01 0.04 0.00 0.36 0.00 0.64 0.00 1.00 0.00 1.00

MMFS 5013 Intelligent Manufacturing

Page 13: Fuzzy System

Unique Operations

Dilation:

Increment of membership function.

25 MMFS 5013 Intelligent Manufacturing

26

Age Youngness Oldness 1 1.00 0.00

25 1.00 0.00 30 0.50 0.00 40 0.10 0.20 50 0.00 0.60 60 0.00 0.80 65 0.00 1.00 70 0.00 1.00

DIL(Youngness) DIL(Oldness) 1.00 0.00 1.00 0.00 0.71 0.00 0.32 0.45 0.00 0.77 0.00 0.89 0.00 1.00 0.00 1.00

MMFS 5013 Intelligent Manufacturing

Page 14: Fuzzy System

Fuzzy rules

A fuzzy rule can be defined as a conditional statement in the form:

MMFS 5013 Intelligent Manufacturing 27

The difference between classical and fuzzy rules

MMFS 5013 Intelligent Manufacturing 28

Page 15: Fuzzy System

To reason with fuzzy rules

MMFS 5013 Intelligent Manufacturing 29

To reason with fuzzy rules

MMFS 5013 Intelligent Manufacturing 30

Page 16: Fuzzy System

The antecedent of a fuzzy rule with multiple parts

MMFS 5013 Intelligent Manufacturing 31

The consequent of a fuzzy rule with multiple parts

MMFS 5013 Intelligent Manufacturing 32

Page 17: Fuzzy System

Fuzzy inference

Mamdani-style Sugeno-style

MMFS 5013 Intelligent Manufacturing 33

Mamdani-style

fuzzification of the input variables rule evaluation aggregation of the rule outputs defuzzification

MMFS 5013 Intelligent Manufacturing 34

Page 18: Fuzzy System

Mamdani-style

MMFS 5013 Intelligent Manufacturing 35

MMFS 5013 Intelligent Manufacturing 36

Page 19: Fuzzy System

MMFS 5013 Intelligent Manufacturing 37

MMFS 5013 Intelligent Manufacturing 38

Page 20: Fuzzy System

Rule evaluation

MMFS 5013 Intelligent Manufacturing 39

MMFS 5013 Intelligent Manufacturing 40

Page 21: Fuzzy System

Defuzzification

MMFS 5013 Intelligent Manufacturing 41

Defuzzification

MMFS 5013 Intelligent Manufacturing 42

Page 22: Fuzzy System

MMFS 5013 Intelligent Manufacturing 43

Sugeno-style

Use a single spike, a singleton, as the membership function of the rule consequent. Use a mathematical function of the input variable. Use weighted average (WA) of all the singletons.

MMFS 5013 Intelligent Manufacturing 44

Page 23: Fuzzy System

MMFS 5013 Intelligent Manufacturing 45

MMFS 5013 Intelligent Manufacturing 46

Page 24: Fuzzy System

MMFS 5013 Intelligent Manufacturing 47

MMFS 5013 Intelligent Manufacturing 48

Page 25: Fuzzy System

Mamdani versus Sugeno

Mamdani: For capturing expert knowledge Mamdani: Describes the expertise in more intuitive, more human-like manner Mamdani: Fuzzy inference, computational burden Sugeno: Computationally effective and works well with optimization and adaptive techniques Sugeno: Control problems, particularly for dynamic nonlinear systems

MMFS 5013 Intelligent Manufacturing 49

Building a fuzzy expert system

Specify the problem and define linguistic variables. Determine fuzzy sets. Produce and construct fuzzy rules. Encode the fuzzy sets, fuzzy rules and procedures to perform fuzzy inference into the expert system. Evaluate and tune the system.

MMFS 5013 Intelligent Manufacturing 50

Page 26: Fuzzy System

Operating a service center of spare parts

There are four linguistic variables: o average waiting time, . o repair utilization factor of the service

center, . o number of servers, . o initial number of spare parts, .

MMFS 5013 Intelligent Manufacturing 51

inputs

output

Operating a service center of spare parts

The objectives are to: o keep as high as possible. o reduce by increasing and .

MMFS 5013 Intelligent Manufacturing 52

Page 27: Fuzzy System

Operating a service center of spare parts

MMFS 5013 Intelligent Manufacturing 53

MMFS 5013 Intelligent Manufacturing 54

Page 28: Fuzzy System

MMFS 5013 Intelligent Manufacturing 55

MMFS 5013 Intelligent Manufacturing 56

Page 29: Fuzzy System

MMFS 5013 Intelligent Manufacturing 57

Fuzzy rules

2 input, 1 output schema: 3 inputs, 1 output schema: cube

rules rules

Add more

MMFS 5013 Intelligent Manufacturing 58

Page 30: Fuzzy System

MMFS 5013 Intelligent Manufacturing 59

MMFS 5013 Intelligent Manufacturing 60

Page 31: Fuzzy System

MMFS 5013 Intelligent Manufacturing 61

MMFS 5013 Intelligent Manufacturing 62

The objectives are to: o keep as high as possible. o reduce by increasing and .

Page 32: Fuzzy System

MMFS 5013 Intelligent Manufacturing 63

Example: Dinner for two

MMFS 5013 Intelligent Manufacturing 64

Page 33: Fuzzy System

Fuzzy inputs

MMFS 5013 Intelligent Manufacturing 65

Apply fuzzy operator

MMFS 5013 Intelligent Manufacturing 66

Page 34: Fuzzy System

Apply implication

MMFS 5013 Intelligent Manufacturing 67

Aggregate all outputs

MMFS 5013 Intelligent Manufacturing 68

Page 35: Fuzzy System

Defuzzification

MMFS 5013 Intelligent Manufacturing 69

References 1) Michael Negnevitsky (2005). Artificial Intelligence: A

Guide to Intelligent Systems, 2th Edition, China: Addison Wesley.

2) Toshinori Munakata (2008). Fundamentals of New Artificial Intelligence, 2nd Edition, Springer, ISBN: 978-1-84628-838-8.

3) M. Tim Jones (2008). Artificial Intelligence: A System Approach, Infinity Science Press, ISBN: 978-0-9778582-3-1

4) Lotfi A. Zadeh original papers (1965, 1973, 1976). 5) Dinner for two, reprise. http://www-

rohan.sdsu.edu/doc/matlab/toolbox/fuzzy/fuzzytu7.html

70 MMFS 5013 Intelligent Manufacturing