Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific...

95
Chapter 7 Fuzzy Systems Concepts and Paradigms

Transcript of Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific...

Page 1: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Chapter 7Fuzzy Systems Concepts and

Paradigms

Page 2: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

“Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans unaccompanied by the discipline of hard work.”

R. E. Kalman, 1972

Page 3: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Logic History: Buddha vs. Aristotle

Should fuzzy logic history start with Gautama Buddha (b. 563 BC)?•Shades of gray•Contradictions and paradoxes•x is not-x

Aristotle (b. ~350 BC)•Crisp logic•1 or 0•True or false

Aristotle has dominated Western thought for >2,000 years

Probability overlays logic•Axioms derived from assumptions•Math and science built on logic

Page 4: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Jan Lukasiewicz

*First paper on 3-valued logic in 1920

* Described many-valued logic in 1923 book> Wrote of a “bundle of many-valued logics” and said, “Symbols

other than 0 and 1...would thus correspond to the various degrees of truth...”

> Established that each theorem of 3-valued logic is alsoa theorem of 2-valued logic

* Others (including Godel and von Neumann) also developedmulti-valued logics

Page 5: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Max Black

•Worked at Cornell

* Recognized that a continuum implies vagueness, and that vaguenesshas degrees

* Assigned numbers to objects based on the degree to which it wasperceived to belong to the class

* “Degree” was defined as the percent of people who would assignthe object to the class or category

* Membership was thus linked with probability...a different concept than is used now

Page 6: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Early Computer Deficiencies It almost immediately turned out, however, that computers did not live up to expectations. … These “brilliant” machines weren’t very good at solving real problems, problems having to do with real people and real business, and things with moving parts. It seemed that no matter how many variables were added to the decision process, there was always something else. Systems didn’t work the same when they were hot, or cold, or stressed, or dirty, or cranky, or in the light or in the dark, or when two things went wrong at the same time. There was always something else. The problem was that the computer was unable to make accurate inferences. It couldn’t very well tell what would happen, given some preconditions, no matter how precisely specified they were.

Page 7: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Early Computer Deficiencies, Continued

So, early computers:

•Had trouble solving “real-world” problems

•Computer always seemed to need more information

•Couldn’t handle unexpected conditions (brittle) or multiple faults

•Major problem: inability to make accurate inferences

Page 8: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Lotfi Zadeh •The single most significant developer and champion of fuzzy logic

theory and applications

•Born in Baku in Soviet Azerbaijan in 1921

•MSEE MIT 1946, Ph.D. Columbia 1949, moved to Cal. Berkeley in 1959

•Significant contributions to field of systems theory

•Text on linear systems theory in 1963

Page 9: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Lotfi Zadeh, Cont’d.. • “Fuzzy Sets” paper published in 1965

• Comprehensive - contains everything needed to implement FL

• Key concept is that of membership values: extent to which an object meets vague or imprecise properties

• Membership function: membership values over domain of interest

• Fuzzy set operations

• Endured criticism with grace

• Awarded the IEEE Medal of Honor in 1995

Page 10: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Ebrahim Mamdani

•First fuzzy control system, work done in 1973 with Assilian (1975)

•Developed for boiler-engine steam plant

•24 fuzzy rules

•Developed in a few days

•Laboratory-based

•Served as proof-of-concept

Page 11: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Early European Researchers

Hans Zimmerman, Univ. of Aachen•Founded first European FL working group in 1975•First Editor of Fuzzy Sets and Systems•First President of Int’l. Fuzzy Systems Association

Didier Dubois and Henri Prade in France•Charter members of European working group•Developed families of operators•Co-authored a textbook (1980)

Page 12: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Early U. S. Researchers K. S. Fu (Purdue) and Azriel Rosenfeld (U. Md.) (1965-75)•Encouraged students•Worked during FL’s “unpopular” period

Enrique Ruspini at SRI•Theoretical FL foundations•Developed fuzzy clustering•Chaired 2nd Fuzz/IEEE Conference in 1993

James Bezdek, Univ. of West Florida•Developed fuzzy pattern recognition algorithms•Proved fuzzy c-means clustering algorithm•Combined fuzzy logic and neural networks•Chaired 1st Fuzz/IEEE Conf. in 1992 and others•President of IEEE NNC 1997-1999

Page 13: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Holmblad and Ostergaard

•First industrial application late 1970s in Denmark

•Control system for cement kiln

•Similar systems in Sweden and elsewhere

Page 14: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

The Dark Age •Lasted most of 1980s

•Funding dried up, in US especially

•As recently as 1991, “...Fuzzy logic is based on fuzzy thinking. It fails to

distinguishbetween the issues specifically addressed by the

traditional methods of logic, definition and statistical decision-making...”

- J. Konieki (1991) in AI Expert

•Symbolics ruled: “fuzzy” label amounted to the ‘kiss of death’

• In Japan, however, faaji was welcomed and implemented

Page 15: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Michio Sugeno

•Secretary of Terano’s FL working group, est. in 1972

•1974 Ph.D. dissertation: fuzzy measures theory

•Worked with Mamdani in UK

•First commercial application of FL in Japan: control system for water purification plant (1983)

Page 16: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Other Japanese Developements

•1st consumer product: shower head using FL circuitry to control temperature (1987)

•Fuzzy control system for Sendai subway (1987)

•2d annual IFSA conference in Tokyo was turning point for FL (1987)

•Laboratory for Int’l. Fuzzy Engineering Research (LIFE) founded in Yokohama with Terano as Director, Sugeno as Leading Advisor in 1989.

Page 17: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Systems Theory and Paradigms

* Variation on 2-valued logic that makes analysis and control of real(non-linear) systems possible

* Crisp “first order” logic is insufficient for many applications becausealmost all human reasoning is imprecise

* We will discuss fuzzy sets, approximate reasoning, and fuzzy logicissues and applications

Page 18: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy versus Crisp

•Fuzzy logic comprises fuzzy sets and approximate reasoning

* A fuzzy “fact” is any assertion or piece of information, and can havea “degree of truth”, usually a value between 0 and 1

* Fuzziness: “A type of imprecision which is associated with ... classesin which there is no sharp transition from membership to non-membership” - Zadeh (1970)

Page 19: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzziness is not probability

• Probability is used, for example, in weather forecasting

• Probability is a number between 0 and 1 that is the certainty that anevent will occur

• The event occurrence is usually 0 or 1 in crisp logic, but fuzzinesssays that it happens to some degree

• Fuzziness is more than probability; probability is a subset of fuzziness

• Probability is only valid for future/unknown events

• Fuzzy set membership continues after the event

Page 20: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Probability

* Probability is based on a closed world model in which it isassumed that everything is known

•Probability is based on frequency; Bayesian on subjectivity

•Probability requires independence of variables

•In probability, absence of a fact implies knowledge

•Probability goes away once the event is observed

If you have everything you need to develop a probabilistic system,do so...it may be the best approach.

Page 21: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Logic

• FL is not based on a closed world model (we don’t assumeeverything is known)

• FL (& crisp logic) state objective descriptions/measures

• FL does not require statistical independence of variables

• In FL, the absence of a fact doesn’t imply anything

• A FL membership value persists after observation

The more complex a system is, the more it involves intelligentbehavior, the more likely it is that fuzzy logic will providea good approach.

Page 22: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

A Pair of Bottles for the Weary TravelerA Pair of Bottles for the Weary Traveler(from Bezdek)(from Bezdek)

Potable (drinkable)

Page 23: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

The Pair of Bottles Unmasked(from Bezdek)

Page 24: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Crisp Logic Venn Diagrams

A point is either in the set or not; it’s either in the intersection or not.

Page 25: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Set Membership In fuzzy logic, set membership occurs by degree

Set membership values are between 0 and 1

Consider the set tall American male professional basketball players (TAMPBP) Shaquille O’Neal (7’ 1”), and Travis Best (5’ 11”)

We might assign TAMPBP = 1.0/O’Neal, 0.1 Best

What about Reggie Miller, who is 6” 7”? Perhaps he is a 0.6 member.

We can now reason by degree, and apply logical operations to fuzzy sets

We usually write

or, the membership value of x in the fuzzy set A is m, where

mxA )(

10 m

Page 26: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Set Membership Functions

* Fuzzy sets have “shapes”: the membership values plotted versusthe variable

* Fuzzy membership function: the shape of the fuzzy set over therange of the numeric variable> Can be any shape, including arbitrary or irregular> Is normalized to values between 0 and 1> Often uses triangular approximations to save computation time

Page 27: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Sets Are Membership Fuzzy Sets Are Membership FunctionsFunctions

from Bezdek

Page 28: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Representations of Membership Functions

90

0

80

5.

70

1

60

5.

50

0

15.2

1

95.1

50.

75.1

0

Warm

TAMPBP

50/80_

2 pPRICEFAIR ep

Page 29: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Two Types of Fuzzy Membership Two Types of Fuzzy Membership FunctionFunction

Page 30: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Linguistic Variables

* Linguistic variable: “a variable whose values are words or sentences in a natural or artificial language.” – Zadeh

* Linguistic variables translate ordinary language into logicalor numerical statements

* Imprecision of linguistic variables makes them useful forreasoning

Page 31: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Linguistic Variable Categories

•Quantification terms: all, most, many, about one-fourth, some

•Usuality terms: always, sometimes, seldom, never

•Likelihood terms: certain, likely, possible, certainly not

Page 32: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Hedges

* Linguistic variables (LVs) can modify or qualify one another* Hedges: LVs that change the shape or position of

a membership function* “Very” and “sort of” are examples that can shift membership

functions in opposite directions (i.e., tall), or can changethe membership function width (i.e., medium).

Page 33: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Kinds of Hedges

* Intensify a fuzzy set (very, extremely)

* Dilute a fuzzy set (somewhat, sort of)

* Express probabilities (probably, not likely)

* Approximate a scalar or single number (exactly)

* Express vague quantities (most, seldom)

Page 34: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Implementing Hedges

* “Very” can be the mathematical square(.5 tall --> .25 very tall)

* “Somewhat” can be the square root(.81 tall --> .90 somewhat tall)

* Other conventions are possible

Page 35: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Approximate Reasoning * Fuzzy reasoning involves different processes than binary logic* Relations and operators have similar names (AND, OR, etc.) but

have different meanings* In Aristotlian logic:

Law of Noncontradiction: A A null setC (intersection same as ‘and’)

This law means “A” can’t simultaneously be true and false.

Law of Excluded Middle: A A universal setC

(union same as ‘or’)This law means “A” must be either true or false.

* Neither law holds in (is relevant to) fuzzy logic

Page 36: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Equality of Fuzzy Sets

* In traditional logic, sets containing the same members are equal:{A,B,C} = {A,B,C}

* In fuzzy logic, however, two sets are equal if and only if allelements have identical membership values:

{.1/A,.6/B,.8C} = {.1/A,.6/B,.8/C}

Page 37: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Containment

* In traditional logic, A B if and only if all elements in A are also in B.

* In fuzzy logic, containment means that the membership valuesfor each element in a subset is less than or equal to themembership value of the corresponding element in thesuperset.

* Adding a hedge can create a subset or superset.

Page 38: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Complement

* In traditional logic, the complement of a set is all of theelements not in the set.

* In fuzzy logic, the value of the complement of a membershipis (1 - membership_value)

Remember that the law of the excluded middle doesn’t hold!

“Reality flourishes on ambiguity.” – L. Zadeh

Page 39: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Intersection

* In standard logic, the intersection of two sets contains those elements in both sets.

* In fuzzy logic, the weakest element determines the degreeof membership in the intersection

If m x and m x then m xA B A B 05 03 03. . .

(Law of Noncontradiction does not hold)

Page 40: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Union

* In traditional logic, all elements in either (or both) set(s)are included

* In fuzzy logic, union is the maximum set membership value

If m x and m x then m xA B A B 07 09 09. . .

Page 41: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Summary of Fuzzy Relations and Summary of Fuzzy Relations and OperatorsOperators

Page 42: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Alternative Fuzzy Operators

•Operators other than those defined above can be used.

* For example, intersection can be defined as the product of the membership values, and union can be the sums of themembership values.

If m x and m x then

m x and m x

A B

A B A B

05 03

015 08

. .

. .

Page 43: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Compensatory OperatorsCompensatory Operators These are alternatives to Zadeh’s operators.

Consider the membership values .9, .8, .6, .1; the Zadeh AND (intersection) is .1, which may be a little too extreme for these values

Mean Operator: Intersection is defined as the average (mean) of the membership values. For the above values, the mean operator gives 0.6 as the intersection (AND) value.

We implement the mean operator in our software, in addition to the traditional Zadeh operators.

Page 44: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Compensatory Operators, Cont’d.

Gamma Operator:

m

ii

m

iigamma

1

)1(

111

where 10 ,and m is the number of fuzzy membership values.

8.0)( and,3.0)(,3.0 21 xx , then 352.0),( 21

.

If

Page 45: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Rules

Have antecedent part and consequent part

Mamdani-type fuzzy rule:If X1 is A1 and ... and Xn is An then Y is Bj

TSK-type fuzzy rule:If X1 is A1 and ... and Xn is An then Y = p0 + p1 X1 + ... + pn Xn

The default type of rule we use is the Mamdani type.

Page 46: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzification

Fuzzification is the combining of the antecedent sets (the if- side of the rule)

We use a gas flow regulator for a furnace as an example.•Input parameters: indoor temp., outdoor temp., 5-min. delta temp.•Output parameter: change in gas flow

Page 47: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Set Definition Now we must define the fuzzy sets over each parameter. We decide to use triangular membership functions.

First decide how many sets per parameter, then decide range for each:

For the InTemp parameter, we define three fuzzy sets: cool, comfortable, and too_warm.

For OutTemp, we have five fuzzy sets defined: very_cold, chilly, warm, very_warm, and hot. For DeltaInTemp, we define five fuzzy sets: large_negative, small_negative, near_zero, small_positive, and large_postive.

For our output parameter FlowChange, we define five fuzzy sets: decrease_greatly, decrease_small, no_change, increase_small, and increase_greatly.

Number of membership functions for a parameter depends on the situation.

Page 48: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Define the Rule Set Possible rules:

Rule 1: If InTemp is comfortable and DeltaInTemp is near_zero, then FlowChange is no_change.

Rule 2: If OutTemp is chilly and DeltaInTemp is small_negative, then FlowChange is increase_small.

Rule 3: If InTemp is too_warm and DeltaInTemp is large _positive, then FlowChange is decrease_greatly.

Rule 4: If InTemp is cool and DeltaInTemp is near_zero, then FlowChange is increase_small.

…and so on.

Page 49: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Define the Membership Functions

(We define only those we need for our example rules.)For inside temperature (intemp):

70

0

60

1

50

1cool

80

0

70

1

60

0ecomfortabl

90

1

80

1

70

0_ warmtoo

Page 50: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Define the Membership Functions, Cont’d.

For DeltaInTemp:

6

1

4

1

2

0_arg

2

0

0

1

2

0_

0

0

2

1

4

0_

positiveel

zeronear

negativesmall

For OutTemp:

70

0

50

1

30

0chilly

(These are all we need for our rules.)

Page 51: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Example of Fuzzification Assume inside temperature is 67.5 F, change in temperature last five minutes is -1.6 F, and outdoor temperature is 52 F.

Now find fuzzy values needed for our four example rules:

For InTemp,

0.0)5.67( and ,75.0)5.67(,25.0)5.67( _ warmtooecomfortablcool

.For DeltaInTemp,

0.0)6.1( and ,2.0)6.1( ,8.0)6.1( _arg__ positiveelzeronearnegativesmall

For OutTemp,

9.0)52( chilly

Page 52: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fire the Fuzzy Rules Using Zadeh’s AND process:

Rule 1: changeno _20.020.075.0

Rule 2: smallincrease _8.08.09.0

Rule 3: greatlydecrease _0.00.00.0 so Rule 3 doesn’t produce any output. Rule 3 is said to have fired but not to have been activated. Rule 4: smallincrease _2.02.025.0

Note that two rules result in the activation of increase_small.

for FlowChange.

for FlowChange.

for FlowChange.

for FlowChange.

Page 53: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Rules Fire in Parallel

* In a fuzzy system, all rules are activated in parallel (onlysimulated on von Neumann computer).

* In traditional AI systems, rules fire in series - must sometimes“back out” and start again.

* When equations are used, numeric variables must be preciselydefined, calculations are in series.

Page 54: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Determine Output Fuzzy Set Activations

In our example, rules 1, 2, and 4 are activated.

Two output fuzzy sets are activated:no_change (by rule 1)increase_small (by rules 2 and 4)

Note that a fuzzy set can be activated by several rules (often at different levels)

We can use various ways to obtain the output when multiple rules fire; Zadeh’s OR is one common way. This results in an output level of 0.8 for increase_small

Page 55: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Defuzzification Combines set of if-then rules into a specific value of a control(output) variable

Note: These rules are for changes in flow.

We define an output range of flow changes from -3 to +3 CMM, using five fuzzy sets centered on 0 CMM.

Minimum flow change is specified as 0.1 CMM; 61 points then exist on the range (x) axis.

Defuzzification is the process of getting a scalar out of the fuzzy system.

Page 56: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Defuzzification, Continued

Chop off consequent linguistic variable membership functionsat values obtained

Note that membership functions must have been establishedwith scalar values assigned to consequent variable scale

A common way to defuzzify is with the centroid (clipped center of gravity) method.

ii

iii

x

xxOutput

)(

)(

Must specify how to deal with areas of overlap: count them once or twice.

Page 57: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Defuzzification of Furnace Gas Flow

DG, increase greatly; DS, decrease slightly; NC, no change;

IS, increase slightly; IG, increase greatly

Page 58: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Other Defuzzification Methods(Each represents outputs as arrows pushing down on x-axis.)

Max-membership: Take centroid of membership function with highest value (Output = 1.0 in example)

Mean-max-membership: Average value on the domain axis (Output = 0.5 in example)

Center-of-maximum: Each membership value represented by one arrow. (Like forces pushing on a lever.) (Output = 0.8 in example)

Page 59: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Measures of Fuzziness

•Fuzziness measures for discrete fuzzy sets exist

•Fuzziness measures are metrics of fuzzy uncertainty

•These measures estimate average ambiguity in fuzzy sets

•Goal: to describe the relationship of elements to sets and sets to one another

Page 60: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Measures •Many exist

•They are often based upon:Distance from set of fuzzy membership values to nearest

crisp set, and/or,Distance between set of fuzzy membership values and

its complement

•For a crisp set, fuzziness is defined as 0

•If then fuzziness is maximum xxs 5.0

Page 61: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Entropy

* Entropy is the amount of disorder in a system, originally definedin thermodynamics

* Also used in information theory as a measure of information in amessage or bit string; high uncertainty corresponds to highentropy

* Fuzzy entropy is a measure of fuzziness, and is maximum at thecenter of the hypercube of fuzzy membership functions defined over the domain

* Fuzzy entropy applies to a set of fuzzy membership functionvalues

Page 62: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Sharpened Sets

A set S* is a sharpened version of S when:

5.0if and ,5.0if ** xxxxxx SSSSSS

Sharpness is thus inversely proportional to fuzziness.

The fuzziness of a set and its complement should be the same.

Page 63: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Measures “Conditions” Fuzzy sets should satisfy some or all of the following conditions,where H(.) is a fuzziness measure:

Sharpness P1: H(A) = 0 if A is a crisp set, that is A(x) = 0 or 1 x X

Maximality P2: H(A) is maximum for A(x) = 0.5 x X

Resolution P3: H(A) H(A*), where A* is a sharpened version of A

Symmetry P4: H(A) = H(1-A), where 1-A(x) = 1 - A(x) x X

Valuation P5: H(AB) + H(AB) = H(A) + H(B)

Page 64: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzziness Measure: DeLuca and Termini

n

iiiiiDT KAH

11log1log

Adheres to P1–P5K is a constant of normalization

Page 65: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzziness Measure: Pal and Pal

n

iiiPP

iiKAH1

)1( e1e

Adheres to P1–P5 if K is set properly

Page 66: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Entropy: Kosko

* Fuzzy entropy can be calculated as the ratio of the distance fromthe hypercube point (set of fuzzy membership values) to thenearest corner, divided by the distance to the farthest corner

* There are two main ways to do this:* Pythagorean theorem (Euclidean distance)* Hamming distance

farq

nearqk AAd

AAdAqH

,

,,

Page 67: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Kosko Measure

otherwise 0

5.0 if 1

otherwise 0

5.0 if 1

xx

xx

AAfar

AAnear

qn

i

qiAfariAfarq

qn

i

qiAneariAnearq AAdAAd

/1

1,,

/1

1,, , and ,

farq

nearqK AAd

AAdAqH

,

,,

q = 1: Hamming distance; q = 2: Euclidean distance

Example: E(s) for S = (.2, .8; .8, .2) is approx. 0.25 either way

For S consisting of all .5s, E(S) = 1; for S consisting of all 1s and 0s, E(S) = 0

Page 68: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Entropy Equation: Kosko

E S DS S

S Snn

C

C( ) ,

1 2

n = 1: Hamming distancen = 2: Euclidean distance

Example: E(s) for S =(.2, .8; .8, .2) is approx. 0.25 either way

For S consisting of all .5s, E(S) = 1

For S consisting of all 1s and 0s, E(S) = 0

Page 69: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Control

•Largest application of fuzzy logic

•First implemented by Mamdani in laboratory in 1975

•Thousands of commercial and industrial applications today

Page 70: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Why Fuzzy Control?

* Efficiently incorporates human expert information

* Does not require a mathematical model of system

* Produces nonlinear controllers

* Easy and inexpensive to design

* Easy to understand

Page 71: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

The Fuzzy ControllerSystem being controlled

Fuzzify

Defuzzify

Page 72: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

The Fuzzy Controller

* Provides set of inputs to produce desirable outputs

* Controller’s actions defined by rule base

* To build rule base:1. Identify and name input variables and define ranges2. Identify and name output variables and define ranges3. Define fuzzy membership function for each input variable4. Build rule base to govern controller5. Define how control actions will be combined to provide

plant inputs

Page 73: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Example Fuzzy Controller

• Build system to control speed of train

• Specifically, design system to smoothly slow and stop train fromany speed and distance from station

Page 74: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Identify and name input variables and

define ranges

SPEED

Linguistic Range

Low High

Fast 26.5 70

Medium Fast 6.5 46.5

Slow 2.5 10.5

Very Slow 1 4

Stopped 0 2

DISTANCE

Linguistic Range

Low High

Far 1,500

Medium Far 100 3,000

Near 3 200

Very Near 1 5

At 0 2

Page 75: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Identify and name output variables and define ranges

THROTTLE

Linguistic Range

Low High

Full 60% 100%

Medium 20% 80%

Slight 3% 30%

Very Slight 1% 5%

No 0 2%

BRAKE

Linguistic Range

Low High

Full 98% 100%

Medium 95% 99%

Slight 70% 97%

Very Slight 20% 80%

No 0 40%

Page 76: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Membership Functions for Speed

Page 77: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Membership Functions for Distance

Page 78: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Membership Functions for Throttle

Page 79: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Membership Functions for Brake

%

Page 80: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Step 4: Build Rule Base Matrix

• Build matrix of input variable combinations

• Each matrix position may have values for output variables

• If one output variable is specified, all must be

• Shaded area on next figure corresponds to rules:As speed is ‘stopped’ and as distance is ‘at’ then do ‘full brake’As speed is ‘stopped’ and as distance is ‘at’ then do ‘no throttle’

• “AND” together the inputs to produce each output

Page 81: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Rule Base Matrix

Shaded entry: IF (speed) IS (stopped) AND IF (distance) IS (at)

THEN (full brake) AND (no throttle)

Page 82: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Determine How Control Will OccurUsually use centroid defuzzificationExample: speed = 3 km/hr; distance = 1.8 mDetermine which membership functions are activated and

towhat values:

speed: VY-SLOW(3)=0.667

SLOW(3)=0.

125

AT(1.8)=0.1

VY-NEAR(1.8)=0.4

distance:

Page 83: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

3 km/hr Activates Very Slow and Slow

Page 84: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

1.8 Meters Activates at and very near

Page 85: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Rules Activated with speed = 3 and distance Rules Activated with speed = 3 and distance = 1.8= 1.8

Page 86: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Use Centroid Defuzzification to Obtain Use Centroid Defuzzification to Obtain OutputOutput

Page 87: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Summary of Controller Operation

• Sample inputs

• Determine membership values activated by inputs

• Determine which rules fire

• Combine relevant membership values using AND operator

• Trace activation membership values back through output functions

• Use centroid method to defuzzify output to a scalar

Page 88: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Takagi-Sugeno Models• Also sometimes referred to as the “Takagi-Sugeno-Kang” models

• Differs from Mamdani model in that each rule’s consequent is a mathematical function

The output is a function of one or more of the input variablesAs developed by Takagi and Sugeno, the output is a linear + constant function of the inputThe method has been extended to non-linear functions

Page 89: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Takagi-Sugeno General Form

If xi is Si and, …, and xk is Sk then y=u(xi , …, xk)where y is the output variable,

each xi is an input variableeach Si is a fuzzy set, and,u(.) is a specified function

A complete system comprises n fuzzy rules, i=1,…, n

If x1i is S1i and, …, and xki is Ski then yi = ui(x1i, …, xki)

Linear membership functions were used by T-S, but other functions can also be used

Page 90: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Calculating System Output

Usually take minimum or product of the fuzzy membership values of the antecedents:

kiSkiiiSi

kiSkiiiSi

xxy

xxy

,,

or ,,,min

11

11

where (yi) is the firing strength, or truth (membership) value of rule i.

Page 91: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Calculating System Output, Cont’d.

The output y is a weighted average of the individual subsystem outputs yi, where n is the number of rules:

n

iikiin

jj

in

in

jj

ii xxuy

y

y

yyy

11

1

1

1

,,

Page 92: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

T-S Simple Example Assume we have a simple system with just two rules, two input variables, and two membership functions per input variable:

Page 93: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Takagi-Sugeno Method

•Can use LMS for determining parameters

•EAs can be used to evolve system structure and parameters

•Useful for modeling very complex systems

•Can incorporate objective system performance data

Page 94: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Logic Summary

• NNs and EAs simulate or mimic processes found in nature

• Logic (crisp and fuzzy) was invented by humans to encode inferential relations among symbols

• Aristotelian logic is too crisp for many applications; it assumesthat real objects belong to crisp taxonomic classes

Page 95: Chapter 7 Fuzzy Systems Concepts and Paradigms. “Fuzzification is a kind of scientific permisiveness; it tends to result in socially appealing slogans.

Fuzzy Logic Summary, Cont’d.

Fuzzy logic has opened up new ways to reason, and to solve problems

* Distinction between A and not-A has been weakened

* Rules can be executed in parallel - puts fuzzy logic inharmony with neural nets and evolutionary algorithms

* Rules in fuzzy logic allow for unanticipated solutions - solutions can emerge rather than being imposed

(Emergence is an attribute of computational intelligence.)