32
Fuzzy Logic

Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Embed Size (px)

Citation preview

Page 1: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Fuzzy Logic

Page 2: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Conception

Introduced by Lotfi Zadeh in 1960s at BerkleyWanted to expand crisp logic

Page 3: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Why Fozzy?

Real world not BooleanUncertainty of natural language

Page 4: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Set Theory

Page 5: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Degrees of truth

Page 6: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Set Theory

Crisp vs. Fuzzy Venn Diagrams for Complements

using Membership Functions

Page 7: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Set Theory

CrispComplement is negationLogical AND: A /\ B is intersection of sets A and BLogical OR: A \/ B is union of sets A and B

FuzzyComplement is mS(x) – 1Intersect (/\) is given by MIN operationUnion (\/) is given by MAX operation

Page 8: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Fuzzy Relations

Ordered pairs showing connection between two setsRelations are sets themselvesExpressed as matrices

Page 9: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Fuzzy Relations

Value of the membership function, mR(x, y), for an element (x, y) of the relation R is the value at row x and column y in the relational matrix Shows degree of correspondence between x-qualities (color) and y-qualities (ripeness)

Page 10: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Fuzzy Relations Matrices

Color – ripeness relation for tomatoes

Page 11: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Fuzzy Relations Matrices

Ripeness - taste relation for tomatoes

Page 12: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Fuzzy Relations Matrices

Color - taste relation for tomatoes

Page 13: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Matrix OperationsDot-product (or MAX-MIN composition): MAX( MIN( mR1(x, y), mR2(y, z) ) )

Cross product (or MAX-PROD):MAX( mR1(x, y) * mR2(y, z) )

MAX-AVE composition:½ * MAX( mR1(x, y) + mR2(y, z) ).

Page 14: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Fuzzy Inference

Modus PonensCrisp: A => B (~A \/ B)Fuzzy: use membership functionsA = mA(x),

AC = 1 – mA(x),

B = mB(y).

Page 15: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Fuzzy Modus Ponens

“OR” == “MAX” in fuzzy logicA => B is equivalent to MAX( 1 – mA(x), mB(y) ).

A => B if and only if mA(x) >= mB(y). (Implication Rule—premise must be larger than or equal to the conclusion)

Page 16: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Calculating Relational Matrices

The most popular methods are:MIN implication:mA=>B(x, y) = MIN( mA(x), mB(y) )

And Product implication:mA=>B(x, y) = mA(x) * mB(y)

This is how the matricies are calculated

Page 17: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Defuzzification

There are two Fuzzy Set types:Normal: maximal degree of belonging cannot be greater than 1 (typically the set of input variables)Not-normal: maximal degree of belonging can be greater than 1 (typically the set of output variables)

Page 18: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Defuzzification

Page 19: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Fuzzification

To use fuzzy logic: creating inputCrisp input is first transformed into a vector of membership degrees through the process of fuzzificationInput typically forms a normal fuzzy set since it is derived from a crisp set

Page 20: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Defezzification

After fuzzy inputs are processed, often the outputs are Not-normal fuzzy sets In practical uses a decision maker needs a crisp output signal a procedure for transforming the fuzzy output value into a crisp output value is necessary

Page 21: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Defuzzification

Transformation from fuzzy output back to crisp output is called defuzzificationThere are multiple methods of defuzzification in use today, each with its own advantages.

Page 22: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Defuzzification

Page 23: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Defuzzification

Fastest method:first-of-maxima method Smoother: center-of-area Most practical: center-of-area for singletons (faster and simpler than center-of-area method, though not as smooth)

Page 24: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Real Applications: Some Guy

I am choosing to conduct a research project on the Sendai subway, in particular its fuzzy control operation. I have been a fan of subway systems since the mid 1970's when I was only three or four years old. My first subway experience was the Tokyo subway, when I visited with my family in 1974 (I was only two years old then). Since then I have been on systems as diverse as London, Paris, Berlin, Munich, Moscow, San Francisco, and St. Louis (Missouri). [from internet research paper, really]

Page 25: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

The Sendai Subway

Application of fuzzy logic; Sendai, Japan

Page 26: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Sendai Subway Development

The subway in Sendai, Japan uses a fuzzy logic control system developed by Serji Yasunobu of Hitachi.It took 8 years to complete and was finally put into use in 1987.

Page 27: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Control System

Based on rules of logic obtained from train drivers so as to model real human decisions as closely as possible Controls the speed at which the train takes curves as well as the acceleration and braking systems of the train

Page 28: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Capabilities

Capable of determining:Rate of acceleration given a target speedDeciding and maintaining a target speedStopping accurately at a target position

Page 29: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Intelligent Control System

Adopted because it makes qualitative decisions, based on membership functions for variable dataDecides from a set of control rules what actions to take Useful in representing degrees of state, such as “high” or “slightly high”

Page 30: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

This system is still not perfect; humans can do better because they can make decisions based on previous experience and anticipate the effects of their decisions This led to…

Page 31: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

Predictive Fuzzy Control

Can assess the results of a decision and determine if the action should be takenHas model of the motor and break to predict the next state of speed, stopping point, and running time input variablesController selects the best action based on the predicted states.

Page 32: Fuzzy Logic Conception Introduced by Lotfi Zadeh in 1960s at Berkley Wanted to expand crisp logic

The results of the fuzzy logic controller for the Sendai subway are excellent!!The train movement is smoother than most other trains Even the skilled human operators who sometimes run the train cannot beat the automated system in terms of smoothness or accuracy of stopping