# 模糊逻辑

## 怎样应用模糊逻辑

```IF模糊变量IS模糊集合THEN动作
```

```IF温度IS非常冷 THEN停止风扇
IF温度IS冷THEN减速风扇
IF温度IS正常THEN保持现有水平
IF温度IS热THEN加速风扇
```

```NOT x = (1 - truth(x))
x AND y = minimum(truth(x),truth(y))
x OR y = maximum(truth(x),truth(y))
```

### 其他例子

• 如果一个人的高度是1.8米，把他考虑为高:
```IF male IS true AND height >= 1.8 THEN is_tall IS true
IF male IS true AND height >= 1.8 THEN is_short IS false
```
• 但上述的定義卻是不现实的。因此，在模糊规则下，在高和矮之间不做明显的区分:
```IF height >= medium male THEN is_short IS agree somehow
IF height >= medium male THEN is_tall IS agree somehow
```

```dwarf male = [0, 1.3] m
small male = (1.3, 1.5]
medium male = (1.5, 1.8]
tall male = (1.8, 2.0]
giant male > 2.0 m
```

```agree not = 0
agree little = 1
agree somehow = 2
agree alot = 3
agree fully = 4
```

```IF male >= agree somehow AND ...
```

## 參考文獻

• Earl Cox, The Fuzzy Systems Handbook(1994),ISBN 0-12-194270-8
• Constantin von Altrock, Fuzzy Logic and NeuroFuzzy Applications Explained(2002),ISBN 0-13-368465-2
• Frank Höppner, Frank Klawonn, Rudolf Kruse and Thomas Runkler, Fuzzy Cluster Analysis(1999),ISBN 0-471-98864-2
• George Klir and Tina Folger, Fuzzy Sets, Uncertainty, and Information(1988),ISBN 0-13-345984-5
• George Klir and Bo Yuan, Fuzzy Sets and Fuzzy Logic(1995)ISBN 0-13-101171-5
• Ronald Yager and Dimitar Filev, Essentials of Fuzzy Modeling and Control(1994),ISBN 0-471-01761-2