Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Fuzzy Logic

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 27

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

 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
 Pulse width
modulation
 Error lamp
FUZZY LOGIC IN OTHER FIELDS

 Business

 Hybrid Modeling

 Expert Systems
More Definitions
 Fuzzy logic is a set of mathematical principles for knowledge
representation based on degrees of membership.

 Unlike two-valued Boolean logic, fuzzy logic is multi-valued.


It deals with degrees of membership and degrees of
truth.

 Fuzzy logic uses the continuum of logical values between 0


(completely false) and 1 (completely true). Instead of just
black and white, it employs the spectrum of colours, accepting
that things can be partly true and partly false at the same
time.

0 0 0 1 1 1 0 0 0.2 0.4 0.6 0.8 1 1


(a) Boolean Logic. (b) Multi-valued Logic.

14
Fuzzy Sets
 The concept of a set is fundamental to mathematics.

 However, our own language is also the supreme expression


of sets. For example, car indicates the set of cars. When we
say a car, we mean one out of the set of cars.

 The classical example in fuzzy sets is tall men. The


elements of the fuzzy set “tall men” are all men, but their
degrees of membership depend on their height. (see table
on next page)

15
Fuzzy Sets
Degree of Membership
Name Height, cm
Crisp Fuzzy
Chris 208 1 1.00
Mark 205 1 1.00
John 198 1 0.98
Tom 181 1 0.82
David 179 0 0.78
Mike 172 0 0.24
Bob 167 0 0.15
Steven 158 0 0.06
Bill 155 0 0.01
Peter 152 0 0.00
16
Crisp Vs Fuzzy Sets
Degree of
Crisp Sets
The x-axis represents the
Membership
1.0
universe 0.8 of discourse –
Tall Men
the range0.6 of all possible

values applicable
0.4
to a
0.2
chosen variable. In our case,
0.0
the variable 150 is the160
man 170 180 190 200 210
Height, cm
height. Degree
According
of
Membership
to this Fuzzy Sets

representation,
1.0 the universe
of men’s0.8heights consists of
0.6
all tall men.
0.4

The y-axis
0.2 represents the

membership value
160 of the
0.0
150 170 180 190 200 210

fuzzy set. In our case, the Height, cm


17
A Fuzzy Set has Fuzzy Boundaries
 Let X be the universe of discourse and its elements be
denoted as x. In the classical set theory, crisp set A of X
is defined as function fA(x) called the characteristic
function of A:
1, if x  A
f A ( x)  
0, if x  A

fA(x) : X  {0, 1}, where


This set maps universe X to a set of two elements. For any
element x of universe X, characteristic function fA(x) is
equal to 1 if x is an element of set A, and is equal to 0 if x is
not an element of A.

18
A Fuzzy Set has Fuzzy Boundaries
 In the fuzzy theory, fuzzy set A of universe X is defined by
function µA(x) called the membership function of set A

µA(x) : X  {0, 1}, where µA(x) = 1 if x is totally in A;


µA(x) = 0 if x is not in A;
0 < µA(x) < 1 if x is partly in A.

This set allows a continuum of possible choices. For any


element x of universe X, membership function µA(x) equals
the degree to which x is an element of set A. This degree, a
value between 0 and 1, represents the degree of
membership, also called membership value, of element
x in set A.

19
Fuzzy Set Representation
Degree of
Membership Crisp Sets
1.0
0.8 Short Average Short
Tall
Tall Men
0.6
0.4
0.2
0.0
150 160 170 180 190 200 210
Height, cm
Degree of Fuzzy Sets
Membership
1.0
0.8
0.6 Short Average Tall

0.4
0.2 Tall

0.0
150 160 170 180 190 200 210
20
Fuzzy Set Representation
 Typical functions that can be used to represent a fuzzy set
are sigmoid, gaussian and pi. However, these functions
increase the time of computation. Therefore, in practice,
most applications use linear fit functions.

 (x)
X Fuzzy Subset A
1

0
Crisp Subset A Fuzziness Fuzziness x

21
Linguistic Variables and Hedges
 At the root of fuzzy set theory lies the idea of linguistic
variables.
 A linguistic variable is a fuzzy variable. For example,
the statement “John is tall” implies that the linguistic
variable John takes the linguistic value tall.
 In fuzzy expert systems, linguistic variables are used in
fuzzy rules. For example:
IF wind is strong
THEN sailing is good
Bogd
an L.
IF project_duration is long Vrusi
as ©
THEN completion_risk is high 2006
22
Linguistic Variables and Hedges
 The range of possible values of a linguistic variable
represents the universe of discourse of that variable. For
example, the universe of discourse of the linguistic variable
speed might have the range between 0 and 220 km/h and
may include such fuzzy subsets as very slow, slow, medium,
fast, and very fast.

 A linguistic variable carries with it the concept of fuzzy set


qualifiers, called hedges.

 Hedges are terms that modify the shape of fuzzy sets. They
include adverbs such as very, somewhat, quite, more or less
and slightly.

23
Linguistic Variables and Hedges

Degree of
Membership
1.0
Short Short
Tall
0.8

0.6 Average

0.4
Very Short Very
VeryTall
Tall
Tall
0.2

0.0
150 160 170 180 190 200 210
Height, cm

24
Linguistic Variables and Hedges
Mathematical
Hedge Expression Graphical Representation

A little [A ( x )]1.3

Slightly [A ( x )]1.7

Very [A ( x )]2

Extremely [A ( x )]3

25
Linguistic Variables and Hedges
Mathematical
Hedge Expression Graphical Representation

Very very [A ( x )]4

More or less A ( x )

Somewhat A ( x )

2 [A ( x )]2
if 0  A  0.5 Bogd
Indeed an L.
1  2 [1  A ( x )]2 Vrusi
if 0.5 < A  1 as ©
2006
26
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.

You might also like