Sunteți pe pagina 1din 39

FUZZY LOGIC

T.C.Kanish
Assistant Professor (Sr.)
VIT University
OVERVIEW
| What is Fuzzy Logic?

| Where did it begin?


| What is MatLab Fuzzy Logic Toolbox For?
| Fuzzy Logic in Control Systems
| Overview: Fuzzy Inference Systems
y Fuzzy Set Concept
y Fuzzy Rules
y Membership functions
y How it works

| Building Systems: An Example


| Demo
| Discussion
WHAT IS FUZZY LOGIC?

| Definition of fuzzy
y Fuzzy – “not clear, distinct, or precise; blurred”

| Definition of fuzzy logic


y A form of knowledge representation suitable for
notions that cannot be defined precisely, but which
depend upon their contexts.
FUZZY LOGIC

“As complexity rises, precise


statements lose meaning and
meaningful statements lose
precision”

- Lotfi Zadeh
FUZZY LOGIC COME FROM
| Concept of Fuzzy Logic (FL) was conceived by Lotfi
Zadeh, a professor at the University of California at
Berkley, and presented not as a control methodology,

| But as a way of processing data by allowing partial set


membership rather than crisp set membership or non-
membership

| This approach to set theory was not applied to control


systems until the 70's due to insufficient small-computer
capability prior to that time.
ORIGINS OF FUZZY LOGIC
| Traces back to Ancient Greece

| Lotfi Asker Zadeh ( 1965 )


y First to publish ideas of fuzzy logic.

| Professor Toshire Terano ( 1972 )


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

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


y First to market fuzzy expert systems.
FUZZY LOGIC
| FL is a problem-solving control system methodology
that lends itself to implementation in systems
ranging from simple, small, embedded micro-
controllers to large, networked, multi-channel PC or
workstation-based data acquisition and control
systems.
| It can be implemented in hardware, software, or a
combination of both.
| FL provides a simple way to arrive at a definite
conclusion based upon vague, ambiguous, imprecise,
noisy, or missing input information.
| FL's approach to control problems mimics how a
person would make decisions, only much faster.
FUZZY LOGIC (Cont..)
| Fuzzy logic provides a method to formalize
reasoning when dealing with vague terms.
| Traditional computing requires finite precision
which is not always possible in real world
scenarios. Not every decision is either true or
false, or as with Boolean logic either 0 or 1.
| Fuzzy logic allows for membership functions, or
degrees of truthfulness and falsehoods. or as
with Boolean logic,
not only 0 and 1
but all the numbers that fall in between.
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
[ 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
}
FUZZY MATHEMATICS
| Fuzzy Numbers – almost 5, or more than 50

| Fuzzy Geometry – Almost Straight Lines

| Fuzzy Algebra – Not quite a parabola

| Fuzzy Calculus

| Fuzzy Graphs – based on fuzzy points


FUZZY LOGIC VS. NEURAL
NETWORKS
| How does a Neural Network work?

| Both model the human brain.


y Fuzzy Logic

y Neural Networks

| Both used to create behavioral

systems.
FUZZY OPERATIONS

A B

A∧B A∨B ¬A
CONTROLLER STRUCTURE
| Fuzzification
y Scales and maps input variables to fuzzy sets
| Inference Mechanism
y Approximate reasoning
y Deduces the control action
| Defuzzification
y Convert fuzzy output values to control signals
SIMPLE FUZZY CONTROLLER
FUZZY LOGIC IN CONTROL
SYSTEMS

| Fuzzy Logic provides a more efficient and


resourceful way to solve Control Systems.

| Some Examples
y Temperature Controller

y Anti – Lock Break System ( ABS )


SIMPLE TEMPARTURE CONTROL

Fuzzy based Temperature controller


RULE BASE

Air Temperature Fan Speed


| Set cold {50, 0, 0}
o Set stop {0, 0, 0}
| Set cool {65, 55, 45}
o Set slow {50, 30, 10}
| Set just right {70, 65, 60}
o Set medium {60, 50, 40}
| Set warm {85, 75, 65} o Set fast {90, 70, 50}
| Set hot {∞, 90, 80} o Set blast {∞, 100, 80}
RULES

Air Conditioning Controller Example:

| IF Cold then Stop


| If Cool then Slow
| If OK then Medium
| If Warm then Fast
| IF Hot then Blast
FUZZY AIR CONDITIONER
0

100
st If Hot
90 Bl a then
Blast

80 Fa
st If Warm
then
70 Fast

60
Med If Just Right
ium then
50 Medium

40 IF Cool
Sl
ow then
30 Slow

if Cold
20
then Stop

10
St
op

1
m

t
ol

Ho
ar
Co

W
Co

Rig t
ht
Jus
ld

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
Med
ium
50

40
Sl
ow
30

20

10
St
op

1
m

t
ol

Ho
ar
Co

W
Co

Rig t
ht
Jus
ld

45 50 55 60 65 70 75 80 85 90
TEMPERATURE CONTROLLER
| The problem
y Change the speed of a heater fan, based off the room
temperature and humidity.
| A temperature control system has four settings
y Cold, Cool, Warm, and Hot
| Humidity can be defined by:
y 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
y Brake
y 4 WD
y Feedback
y Wheel speed
y Ignition
| Outputs
y Pulsewidth
y Error lamp
FUZZY LOGIC IN OTHER FIELDS

| Business

| Hybrid Modeling

| Expert Systems
FUZZY LOGIC USING MATLAB
PRIMARY GUI Tools
We can use five primary GUI tools for building,
editing, and observing fuzzy inference systems in
the toolbox
| Fuzzy Inference System (FIS) Editor
| Membership Function Editor
| Rule Editor
| Rule Viewer
| Surface Viewer
PRIMARY GUI TOOLS
User Interface Layout: Getting Started
User Interface Layout: FIS Editor
UI Layout: MF Editor - Service
UI LAYOUT: MF EDITOR -FOOD
UI Layout: MF Editor - Tip
User Interface Layout: Rule Editor
User Interface Layout: Rule Viewer
User Interface Layout: Surface Viewer
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.

S-ar putea să vă placă și