MINE 432 Industrial Automation and Robotics
Part 3, Lecture 4 Fuzzy Logic A. Farzanegan (Visiting Associate Professor) Fall 2014 Norman B. Keevil Institute of Mining Engineering
Today’s Topics History of fuzzy logic Application of fuzzy logic in mining engineering Terminology Fuzzy sets Fuzzy membership function Fuzzy expert systems Fuzzification and defuzzification
MINE 432 - Industrial Automation and Robotics
2
History of Fuzzy Sets and Fuzzy Logic The concept of fuzzy sets was introduced by A. Lotfi Zadeh (UC at Berkeley) in 1965.
“People do not require precise, numerical information input, and yet they are capable of highly adaptive control.” A fuzzy logic based system was introduced, for the first time, by Japanese to control Sendai Railway in 1985 which was put into operation in 1987. The ride is so smooth, riders do not need to hold straps. MINE 432 - Industrial Automation and Robotics
3
Why Fuzzy Logic? Fuzzy logic is not based on precise input, therefore, makes it easier to deal with real world problems. Development and implementation of fuzzy logic based systems are easier. Fuzzy logic does not require complicated mathematical process models, only a practical understanding of the overall system behavior is needed.
Fuzzy logic provides higher accuracy and smoother control. MINE 432 - Industrial Automation and Robotics
4
Tipping example The Basic Tipping Problem: Given a number between 0 and 10 that represents the quality of service at a restaurant what should the tip be?
An average tip for a meal in the U.S. is 15%, which may vary depending on the quality of the service provided.
MINE 432 - Industrial Automation and Robotics
5
Tipping example: The non-fuzzy approach Tip = 15% of total bill
What about quality of service? MINE 432 - Industrial Automation and Robotics
6
Tipping example: The non-fuzzy approach Tip = linearly proportional to service from 5% to 25% tip = 0.20/10*service+0.05
What about quality of the food? MINE 432 - Industrial Automation and Robotics
7
Tipping example: Extended The Extended Tipping Problem: Given a number between 0 and 10 that represents the quality of service and the quality of the food, at a restaurant, what should the tip be? How will this affect the tipping formula?
MINE 432 - Industrial Automation and Robotics
8
Tipping example: The non-fuzzy approach Tip = 0.20/20*(service+food)+0.05
We want service to be more important than food quality. E.g., 80% for service and 20% for food. MINE 432 - Industrial Automation and Robotics
9
Tipping example: The non-fuzzy approach Tip = servRatio*(.2/10*(service)+.05) + (1-servRatio)*(.2/10*(food)+0.05);
servRatio = 80%
Seems too linear. Want 15% tip in general and deviation only for exceptionally good or bad service. MINE 432 - Industrial Automation and Robotics
10
Tipping example: The non-fuzzy approach if service < 3, tip(f+1,s+1) = servRatio*(.1/3*(s)+.05) + ... (1-servRatio)*(.2/10*(f)+0.05); elseif s < 7, tip(f+1,s+1) = servRatio*(.15) + ... (1-servRatio)*(.2/10*(f)+0.05); else, tip(f+1,s+1) = servRatio*(.1/3*(s-7)+.15) + ... (1-servRatio)*(.2/10*(f)+0.05); end; MINE 432 - Industrial Automation and Robotics
11
Tipping example: The non-fuzzy approach Nice plot but ‘Complicated’ function Not easy to modify Not intuitive Many hard-coded parameters Not easy to understand
MINE 432 - Industrial Automation and Robotics
12
Tipping problem: the fuzzy approach What we want to express is: 1. If service is poor then tip is cheap 2. If service is good the tip is average 3. If service is excellent then tip is generous 4. If food is rancid then tip is cheap 5. If food is delicious then tip is generous or 1. If service is poor or the food is rancid then tip is cheap 2. If service is good then tip is average 3. If service is excellent or food is delicious then tip is generous
We have just defined the rules for a fuzzy logic system. MINE 432 - Industrial Automation and Robotics
13
Tipping problem: fuzzy solution Decision function generated using the 3 rules.
MINE 432 - Industrial Automation and Robotics
14
Applications of Fuzzy Logic in Mining In mineral processing, numerous research has been done by Prof. John Meech and his graduate students and colleagues for developing fuzzy expert systems. Drilling and Blasting Prediction of environmental impacts of quarry blasting operation using fuzzy logic
MINE 432 - Industrial Automation and Robotics
15
Applications of Fuzzy Logic in Mining Rock mechanics • Prediction of specific energy requirement for TBM performance prediction • Prediction of rock burst prediction • Assessment of spelling occurrence in underground openings • Diggability index rating for surface mine equipment selection
MINE 432 - Industrial Automation and Robotics
16
Universe (Domain) of Discourse The term universe of discourse generally refers to the collection of objects being discussed in a specific discourse. For example, if we are discussing geometry the set of all possible geometrical objects such as circle, rectangle, triangle, cube etc. are universe of discourse or simply universe. In a discourse, statements are made about objects of universe of discourse.
MINE 432 - Industrial Automation and Robotics
17
Crips Sets and Fuzzy Sets Conventional or crisp sets are binary. An object either belongs to a crisp set or it does not. In fuzzy set theory, on the other hand, an object can be a member of a set with some degree or grade.
MINE 432 - Industrial Automation and Robotics
18
Crips Sets and Fuzzy Sets 1
1
0.8
0.8
0.6
0.6
0.4
Short
Medium
Tall
0.4
0.2
0.2
0
0 150 160 170 180 190 200 210
MINE 432 - Industrial Automation and Robotics
Short
Medium
Tall
150 160 170 180 190 200 210
19
An Example of A Fuzzy Set Consider the set of “fine” particles which are considered as slimes in flotation context: • What slimes means in mineral processing? • Do particles with a size about 3 micron belong to the set of fine particles? • How about particles with a size about 45 micron? • And how about particles with a size about 3000 micron? MINE 432 - Industrial Automation and Robotics
20
Fuzzy Linguistic Variables The word “fine” which is used to define the fuzzy set of fine particles is a fuzzy linguistic variable. Similarly, coarse, small, heavy, light , fast, slow, hot, cold, tall and short are also fuzzy linguistic variables. In real life, linguistic variables are used frequently to describe a specific property of an object. These variables are inherently fuzzy. For example, a patient tells his/her doctor I have a severe pain. Severeness of pain is fuzzy. The same degree of pain might be severe for a person while being a normal pain by another person. MINE 432 - Industrial Automation and Robotics
21
Fuzzy Linguistic Hedges •
A hedge is a qualifier used to avoid total commitment or to make a statement more vague or more definite.
•
An intentionally noncommittal or ambiguous statement.
•
A word or phrase, such as possibly or I think, that mitigates or weakens the certainty of a statement. MINE 432 - Industrial Automation and Robotics
Feed is coarse Feed is too coarse Feed is very coarse Feed is possibly coarse Bubbles are small Bubbles are extremely small Bubbles are loaded Bubbles are heavily loaded
22
Partial Truth and Bipolar Paradoxes • • • •
I never tell the truth. This statement is false. Never say never A politician says: All politicians are liars. Is this true? If so, then he is not a liar. • A card states on one side: The sentence on the other side is false... On the other side appears: The sentence on the other side is true... MINE 432 - Industrial Automation and Robotics
23
Other Examples Consider the following two sentences: A Number 25 is an integer number. B Number 25000 is a big number. A The size of the particle is 45 micron. B The size of the particle is too small.
Which sentence is fuzzy? MINE 432 - Industrial Automation and Robotics
24
Proposition and Predicate • A proposition is a declarative statement that contain no variables. Propositional logic reasons about propositions. For example: The d80 of ball mill feed is 5 millimeter. • A predicate is a declarative statement which contain one or more variables and becomes a proposition when its variables assume allowed values. Predicate logic involves reasoning about predicates. For example: D80 of ball mill feed is larger than x D80,feed>x MINE 432 - Industrial Automation and Robotics
25
Fuzzy Logic Fuzzy logic is based on theory of fuzzy sets and can be used to reason about fuzzy propositions. Fuzzy logic provides a method to formalize reasoning when dealing with vague terms. In fuzzy logic reasoning, inputs or outputs can be partially true or false, unlike Boolean logic in which they are either 1 or 0. MINE 432 - Industrial Automation and Robotics
26
Fuzzy Logic (Cont’d) • Fuzzy logic is a superset of conventional Boolean logic. • Boolean logic propositions take a value of either completely true or completely false • Fuzzy logic handles the concept of partial truth, i.e., values between the two extremes.
MINE 432 - Industrial Automation and Robotics
27
Crisp Membership Functions Suppose A is the set of numbers greater than 2, then the set membership is a crisp one with values of 0 or 1.
A ={x | x>2} A(x) 1
x 2 MINE 432 - Industrial Automation and Robotics
28
Fuzzy Membership Functions Suppose B is the set of numbers close to integer number 2. The set membership is not crisp.
1 B ( x) 2 ( x 2)
B ( x) e
| x 2|
MINE 432 - Industrial Automation and Robotics
29
Fuzzy Membership Function (Cont’d)
MINE 432 - Industrial Automation and Robotics
30
Degree of Fuzziness
MINE 432 - Industrial Automation and Robotics
31
Application of Fuzzy Logic in Control Systems One of the most important application of fuzzy logic is in developing systems to control machines and industrial processes, For example: • Robot navigation control system and obstacle avoidance. • Control of water temperature • Control of mineral processing systems such as grinding and flotation.
MINE 432 - Industrial Automation and Robotics
32
Fuzzy Rule-Based Expert Systems Fuzzy expert systems can accepts fuzzy propositions as their premises and apply fuzzy rules to drive conclusions that are fuzzy. Fuzzy rules are based on a human expert spoken rule such as: If CURRENT DRAW is LOW Then INCREASE FEEDRATE A LOT Provided SCREEN BIN LEVEL is not TOO-HIGH Fuzzification and defuzzification is used to interact with environment in control systems. MINE 432 - Industrial Automation and Robotics
33
Fuzzy Inference Crisp Input
Fuzzification
Antecedents Rules Consequents
Defuzzification
Crisp Output MINE 432 - Industrial Automation and Robotics
34
Fuzzification Fuzzification transforms the crisp antecedents into a vector of fuzzy membership values. By fuzzification, a series of numbers are assigned to an object that shows the degree that an object belongs to a predefined fuzzy set. Feed size is 5 µm.
Mfeed size = {ms = 0.9 , mM = 0.1 , mc = 0}
MINE 432 - Industrial Automation and Robotics
35
Defuzzification Defuzzification converts the output fuzzy numbers into a unique (crisp) number. There are two methods to defuzzify output fuzzy numbers:
MINE 432 - Industrial Automation and Robotics
36
Fuzzy Logic Tools • Fuzzy logic toolbox of MATLAB software. • FuzzyClips http://awesom.eu/~cygal/archives/2010/04/22/fuzzycl ips_downloads/index.html
MINE 432 - Industrial Automation and Robotics
37
Sources http://www.jmeech.mining.ubc.ca/ http://www.scribd.com/doc/197151301/Fuzzy-Logic-Intro
http://towhidkhah.ir/MI/Resources/Fuzzy/FuzzyTutorial.PPT Fuzzy Logic - Massey University
MINE 432 - Industrial Automation and Robotics
38
Questions?
MINE 432 - Industrial Automation and Robotics
39