Fuzzy

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 32

FUZZY LOGIC

OVERVIEW

 What is Fuzzy Logic?


 Where did it begin?
 Fuzzy Logic vs. Neural Networks
 Fuzzy Logic in Control Systems
 Fuzzy Logic in Other Fields
 Future
WHAT IS FUZZY LOGIC?

 Definition of fuzzy
 Fuzzy – “not clear, distinct, or precise; blurred”

 Definition of fuzzy logic


A form of knowledge representation suitable for notions that
cannot be defined precisely, but which depend upon their
contexts.
TRADITIONAL REPRESENTATION OF
LOGIC

Slow Fast
Speed = 0 Speed = 1

bool speed;
get the speed
if ( speed == 0) {
// speed is slow
}
else {
// speed is fast
}
FUZZY LOGIC REPRESENTATION
Slowest
 For every problem
[ 0.0 – 0.25 ]
must represent in terms
of fuzzy sets.
Slow
 What are fuzzy sets? [ 0.25 – 0.50 ]

Fast
[ 0.50 – 0.75 ]

Fastest
[ 0.75 – 1.00 ]
FUZZY LOGIC REPRESENTATION CONT.

Slowest Slow Fast Fastest


float speed;
get the speed
if ((speed >= 0.0)&&(speed < 0.25)) {
// speed is slowest
}
else if ((speed >= 0.25)&&(speed < 0.5))
{
// speed is slow
}
else if ((speed >= 0.5)&&(speed < 0.75))
{
// speed is fast
}
else // speed >= 0.75 && speed < 1.0
{
// speed is fastest
}
ORIGINS OF FUZZY LOGIC
 Traces back to Ancient Greece
 Lotfi Asker Zadeh ( 1965 )
 First to publish ideas of fuzzy logic.

 Professor Toshire Terano ( 1972 )


 Organized the world's first working group on fuzzy systems.

 F.L. Smidth & Co. ( 1980 )


 First to market fuzzy expert systems.
FUZZY LOGIC VS. NEURAL NETWORKS
 How does a Neural Network work?
 Both model the human brain.
 Fuzzy Logic
 Neural Networks

 Both used to create behavioral

systems.
FUZZY LOGIC IN CONTROL SYSTEMS

 Fuzzy Logic provides a more efficient and resourceful


way to solve Control Systems.
 Some Examples
 Temperature Controller
 Anti – Lock Break System ( ABS )
TEMPERATURE CONTROLLER
 The problem
 Change the speed of a heater fan, based off the room
temperature and humidity.
 A temperature control system has four settings
 Cold, Cool, Warm, and Hot
 Humidity can be defined by:
 Low, Medium, and High
 Using this we can define
the fuzzy set.
BENEFITS OF USING FUZZY LOGIC
ANTI LOCK BREAK SYSTEM ( ABS )
 Nonlinear and dynamic in nature
 Inputs for Intel Fuzzy ABS are derived from
 Brake
4 WD
 Feedback
 Wheel speed
 Ignition

 Outputs
 Pulsewidth
 Error lamp
FUZZY LOGIC IN OTHER FIELDS

 Business
 Hybrid Modeling
 Expert Systems
CONCLUSION

 Fuzzy logic provides an alternative way to represent


linguistic and subjective attributes of the real world in
computing.
 It is able to be applied to control systems and other
applications in order to improve the efficiency and
simplicity of the design process.
How do our statements match the real world?

We’re assuming we know what words like “hunger” and “high” mean in “if
hunger is high go to café”.

While we might be able to give a clear RDF definition of “hunger” it won’t ever
match the real world. This may not matter if our rules replicate reality
quantitatively.

However, to do this, we need to define and use “high”.


For this, we need Fuzzy Sets and Fuzzy Logic.
Fuzziness
Traditional logic: true vs. false
Traditional empiricism: what exists or does not, what causes something,
and what doesn’t.
THESE ARE THE FOUNDATIONS OF SCIENCE.

However, since the early Greeks, people have found that the way we
understand the world isn’t black and white.

The Sorites Paradox


If I remove one sand grain from a pile, it’s still a pile, but if I carry on, it’s soon
not a pile (well, go figure…).
Reality is fuzzy

Language isn’t usually precise…


How hot is “hot”? 30 degrees? 40 degrees?

Reality isn’t actually that precise…


Most things, including us, are just continually renewing lumps of geology!
Where do we begin? Where do we end?
Atoms aren’t distinct.
Shrödinger’s poor old cat is both alive and dead.
Fuzzy Sets and Logic

Fuzzy Sets let us say something is 90% “one thing” and 10%
“another”, without being illogical.

Fuzzy Logic then lets us use this in rules:


E.g. it’s 90% “right” to do something, so I’ll do it 90% - adding warm
water to a washing machine cycle, for example.
The fuzzy rebellion

1923: “Bertie” Russell releases a paper on Vagueness.


How do we define objects that are partly in two normally mutually
exclusive sets?
1937: Black defines Vague sets.
1965: Zadeh coins the daft name “Fuzzy” for a logic based on Vague
set membership, instantly putting humourless scientist’s backs up.
1972: 1st practical demonstration Mamdani’s steam engine.
1981: 1st commercial applications using fuzzy logic to control
systems.
1994: Japan exported $35 billion worth of fuzzy products.
Scientists loved it so much…

“Fuzzy theory is wrong, wrong, and pernicious. What


we need is more logical thinking, not less. The
danger of fuzzy logic is that it will encourage the sort
of imprecise thinking that has brought us so much
trouble. Fuzzy logic is the cocaine of science.”
Prof William Kahan
The advantages of Fuzzy Logic

Lets us use terms like “hot” in computers, integrating knowledge and


machine learning.

A very simple approach to building computer models of geographical


systems.

The model uses human language, so it’s reasonably understandable.


Fuzzy Sets
We give things a degree of membership between 0 and 1 in several sets (to a combined total
of 1).
We then label these sets using human terms.
Encapsulates terms with no consensus definition, but we might use surveys to define them.

1
Degree of membership

Membership
Young Middle Old function
0.5 Aged

0 50 90 Age
38yr old = 10% Young + 90% Middle Aged
Fuzzy Logic models

We give our variables membership functions, and


express the variables as nouns (“length”,
“temperature”) or adjectives (“long”, “hot”).

We can then build up linguistic equations (“IF length


long, AND temperature hot, THEN openWindow”).
Crisp data How the models work
Fuzzifier Inputs converted to
Member 90% hot
10% cold degrees of membership
of fuzzy sets.
Fuzzy rules
IF 90% hot THEN 80% open
IF 10% cold THEN 20% closed Fuzzy rules applied to
Fuzzy output set
get new sets of members.
80% open, 20% closed

Defuzzifier These sets are then


converted back to real
Crisp data numbers.
A model to work out time by foot itchiness
Work out how bored you are (take a poll of happiness vs. foot itchiness)…

1
Degree of membership

Membership
function
0.5 Happy Bored

0 5 10
Foot itchiness
0.6 bored to tears + 0.4 happy as Larry
Decide on rules

If BORED then LECTURE LONG.


If HAPPY the LECTURE SHORT.

Make Fuzzy sets defining people’s notion of “Long”


and “Short”
1

Short Long

0 2
hours
Transfer the degrees to the output sets
1
0.6 Bored
Short Long
0.4 Happy

0 2 Hours

Adjust the heights of the sets to e.g. 40% for short.


1
0.6

0.4

0 2 Hours
Calculate the average

The average is usually taken as the gravitational centre


of the sets combined.

0.6

0.4

0 2

We’re only half way through!


Uses in geography

Spatial Interaction: modelling flows between regions. Can


capture the following kind of rules..
If distance is SHORT then TRIPS are LOTS.
If distance is MEDIUM then TRIPS are some.
If distance is LONG then TRIPS are few.

GIS, remote sensing, land evaluation.


Fuzzy viewsheds.
Fuzzy GIS - expert system shell on an intelligent GIS.
Classification of land cover (vegetation, soils) from satellite imagery.
Uses in geography
Physical Geography
Creation of climate classifications.
Fuzzy models of infiltration.
Flood forecasting.
Modelling subglacial water systems.
Demographics
What is the typical behaviour of a group?
Is everyone acting normally?
Open to abuse – but think how it might catch murderous extremists,
for example. We simply must have it, or society will disintegrate
and we’ll all be eating babies before you can say “police state”.
Other stuff

It’s often helpful to get other AI techniques to generate the


membership functions – e.g. Neural Nets and Genetic
Algorithms.

It’s often useful to combine several AIs with Fuzzy Logic –


e.g. you might have a Net for “low” river flows and another
for “high” ones, and a Fuzzy Logic engine between
combining the results.

You might also like