Introduction - Fuzzy Inference Systems - Examples
Introduction - Fuzzy Inference Systems - Examples
menu
Topics
• Introduction
Basics • Basic Algorithm
Control Systems • Control Systems
Computations • Sample Computations
Inverted Pendulum • Inverted Pendulum
• Fuzzy Inference Systems
Mamdani – Mamdani Type
Sugeno – Sugeno Type
Fuzzy Sets • Fuzzy Sets & Operators
Defuzzification • Defuzzification
Mem. Fcns • Membership Functions
menu
Fuzzy Logic
What is Fuzzy Logic?
A computational paradigm that is based on how humans think
Fuzzy Logic looks at the world in imprecise terms, in much the same way
that our brain takes in information (e.g. temperature is hot, speed is slow),
then responds with precise actions.
menu
Fuzzy Logic
What is Fuzzy Logic?
Fuzzy logic differs from classical logic in that statements are no longer
black or white, true or false, on or off.
In traditional logic an object takes on a value of either zero or one.
In fuzzy logic, a statement can assume any real value between 0 and 1,
representing the degree to which an element belongs to a given set.
menu
Fuzzy Logic
History of Fuzzy Logic
My Fuzzy Logic-based
Researches
• Robot Navigation
– Real-time path-planning
(Hybrid Fuzzy A*)
• Machine Vision
– Real-time colour-object
recognition
– Colour correction
– Fuzzy Colour Contrast 9th Fuzzy Days (2006), Dortmund,
Fusion Germany
– Fuzzy-Genetic Colour
Contrast Fusion
Meeting Prof. Yamakawa in Japan
menu
Fuzzy Logic
Introduction of FL in the Engineering world (1990’s),
Fuzzy Logic is one of the most talked-about technologies to hit the embedded
control field in recent years. It has already transformed many product
markets in Japan and Korea, and has begun to attract a widespread following
In the United States. Industry watchers predict that fuzzy technology is on its
way to becoming a multibillion-dollar business.
http://www.intel.com/design/mcs96/designex/2351.htm
menu
Sample Applications
In the city of Sendai in Japan, a 16-station subway system
is controlled by a fuzzy computer (Seiji Yasunobu and Soji
Miyamoto of Hitachi) – the ride is so smooth, riders do not
need to hold straps
http://en.wikipedia.org/wiki/Fuzzy_system
Sample Applications
For washing machines, Fuzzy Logic control is almost
becoming a standard feature
fuzzy controllers to load-weight, fabric-mix, and dirt sensors and automatically set the
wash cycle for the best use of power, water, and detergent.
menu
Control Systems in General
Objective The aim of any control system is to produce a set of desired
outputs for a given set of inputs.
Samples
A household thermostat takes a
temperature input and sends a control
signal to a furnace.
Image: http://en.wikipedia.org/wiki/Crankshaft
Sample
The table might tell the controller,
“IF temperature is 85, THEN increase furnace fan speed to 300 RPM.”
Drawbacks
The problem with the tabular approach is that the table can get very long,
especially in situations where there are many inputs or outputs. And that, in
turn, may require more memory than the controller can handle, or more
than is cost-effective.
Tabular control mechanisms may also give a bumpy, uneven response, as the
controller jumps from one table-based value to the next.
menu
Conventional Control vs. Fuzzy
Mathematical formula
For example: 2 2
m ( x l sin ) l cos m ( l cos ) l sin mgl sin
t t
2 2
Downside
The formulas can be very complex, and working them out in real-time may be
more than an affordable controller (or machine) can manage.
menu
Conventional Control vs. Fuzzy
Downside of Mathematical modeling approach
It may be difficult or impossible to derive a workable mathematical model in the
first place, making both tabular and formula-based methods impractical.
menu
Conventional Control vs. Fuzzy
Why use Fuzzy Logic?
menu
Fuzzy Logic Explained
Fuzzy Set Theory
menu
Fuzzy Logic Explained
Fuzzy Set Theory
A fuzzy system might say that he is partly medium and partly tall.
http://blog.peltarion.com/2006/10/25/fuzzy-math-part-1-the-theory/
A fuzzy system might say that he is partly medium and partly tall.
menu
Excerpts from History
Fuzzy Set Theory
“So far as the laws of mathematics refer to reality, they are not certain. And so
far as they are certain, they do not refer to reality.”
Albert Einstein
Theoretical Physicist and Nobel laureate
“Geometrie und Erfahrung,” Lecture to Prussian Academy, 1921
menu
Fuzzy Inference Process
menu
Obstacle Avoidance Problem
Robot Navigation
obstacle
(obsx, obsy)
(x,y)
menu
Another example: Fuzzy Sets for Robot Navigation
SMALL
MEDIUM
LARGE
NEAR
FAR
VERY FAR
Angle
Speed
Fuzzy Control
Different stages of Fuzzy control
1. Fuzzification
The purpose of fuzzification is to map the inputs from a set of sensors (or
features of those sensors) to values from 0 to 1 using a set of input
membership functions.
0.0
xa dx
Fzero(0.25) FZE (0.25) max min
,1, ,0
ba dc
menu
Trapezoidal Membership Functions
LeftTrapezoid
Left_Slope = 0
Right_Slope = 1 / (A - B)
a b
CASE 1: X < a
Membership Value = 1
CASE 2: X >= b
Membership Value = 0
menu
Trapezoidal Membership Functions
RightTrapezoid
Left_Slope = 1 / (B - A)
Right_Slope = 0 a b
CASE 1: X <= a
Membership Value = 0
CASE 2: X >= b
Membership Value = 1
menu
Trapezoidal Membership Functions
Regular Trapezoid
Left_Slope = 1 / (B - A)
Right_Slope = 1 / (C - D)
a b c d
CASE 1: X <= a Or X >= d
Membership Value = 0
menu
Fuzzy Control
Different stages of Fuzzy control
2. Rule Evaluation
e.g. IF temperature is very hot, THEN set fan speed very high.
Fuzzy Control
Different stages of Fuzzy control
Fuzzy rules are always written in the following form:
menu
Fuzzy Control
Different stages of Fuzzy control
2. Rule Evaluation
The results of various rules are summed together to generate a set of “fuzzy
outputs”.
FAMM
Outputs x
NL=-5 N ZE P
NS=-2.5 NL NS NS W1 W4 W7
N
ZE=0 y
ZE NS ZE PS W2 W5 W8
PS=2.5 P
PS PS PL W3 W6 W9
PL=5.0
Fuzzy Control
Rule Evaluation Example
x
W2 min FN (0.25), FZE (0.25) min 0.25,1 0.25
N ZE P W3 min FN (0.25), FP (0.25) min 0.25, 0.25 0.25
W4 min FZE (0.25), FN (0.25) min 1, 0.75 0.75
NL NS NS
N
y
ZE NS ZE PS
W2 W5 W8
menu
Does a FAMM need to be a
square?
menu
Fuzzy Control
Different stages of Fuzzy control
3. Defuzzification
Fuzzy outputs are combined into discrete values needed to drive the control
mechanism
(W1 NL W2 NS W3 PS W4 NS W5 ZE W6 PS W7 NS W8 PS W9 PL)
OUTPUT 9
W
i 1
i
0.25 (5) 0.25 2.5 0.25 2.5 0.75 2.5 1 0 0.25 2.5 0.75 2.5 0.75 2.5 0.25 5
0.25 0.25 0.25 0.75 1 0.25 0.75 0.75 0.25
menu
EXAMPLE