You are on page 1of 35

Fuzzy expert systems

30 October 2014

MMFS 5013 Intelligent Manufacturing

Boolean logic, Fuzzy logic

MMFS 5013 Intelligent Manufacturing

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 d degree d 1), which means
plausibility.
MMFS 5013 Intelligent Manufacturing

Crisp, Fuzzy

MMFS 5013 Intelligent Manufacturing

Crisp, Fuzzy

MMFS 5013 Intelligent Manufacturing

Fuzzy sets
Crisp set of :
o Characteristic function,

o

Fuzzy set of :
Membership function,





MMFS 5013 Intelligent Manufacturing

Crisp, Fuzzy

MMFS 5013 Intelligent Manufacturing

Crisp, Fuzzy subset


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

MMFS 5013 Intelligent Manufacturing

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

Fuzzy rules

MMFS 5013 Intelligent Manufacturing

10

Hedges

MMFS 5013 Intelligent Manufacturing

11

s

MMFS 5013 Intelligent Manufacturing

12

Mathematical expression for hedges

MMFS 5013 Intelligent Manufacturing

13

Representation of hedges

MMFS 5013 Intelligent Manufacturing

14

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 


MMFS 5013 Intelligent Manufacturing

15

Example 2: Membership function


Membership function 
function of age, .
Age

Youngness

1.00

25

1.00

30

0.50

40

0.10

50

0.00

65

0.00

70

0.00

MMFS 5013 Intelligent Manufacturing



16

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
MMFS 5013 Intelligent Manufacturing

17

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
.

MMFS 5013 Intelligent Manufacturing

18

Operations of fuzzy sets


Union:

Intersection:

Complement:

MMFS 5013 Intelligent Manufacturing

19

Operations of fuzzy sets

MMFS 5013 Intelligent Manufacturing

20

Example 3: Operation
Membership function to be young and old and
their union and intersection.
x (Age)

y (Young)

z (Old)

Union

Intersection

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

21

Union of singletons
The union of its constituent singletons:

If is finite: where

If is continuous:

MMFS 5013 Intelligent Manufacturing

22

Unique Operations
Concentration:  ,
where .
Reduction of membership function.

MMFS 5013 Intelligent Manufacturing

Age
1
25
30
40
50
60
65
70

23

Youngness Oldness CON(Youngness) CON(Oldness)


1.00
0.00
1.00
0.00
1.00
0.00
1.00
0.00
0.50
0.00
0.25
0.00
0.10
0.20
0.01
0.04
0.00
0.60
0.00
0.36
0.00
0.80
0.00
0.64
0.00
1.00
0.00
1.00
0.00
1.00
0.00
1.00

MMFS 5013 Intelligent Manufacturing

24

Unique Operations
Dilation:  
Increment of membership function.

MMFS 5013 Intelligent Manufacturing

Age
1
25
30
40
50
60
65
70

25

Youngness Oldness DIL(Youngness) DIL(Oldness)


1.00
0.00
1.00
0.00
1.00
0.00
1.00
0.00
0.50
0.00
0.71
0.00
0.10
0.20
0.32
0.45
0.00
0.60
0.00
0.77
0.00
0.80
0.00
0.89
0.00
1.00
0.00
1.00
0.00
1.00
0.00
1.00

MMFS 5013 Intelligent Manufacturing

26

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

To reason with fuzzy rules

MMFS 5013 Intelligent Manufacturing

29

To reason with fuzzy rules

MMFS 5013 Intelligent Manufacturing

30

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

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

Mamdani-style

MMFS 5013 Intelligent Manufacturing

35

MMFS 5013 Intelligent Manufacturing

36

MMFS 5013 Intelligent Manufacturing

37

MMFS 5013 Intelligent Manufacturing

38

Rule evaluation

MMFS 5013 Intelligent Manufacturing

39

MMFS 5013 Intelligent Manufacturing

40

Defuzzification

MMFS 5013 Intelligent Manufacturing

41

Defuzzification

MMFS 5013 Intelligent Manufacturing

42

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

MMFS 5013 Intelligent Manufacturing

45

MMFS 5013 Intelligent Manufacturing

46

MMFS 5013 Intelligent Manufacturing

47

MMFS 5013 Intelligent Manufacturing

48

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

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, . output

inputs

MMFS 5013 Intelligent Manufacturing

51

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

Operating a service center of spare


parts

MMFS 5013 Intelligent Manufacturing

53

MMFS 5013 Intelligent Manufacturing

54

MMFS 5013 Intelligent Manufacturing

55

MMFS 5013 Intelligent Manufacturing

56

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

MMFS 5013 Intelligent Manufacturing

59

MMFS 5013 Intelligent Manufacturing

60

MMFS 5013 Intelligent Manufacturing

61

The objectives are to:


o keep as high as possible.
o reduce by increasing and .

MMFS 5013 Intelligent Manufacturing

62

MMFS 5013 Intelligent Manufacturing

63

Example: Dinner for two

MMFS 5013 Intelligent Manufacturing

64

Fuzzy inputs

MMFS 5013 Intelligent Manufacturing

65

Apply fuzzy operator

MMFS 5013 Intelligent Manufacturing

66

Apply implication

MMFS 5013 Intelligent Manufacturing

67

Aggregate all outputs

MMFS 5013 Intelligent Manufacturing

68

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-184628-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://wwwrohan.sdsu.edu/doc/matlab/toolbox/fuzzy/fuzzytu7.html

MMFS 5013 Intelligent Manufacturing

70

You might also like