Fuzzy Logic: UIET (Computer Science Deptt)
Fuzzy Logic: UIET (Computer Science Deptt)
Fuzzy Logic: UIET (Computer Science Deptt)
INRODUCTION
One of the most successful of today's technologies for developing sophisticated control systems.
Resembles human decision making with an ability to generate precise solutions from certain or approximate information.
INTRODUCTION
Fuzzy logic (FL) is focused on modes of reasoning which are approximate rather than exact.
A super set of Boolean logic. Graded truth - Truth values between True and False. Not everything is either/or, true/false, black/white, on/off etc.
Grades of membership - Class of tall men, class of far cities, class of expensive things, etc.
BACKGROUND
Aristotle and his precedent philosophers brought about the "Law of the Excluded Middle" which stated that every proposition must either be TRUE/FALSE.
Lotfi Zadeh, UC/Berkely 1965. Introduced FL to model uncertainty in natural language. Tall, far, nice, large, hot,
Real world - Imprecision, uncertainty and partiality , especially partiality of truth, certainty and possibility
Fuzzy logic (FL) is aimed at a formalization of modes of reasoning which are approximate rather than exact
Examples: Exact-
All men are mortal Socrates is a man Socrates is mortal Most Swedes are tall Magnus is a Swede It is likely that Magnus is tall
Approximate-
FUZZY SET
Boolean/Crisp set A is a mapping for the elements of S to the set {0, 1}, i.e., A: S -> {0, 1} Characteristic function: {A(x)=1 A(x) = 0 if x is an element of set A if x is not an element of set A }
__________________________________________________________ Fuzzy set F is a mapping for the elements of S to the interval [0, 1], i.e., F: S -> [0, 1]
Characteristic function: 0 F(x) 1 1 means full membership, 0 means no membership and anything in between, e.g., 0.5 is called graded membership
But what about a person with a height = 1.79 meters? What about 1.78 meters? What about 1.52 meters?
BIVALENT SETS
FUZZY SET
Observation
Membership Function
Ex: A subset young to answer the question "to what degree is person x young? young(x) = { 1, if age(x) <= 20,
0,
if age(x) > 30 }
PERSON
AGE
DEGREE OF YOUTH
Ram
Priya Preeti
10
21 25
1.00
0.90 0.50
Shweta
83
0.00
Union:
Intersection:
Complement:
Rules which are common in set theory also apply to Fuzzy set theory :
De Morgans Law
Associativity Commutativity Distributivity
FUZZY RULES
Where linguistic variable Xi, Yj take the value of fuzzy sets Ai, Bj.
In Boolean logic: p q if p is true then q is true In fuzzy logic: p q if p is true to some degree then q is true to some degree. 0.5p => 0.5q (partial premise implies partially)
FUZZY CONTROL
Three steps are taken to create a fuzzy controlled machine:
1) Fuzzification (Using membership functions to graphically describe a situation) 2) Rule evaluation (Application of fuzzy rules)
Fuzzy Rules
Example: If our distance to the car in front is small, and the distance is decreasing slowly, then decelerate quite hard Fuzzy variables in blue Fuzzy sets in red
QUESTION: Given the distance and the change in the distance, what acceleration should we select?
FUZZIFICATION
Fuzzification: Instance
Fuzzification : Instance
DEFUZZICATION
We return as our acceleration the value of x coordinate of the center of mass of the merged area.
Performance of the fuzzy machines is restricted by the capabilities of the human brain. Therefore, how do we make the machines think for themselves and come up with rules of its own?
The machine should be able to produce its own rules through experience with the help of fuzzy rules ,similar as human. This can be done with the Data In Rules Out (DIRO) method.
Neural networks, which acts like the eyes and ears of an adaptive fuzzy system whose rules change with experience. The adaptive fuzzy system tunes its rules as it samples new data. At first the rules change fast .
Smart controller - changes the cycle time depending upon the densities of cars behind green and red lights and the current cycle time. Conventional traffic light controller changes lights at constant cycle time.
Difficult Mathematical model. With fuzzy logic, it is relatively much easier.
FUZZY DESIGN
Number of cars between the traffic lights = difference of reading of two sensors The distance between two sensors is fixed say 200 feet. Density of cars = number of cars/distance
Assumption: Red light is shown to both North & South streets and distance is constant. Step -1 (FUZZIFICATION) Inputs:
Cycle Time Cars behind red light Cars behind green light
The input and output are divided into overlapping member functions Each function corresponds to different levels. For inputs (cycle time & cars behind red light) the levels and their ranges are: zero(0,1), low(0,7), medium(4,11), high(7,18), chaos(14,20). For input (cars behind green light) the levels are: v_short(0,14), short(0,34), medium(14,60), long(33,88), very long(65,100), limit(85,100).
For output the levels are: no(0), probably_no(0.25), maybe(0.5), probably_yes(0.75) and yes(1.0).
This one value (singleton position) is associated to each level instead of a range of values.
Rules are formulated using a series of if-then statements, combined with AND/OR operators.
Eg: If cycle time is medium AND Cars Behind Red is low AND Cars Behind Green is medium, then change is Probably Not. With three inputs, each having 5,5,and 6 membership functions, there are a combination of 150 rules.
Step 3 (Defuzzification)
Converts the fuzzy set output to crisp value. Method used : Centre Of Gravity
Crisp Output = {Sum (Membership Degree*Singleton Position} / Sum(Membership Degree)
Example Of Output
If the output membership degree, after rule evaluation are: Change Probability Yes=0, Change Probability Probably Yes=0.6, Change Probability Maybe=0.9, Change Probability Probably No= 0.3, Change Probability No=0.1
Crisp Output=(0.1*0.00) +(0.3*0.25) +(0.9*0.50) +(0.6*0.75) +(0*1.00)/ (0.1+0.3+0.9+0.6+0 )=0.51
Testing: 7 different kinds of traffic conditions from very heavy traffic to very lean traffic.
35 random chosen car densities were grouped according to different periods of the day representing those traffic conditions.
Performance Evaluation
//Program for selecting - optimum cycle time and offset corresponding to min delay& max flow//
Using MATLAB 7.0.1
F language
B language NL
NL: natural language B language: standard mathematical bivalent-logic-based language F language: fuzzy logic language without granulation F.G language: fuzzy logic language with granulation
bivalent-logic-based
SIMPLIFIED HIERARCHY
PNL B language NL
The expressive power of the B language the standard bivalence-logic-based definition language is insufficient fuzzy-logic-based bivalent-logic-based
Insufficiency of the expressive power of the B language is rooted in the fundamental conflict between bivalence and reality
LAZ 8-8-02
FUTURE APPLICATIONS
Smart washing machines, TVs Air Conditioner Controller Controlled steam engine Controlled cement kilns Controlled Nuclear Fusion Fuzzy Data Analysis in a Medical
Vast expert decision makers , theoretically able to distill the wisdom of every document ever written.
Sex robots with a humanlike repertoire of behavior. Computers that understand and respond to normal human language. Machines that write interesting novels and screenplays in a selected style , such as Hemingway's. Molecule-sized soldiers of health that will roam the blood-stream, killing cancer cells and slowing the aging process
With enormous research being going on there is no limit to where FUZZY LOGIC can go.. The future is bright.
THANKS.