Professional Documents
Culture Documents
Dr Alexiei Dingli
Definition of fuzzy
Formal Definition
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.
bool speed; get the speed if ( speed == 0) { // speed is slow } else { // speed is fast }
For every problem must represent in terms of fuzzy sets. What are fuzzy sets?
Slowest
[ 0.0 0.25 ]
Slow
[ 0.25 0.50 ]
Fast
[ 0.50 0.75 ]
Fastest
[ 0.75 1.00 ]
The idea behind fuzzy logic dates back to Plato, who recognized not only the logic system of true and false, but also an undetermined area the uncertain. In the 1960s Lotfi A. Zadeh Ph.D,. University of California, Berkeley, published an obscure paper on fuzzy sets. His unconventional theory allowed for approximate information and uncertainty when generating complex solutions; a process that previously did not exist. Fuzzy Logic has been around since the mid 60s but was not readily excepted until the 80s and 90s. Although now prevalent throughout much of the world, China, Japan and Korea were the early adopters
Fuzzy Sets
Fuzzy Linguistic Variables are used to represent qualities spanning a particular spectrum
Membership Functions Temp: {Freezing, Cool, Warm, Hot} Degree of Truth or "Membership"
1 Freezing Cool Warm Hot
Freezing
Cool
Warm
Hot
0.7 0.3
0 10 30 50 70 90 110 Temp. (F)
Fuzzy Logic
How do we use fuzzy membership functions in predicate logic? Fuzzy logic Connectives: Fuzzy Conjunction, Fuzzy Disjunction, Operate on degrees of membership in fuzzy sets
Fuzzy Disjunction
0.375
(AB = C) (C = 0.75)
Fuzzy Conjunction
0.375
(AB = C) (C = 0.375)
.1 .2 .3 .4 .5 .6 .7 .8 .9
1 5 10 15 20 25 30 35 40
.1 .2 .3 .4 .5 .6 .7 .8 .9
1 5 10 15 20 25 30 35 40
0.7
.1 .2 .3 .4 .5 .6 .7 .8 .9
1 5 10 15 20 25 30 35 40
0.9 0.7
.1 .2 .3 .4 .5 .6 .7 .8 .9
1 5 10 15 20 25 30 35 40
0.9 0.7
.1 .2 .3 .4 .5 .6 .7 .8 .9
1 5 10 15 20 25 30 35 40
Determine degrees of membership: A = 0.7 B = 0.9 Apply Fuzzy AND AB = min(A, B) = 0.7
Fuzzy Control
Fuzzy Control combines the use of fuzzy linguistic variables with fuzzy logic Example: Speed Control How fast am I going to drive today? It depends on the weather
Disjunction of Conjunctions
Inputs: Temperature
Temp: {Freezing, Cool, Warm, Hot}
1 Freezing Cool Warm Hot
Output: Speed
Rules
If it's Sunny and Warm, drive Fast Sunny(Cover)Warm(Temp) Fast(Speed) If it's Cloudy and Cool, drive Slow Cloudy(Cover)Cool(Temp) Slow(Speed) Driving Speed is the combination of output of these rules...
...Calculating...
2/9/2004
Fuzzy Logic
30
Find centroids: Location where membership is 100% 100% Slow = 25 100% Fast = 75
Fuzzy Logic Control allows for the smooth interpolation between variable centroids with relatively few rules This does not work with crisp (traditional Boolean) logic Provides a natural way to model some types of human expertise in a computer program
Fuzzy Logic provides a more efficient and resourceful way to solve Control Systems.
Some Examples
TEMPERATURE CONTROLLER
The problem
Change the speed of a heater fan, based on the room temperature and humidity
Nonlinear and dynamic in nature Inputs for Intel Fuzzy ABS are derived from
Outputs
Pulsewidth Error lamp
Structure of Controller
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 Set cold {50, 0, 0} Set cool {65, 55, 45} Set just right {70, 65, 60} Set warm {85, 75, 65} Set hot {, 90, 80}
Fan Speed Set stop {0, 0, 0} Set slow {50, 30, 10} Set medium {60, 50, 40} Set fast {90, 70, 50} Set blast {, 100, 80}
Rules
s Bla
Fa s
Med ium
Sl
ow
0 45 50 55 60 65 70 75 80 85 90
Jus Rig t ht
Ho
ar
Co ld
Fuzzy Logic control may not scale well to large or complex problems
Deals with imprecision, and vagueness, but not uncertainty
CONCLUSION
It is able to be applied to control systems and other applications in order to improve the efficiency and
Questions?