0% found this document useful (0 votes)
2 views

18-Fuzzy_Logic

Fuzzy logic is a form of knowledge representation that deals with reasoning that is approximate rather than fixed and exact, allowing for degrees of truth. It has applications in control systems, expert systems, and various technologies such as ABS brakes and video cameras. The document outlines the origins, definitions, operations, and benefits of fuzzy logic, highlighting its efficiency in handling real-world vagueness.

Uploaded by

Vicente
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

18-Fuzzy_Logic

Fuzzy logic is a form of knowledge representation that deals with reasoning that is approximate rather than fixed and exact, allowing for degrees of truth. It has applications in control systems, expert systems, and various technologies such as ABS brakes and video cameras. The document outlines the origins, definitions, operations, and benefits of fuzzy logic, highlighting its efficiency in handling real-world vagueness.

Uploaded by

Vicente
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

FUZZY SETS

and
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 [ 0.25 – 0.50 ]
sets?
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

 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: Professor Toshire Terano ( 1972 ) Organized the world's first working group on fuzzy systems.

 1981: 1st commercial applications using fuzzy logic to control systems by F.L. Smidth & Co..

 1994: Japan exported $35 billion worth of fuzzy products.


General Definition

Fuzzy Logic - 1965 Lotfi Zadeh, Berkely

• superset of conventional (Boolean) logic that has


been extended to handle the concept of partial
truth
 central notion of fuzzy systems is that truth
values (in fuzzy logic) or membership values (in
fuzzy sets) are indicated by a value on the range
[0.0, 1.0], with 0.0 representing absolute
Falseness and 1.0 representing absolute Truth.
• deals with real world vagueness
“CRISP SET” “FUZZY SET ”
Formal Definitions
 Definition 1: Let X be some set of objects, with elements noted as x.
• X = {x}.
 Definition 2: A fuzzy set A in X is characterized by a membership
function mA(x) which maps each point in X onto the real interval [0.0,
1.0]. As mA(x) approaches 1.0, the "grade of membership" of x in A
increases.
 Definition 3: A is EMPTY iff for all x, mA(x) = 0.0.
 Definition 4: A = B iff for all x: mA(x) = mB(x) [or, mA = mB].
 Definition 5: mA' = 1 - mA.
 Definition 6: A is CONTAINED in B iff mA  mB.
 Definition 7: C = A UNION B, where: mC(x) = MAX(mA(x), mB(x)).
 Definition 8: C = A INTERSECTION B where: mC(x) = MIN(mA(x),
mB(x)).
Operations on sets

A B

AB AB A
Example of operations on Fuzzy sets
Applications

 ABS Brakes
 Expert Systems
 Control Units
 Bullet train between Tokyo and
Osaka
 Video Cameras
 Automatic Transmissions
Fuzzification

 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.
Defuzzification

To get the crisp value in terms of the membership functions we calculate the
representative value from a union of the sets. There are five methods to do
this: Centroid of area, Bisector of area, Mean of maximum, Smallest of
maximum and Largest of maximum. The most common method is to
calculate CENTROID or “gravitational centre”:
Ejemplo
Inference Engine

Mamdani Inference Model


Ejemplo

Solution
Suppose we have made some observations of the system (moving body) and we
estimate the values of the two inputs, mass and velocity, as crisp values. For
example, let input(i) = 0.35 kg (mass) and input(j) = 55 m s−1 (velocity). We
model the inputs as delta functions, and use the Mamdani implication as in the
previous example.
Example

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
degrees of
10% cold
membership of fuzzy
Fuzzy rules sets.
IF 90% hot THEN 80% open
IF 10% cold THEN 20% closed
Fuzzy rules applied to
Fuzzy output set
80% open, 20% closed get new sets of
members.
Defuzzifier

Crisp data These sets are then


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
Decide on rules
If BORED then LECTURE LONG.
If HAPPY the LECTURE SHORT.

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


“Short”

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!


FUZZY LOGIC IN CONTROL SYSTEMS

There are two types of control that are the most


used: the open-loop and the closed-loop.

Generic Control System


 Fuzzy Logic provides a more efficient and
resourceful way to solve Control Systems.

 Some Examples
 Temperature Controller

 Anti – Lock Break System ( ABS )


Temperature Controller Structure

 Fuzzification
 Scales and maps input variables to fuzzy sets
 Inference Mechanism
 Approximate reasoning
 Deduces the control action
 Defuzzification
 Convert fuzzy output values to control signals
Rule Base

Air Temperature Fan Speed

• Set stop {0, 0, 0}


 Set cold {50, 0, 0}
• Set slow {50, 30, 10}
 Set cool {65, 55, 45}
• Set medium {60, 50, 40}
 Set just right {70, 65, • Set fast {90, 70, 50}
60} • Set blast {, 100, 80}
 Set warm {85, 75, 65}
 Set hot {, 90, 80}
Rules

Air Conditioning Controller Example:

 IF Cold then Stop default:

 If Cool then Slow The truth of any


statement is a
 If OK then Medium matter of degree

 If Warm then Fast Membership


function is a
 IF Hot then Blast curve of the
degree of truth
of a given input
value
0

100 If Hot
90 then
Blast
80
If Warm
then
70
Fast
60
If Just
50 Right then
Medium
40 IF Cool
then
30 Slow
if Cold
20 then
Stop
10

45 50 55 60 65 70 75 80 85 90
Mapping Inputs to Outputs
1
0

100
st
90 Bla t

80 Fa
st

70

60
M ed
ium
50

40
Slo
w
30

20

10
St
o p

t
l

Ho
o

ar
Co

W
Co

Rig t
ht
Jus
ld

45 50 55 60 65 70 75 80 85 90
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.
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
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.
REFERENCES

http://www.csc.uvic.ca/~mcheng/
460/notes/fuzzy_logic.pdf

You might also like