SlideShare a Scribd company logo
N.B. Venkateswawrlu
AITAM, Tekkali
www.ritchcenter.com/nbv
venkat_ritch@yahoo.com
Formerly at U. of Leeds, UK
Also, at BITS, Pilani
Fuzzy Mathematics : An
application Oriented
introduction
Thanks a lot for Inviting.
I am not a Mathematician!!!.
I am an Engineering teacher.
Thus, my talk will be more
application oriented!!!. Of
course, I am a great Mathematics
fan.
Rather, I can say that I am that
group of people who supports
practical, example based
illustrated teaching. This lecture
series is also to request you,
Mathematics teachers to explore
the possibility of teaching with
Engineering examples.
What am I going to cover?
• Introduction and background.
• Fuzzy Sets.
• Simple Fuzzy Mathematical operations
• Fuzzy Relations.
• How to design a Fuzzy control system?
• More Practical Fuzzy Control examples.
Do forgive me for not using
standardized notations in the
presentation.
The syllabus of your course
seems to be too fuzzy!!!!.
A simple satire, do take it in light
manner.
Traditional (Crisp) logic
In 300 B.C. Aristotle formulated the law of
the excluded middle, which is now the
principle foundation of mathematics.
X must be in a set of A or in a set of not A.
In logic, the law of
excluded middle says that
a proposition can be
either true or false.
Classical sets
Classical sets are also called crisp (sets).
Ex: A = {apples, oranges, cherries, mangoes}
A = {a1,a2,a3 }
A = {2, 4, 6, 8, …}
Mathematically:
A = {x | x is an even natural number}
A = {x | x = 2n, n is a natural number}
Membership or characteristic function









Ax
Ax
x
A if0
if1
)(
Crisp (Traditional) Variables
• Crisp variables represent precise quantities:
– x = 3.1415296
– A {0,1}
• A proposition is either True or False
– A  B  C
• King(Richard)  Greedy(Richard) 
Evil(Richard)
• Richard is either greedy or he isn't:
– Greedy(Richard) {0,1}
29
Is rose is RED? Is rose is not RED?.
Is rose is not RED?.
Traditional (crisp) logic
Traditional (crisp) logic
What about this rose?. Is
rose is not RED?.
What color is this leopard?
Is this glass full or empty?
Where do tall people
start?
A tall guy
Crisp
Crisp
Are bowls having oranges?.
Fuzzy
Are bowls are full of Apples?.
Thus, fuzzy can be said as
imprecise or not clear cut.
What is fuzzy logic?
Fuzzy logic is a superset of conventional
(Boolean) logic that has been extended to
handle the concept of partial truth -- truth
values between "completely true" and
"completely false".
What is fuzzy logic?
A type of logic that recognizes more than simple true and false
values. With fuzzy logic, propositions can be represented with
degrees of truthfulness and falsehood. For example, the statement,
today is sunny, might be 100% true if there are no clouds, 80% true if
there are a few clouds, 50% true if it's hazy and 0% true if it rains all
day.
Fuzzy logic has proved to be particularly useful in expert
system and other artificial intelligence applications. It is also used
in some spell checkers to suggest a list of probable words to
replace a misspelled one.
Fuzzy Logic
“ A form of knowledge representation
suitable for notions that cannot be defined
precisely, but which depend upon their
context. It enables computerized devices to
reason more like humans”
Classical Set (Crisp)
• Contain objects that satisfy precise
properties of membership.
– Example: Set of heights from 5 to 7 feet
5 6 7 X (height)
c (x) = {A
1 x є A
0 x є A
0
1
Characteristic Function
Fuzzy Sets as Possibility Measure
modeling-parameter
Degree of membership to a fuzzy set
1
0

certainly possible values
certainly not possible values
as for known analytical models
more or less possible values
Crispmeans,exactly known parameter value, e. g.:
13.21345678953142........
- 3 -
An example to elucidate
possibility (not probability).
• Probability is based on chance
• Possibility is based on similarity. Fuzzy set
theory is around this.
• Take an example where you are in midst of a
desert and thirsty. You found to bottles of
water with two ratings on them, probability
of good water and possibility of good water.
Ratings of first bottle:0.9,0.5 while second
bottle is:0.5,0.9. Which one do you pick up
Fuzzy Set
• Contain objects that satisfy imprecise
properties of membership
– Example : The set of heights in the region
around 6 feet
5 6 7 X (height)
 (x)є {0-1}
A
0
1
Membership Function
Some More Membership functions (figure from Klir&Yuan)
Fuzzy Sets
• What if Richard is only somewhat
greedy?
• Fuzzy Sets can represent the degree
to which a quality is possessed.
• Fuzzy Sets (Simple Fuzzy Variables)
have values in the range of [0,1]
• Greedy(Richard) = 0.7
• Question: How evil is Richard?
Fuzzy sets: Linguistic Variables
• Fuzzy Linguistic Variables are used to
represent qualities spanning a particular
spectrum
• Temp: {Freezing, Cool, Warm, Hot}
• Membership Function
• Question: What is the temperature?
• Answer: It is warm.
• Question: How warm is it?
• Directions For soup preparation:
• 1. Empty contents into saucepan; add 4½
cups (1 L) cold water.
• 2. Bring to a boil, stirring constantly.
• 3. Reduce heat; partially cover and simmer
for 15 minutes, stirring occasionally.
Fuzzy Linguistic Variables
Linguistic variables: Our report
to the physician.
• High fever
• frequent coughing.
• Shaking,
• Too chilling
• Hardly, I can move
Fuzzy Logic: Motivations
• Alleviate difficulties in developing and
analyzing complex systems encountered
by conventional mathematical tools.
• Observing that human reasoning can utilize
concepts and knowledge that do not have
well-defined, sharp boundaries.
Fuzzy mathematics:An application oriented introduction
Fuzzy mathematics:An application oriented introduction
Representing Age
• Fuzzy sets can be used to represent fuzzy concepts. Let U be a
reasonable age interval of human beings.
• U = {0, 1, 2, 3, ... , 100}
• Solution 2-1. This interval can be interpreted with fuzzy sets by setting
the universal space for age to range from 0 to 100.
• Assume that the concept of "young" is represented by a fuzzy
set Young, whose membership function is given by the following fuzzy
set.
• The concept of "old" can also be represented by a fuzzy set, Old, whose
membership function could be defined in the following way.
• We define the concept of middle-aged to be neither young nor old. We
do this by using fuzzy operators from Fuzzy Logic.
• We can find a fuzzy set to represent the concept of middle-aged by
taking the intersection of the complements of our Young and Old fuzzy
sets.
• We can now see a graphical interpretation of our age descriptors.
From the graph, you can see that the intersection of "not young" and
"not old" gives a reasonable definition for the concept of "middle-
aged."
Fuzzy mathematics:An application oriented introduction
Membership Functions
• How cool is 36 F° ?
50 70 90 1103010
Temp. (F°)
Freezing Cool Warm Hot
0
1
Membership Functions
• How cool is 36 F° ?
• It is 30% Cool and 70% Freezing
50 70 90 1103010
Temp. (F°)
Freezing Cool Warm Hot
0
1
0.7
0.3
Natural Numbers
• Suppose you are asked to define the set of
natural numbers close to 6. There are a number
of different ways in which you could accomplish
this using fuzzy sets.
• Solution 1. One solution would be to manually
create a fuzzy set describing the numbers near
6. This can be done as above.
Fuzzy mathematics:An application oriented introduction
Fuzzy mathematics:An application oriented introduction
Choosing a Job
• Fuzzy sets can be used to aid in decision making
or management. We illustrate this with an
example from Klir and Folger [Klir and Folger,
1988]. Given four jobs (Jobs 1, 2, 3, and 4), our task
is to choose the job that will give us the highest
salary, given the constraints that the job should
be interesting and close to our home.
• Solution. The first constraint of job interest can
be represented with the following fuzzy set.
• We can see that Job 3 has the highest
membership grade, meaning that Job 3 is the
most interesting of the four jobs. Job 1 on the
other hand is the least interesting, since it has a
membership grade of only 0.4.
• We can form a fuzzy set for our second constraint
in a similar manner. Here is a fuzzy set used to
represent the driving distance to the four jobs.
• In the fuzzy set above, the membership grades
indicate the length of the drive to work. A high
membership grade indicates that it is a short
drive to work--a good thing. A small membership
grade indicates an undesirable, long drive to
work. From the fuzzy set above, we can see that Job
4 is located near our home, while Job 1 is a long
way from our home.
Fuzzy mathematics:An application oriented introduction
Fuzzy Logic: Motivations
Fuzzy Logic: Motivations
History of Fuzzy Logic
•1964: Lotfi A. Zadeh, UC Berkeley, introduced
the paper on fuzzy sets.
– Idea of grade of membership was born
– Sharp criticism from academic community
• Name!
• Theory’s emphasis on imprecision
– Waste of government funds!
History of Fuzzy Logic
• 1965-1975: Zadeh continued to broaden the
foundation of fuzzy set theory
– Fuzzy multistage decision-making
– Fuzzy similarity relations
– Fuzzy restrictions
– Linguistic hedges
•1970s: research groups were form in JAPAN
History of Fuzzy Logic
• 1974: Mamdani, United Kingdom, developed
the first fuzzy logic controller
•1977: Dubois applied fuzzy sets in a
comphrensive study of traffic conditions
•1976-1987: Industrial application of fuzzy
logic in Japan and Europe
•1987-Present: Fuzzy Boom
Fuzzy Logic Applications
“If all motion vectors are almost parallel and their time differential is small, then
the hand jittering is detected and the direction of the hand movement
is in the direction of the moving vectors”.
Image Stabilization via Fuzzy Logic
Fuzzy Logic Applications
• Aerospace
– Altitude control of spacecraft, satellite altitude
control, flow and mixture regulation in aircraft de-
icing vehicles.
• Automotive
– Trainable fuzzy systems for idle speed control, shift
scheduling method for automatic transmission,
intelligent highway systems, traffic control, improving
efficiency of automatic transmissions
Fuzzy Logic Applications (Cont.)
• Business
– Decision-making support systems, personnel
evaluation in a large company
• Chemical Industry
– Control of pH, drying, chemical distillation processes,
polymer extrusion production, a coke oven gas cooling
plant
Fuzzy Logic Applications (Cont.)
• Defense
– Underwater target recognition, automatic target
recognition of thermal infrared images, naval decision
support aids, control of a hypervelocity interceptor,
fuzzy set modeling of NATO decision making.
• Electronics
– Control of automatic exposure in video cameras,
humidity in a clean room, air conditioning systems,
washing machine timing, microwave ovens, vacuum
cleaners.
Fuzzy Logic Applications (Cont.)
• Financial
– Banknote transfer control, fund management, stock
market predictions.
• Industrial
– Cement kiln controls (dating back to 1982), heat
exchanger control, activated sludge wastewater
treatment process control, water purification plant
control, quantitative pattern analysis for industrial
quality assurance, control of constraint satisfaction
problems in structural design, control of water
purification plants
Fuzzy Logic Applications (Cont.)
• Manufacturing
– Optimization of cheese production.
• Marine
– Autopilot for ships, optimal route selection, control of
autonomous underwater vehicles, ship steering.
• Medical
– Medical diagnostic support system, control of arterial
pressure during anesthesia, multivariable control of
anesthesia, modeling of neuro-pathological findings
in Alzheimer's patients, radiology diagnoses, fuzzy
inference diagnosis of diabetes and prostate cancer.
Fuzzy Logic Applications (Cont.)
• Mining and Metal Processing
– Sinter plant control, decision making in metal forming.
• Robotics
– Fuzzy control for flexible-link manipulators, robot arm
control.
• Securities
– Decision systems for securities trading.
Fuzzy Logic Applications (Cont.)
• Signal Processing and
Telecommunications
– Adaptive filter for nonlinear channel equalization
control of broadband noise
• Transportation
– Automatic underground train operation, train schedule
control, railway acceleration, braking, and stopping
Fuzzy logic & probability theory
• Suppose you are seated at a table on which
rest two glasses of liquid.
– First glass is described : “having a 95% chance Of
being healthful and good”
– Second glass is described : “having a .95
membership in the class of healthful and good”
• Which glass would you select, keeping in mind that
the first glass has a 5 % chance of being filled with non-healthful liquids,
including poisons [Bezdek 1993]?
Air conditioner (Mitsubishi)
• Conventional air conditioning systems use on-off controllers. When
the temperature drops below a preset level the unit is automatically
turned off. When the temperature rises above a preset level the unit is
turned on. The former preset value is slightly lower than the latter
preset value, providing a dead zone, so that high-frequency on-off
cycling (chatter) is avoided. The thermostat in the system controls
the on-off action. For example, "when the temperature rises to 25°C,
turn on the unit, and when the temperature falls to 20°C, turn off the
unit." The Mitsubishi air conditioner controls by using fuzzy rules
such as: "If the ambient air is getting warmer, turn the cooling power
up a little; if the air is getting chilly, turn the power down moderately,
etc." The machine becomes smoother as a result. This means less
wear and tear of the air conditioner, more consistent comfortable
room temperatures, and increased efficiency (energy savings).
Vacuum cleaner (Panasonic)
• Characteristics of the floor and the amount of dust are
sensed by an infrared sensor, and the microprocessor
selects the appropriate power by fuzzy control according
to these characteristics. The floor characteristics include
the type (hardwood, cement, tile, carpet softness, carpet
thickness, etc.). The changing pattern of the amount of
dust passing through the infrared sensor is established
as well. The microprocessor establishes the appropriate
setting of the vacuum head and the power of the motor,
using a fuzzy control scheme. Red and green lamps of the
vacuum cleaner show the amount of dust left on the floor.
Automatic transmission system (Nissan, Subaru, Mitsubishi)
• In a conventional automatic transmission system, electronic sensors
measure the vehicle speed and throttle opening, and gears are
shifted based on the predetermined values of these variables.
According to Nissan, this type of system is incapable of uniformly
providing satisfactory control performance to a driver because it
provides only about three different shift patterns. The fuzzy control
transmission senses several variables including vehicle speed and
acceleration, throttle opening, the rate of change of throttle opening,
engine load, and driving style. Each sensed value is given a weight,
and a fuzzy aggregate is calculated to decide whether to shift gears.
This controller is said to be more flexible, smooth, and efficient,
providing better performance. Also, an integrated system developed
by Mitsubishi uses fuzzy logic for active control of the suspension
system, four-wheel-drive (traction), steering, and air conditioning.
Washing machine (Matsushita,
Hitachi)
• The control system senses both quality and quantity of
dirt, load size, and fabric type, and adjusts the washing
cycle and detergent amount accordingly. Clarity of water
in the washing machine is measured by light sensors. At
the start of the cycle, dirt from clothes will not have yet
reached the water, so light will pass through it easily. The
water becomes more discoloured as the wash cycle
proceeds, and less light will pass through. This
information is analyzed and control decisions are made
using fuzzy logic.
Camcorder (Panasonic, Sanyo, Fisher, Canon)
• The video camera determines the best focus and lighting,
particularly when several objects are in the picture. Also,
it has a digital image stabilizer to remove hand jitter. Fuzzy
decision-making is used in these actions. For example,
the following scheme is used for image stabilization. The
present image frame is compared with the previous frame
from memory. A typically stationary object (e.g., house) is
identified and its shift coordinates are computed. This
shift is subtracted from the image to compensate for the
hand jitter. A fuzzy algorithm provides a smooth
control/compensation action.
Other…
• Elevator control (Fujitec, Toshiba): A fuzzy scheme evaluates
passenger traffic and the elevator variables (load, speed, etc.) to
determine car announcement and stopping time. This reduces
waiting time and improves the efficiency and reliability of operation.
• Handheld computer (Sony): A fuzzy logic scheme reads the hand-
written input and interprets the characters for data entry.
• Television (Sony): A fuzzy logic scheme uses sensed variables such as
ambient lighting, time of day, and user profile, and adjusts such
parameters as screen brightness, colour, contrast, and sound.
• Antilock braking system (Nissan): The system senses wheel speed,
road conditions, and driving pattern, and the fuzzy ABS determines the
braking action, with skid control.
Other…
• Subway train (Sendai): A fuzzy decision scheme is used by the subway
trains in Sendai, Japan, to determine the speed and stopping routine.
Ride comfort and safety are used as performance requirements.
• Other applications of fuzzy logic include a hot water heater
(Matsushita), a rice cooker (Hitachi), and a cement kiln (Denmark). A
fuzzy stock-trading program can manage stock portfolios. A fuzzy golf
diagnostic system is able to select the best golf club based on size,
characteristics, and swing of a golfer. A fuzzy mug search system
helps in criminal investigations by analyzing mug shots (photos of
the suspects) along with other input data (say, statements such as
"short, heavy-set, and young-looking . . ." from witnesses) to
determine the most likely criminal. Gift-wrapped chocolates with
fuzzy statements are available for Valentine's Day. Even a Yamaha
"fuzzy" scooter was spotted in Taipei.
Fuzzy Set Definitions
Fuzzy sets
A fuzzy set is a set with a smooth boundary.
A fuzzy set is defined by a functions that maps
objects in a domain of concern into their
membership value in a set.
Such a function is called the membership function.
Features of the Membership
Function
• Core: comprises those
elements x of the universe
such that 
a (x) = 1.
• Support : region of the
universe that is characterized
by nonzero membership.
• Boundary :boundaries
comprise those elements x of
the universe such that
0< 
a (x) <1
Features of the Membership
Function (Cont.)
• Normal Fuzzy Set : at least one element x in the
universe whose membership value is unity
Features of the Membership
Function (Cont.)
• Convex Fuzzy set: membership values are strictly
monotonically increasing, or strictly monotonically
decreasing, or strictly monotonically increasing then
strictly monotonically decreasing with increasing
values for elements in the universe.

a (y) ≥ min[
a (x) , 
a (z) ]
Features of the Membership
Function (Cont.)
• Cross-over points : 
a (x)= 0.5
• Height: defined as max {
a (x)}
Fuzzy Set (figure from Earl Cox)
Definitions – fuzzy sets (figure from Klir&Yuan)
Definitions: Fuzzy Sets (figure from Klir&Yuan)
Fuzzy set (figure from Earl Cox)
Design Membership Functions
Manual
- Expert knowledge. Interview those who are
familiar with the underlying concepts and later
adjust. Tuned through a trial-and-error
- Inference
- Statistical techniques (Rank ordering)
Intuition
• Derived from the capacity of humans to
develop membership functions through their
own innate intelligence and understanding.
• Involves contextual and semantic knowledge
about an issue; it can also involve linguistic
truth values about this knowledge.
Fuzzy Logic with Engineering Applications: Timothy J. Ross
Inference
• Use knowledge to perform deductive
reasoning, i.e . we wish to deduce or infer a
conclusion, given a body of facts and
knowledge.
Inference : Example
• In the identification of a triangle
– Let A, B, C be the inner angles of a triangle
• Where A≥ B≥C
– Let U be the universe of triangles, i.e.,
• U = {(A,B,C) | A≥B≥C≥0; A+B+C = 180˚}
– Let ‘s define a number of geometric shapes
• I Approximate isosceles triangle
• R Approximate right triangle
• IR Approximate isosceles and right triangle
• E Approximate equilateral triangle
• T Other triangles
Fuzzy Logic with Engineering Applications: Timothy J. Ross
Inference : Example
• We can infer membership values for all of
these triangle types through the method of
inference, because we possess knowledge
about geometry that helps us to make the
membership assignments.
• For Isosceles,
 i (A,B,C) = 1- 1/60* min(A-B,B-C)
– If A=B OR B=C THEN i (A,B,C) = 1;
– If A=120˚,B=60˚, and C =0˚ THEN i (A,B,C) = 0.
Fuzzy Logic with Engineering Applications: Timothy J. Ross
Inference : Example
• For right triangle,
 R (A,B,C) = 1- 1/90* |A-90˚|
– If A=90˚ THEN i (A,B,C) = 1;
– If A=180˚ THEN i (A,B,C) = 0.
• For isosceles and right triangle
– IR = min (I, R)
 IR (A,B,C) = min[I (A,B,C), R (A,B,C)]
= 1 - max[1/60min(A-B, B-C), 1/90|A-90|]
Fuzzy Logic with Engineering Applications: Timothy J. Ross
Inference : Example
• For equilateral triangle
 E (A,B,C) = 1 - 1/180* (A-C)
– When A = B = C then E (A,B,C) = 1,
A = 180 then E (A,B,C) = 0
• For all other triangles
– T = (I.R.E)’ = I’.R’.E’
= min {1 - I (A,B,C) , 1 - R (A,B,C) , 1 - E (A,B,C)
Fuzzy Logic with Engineering Applications: Timothy J. Ross
Inference : Example
– Define a specific triangle:
• A = 85˚ ≥ B = 50˚ ≥ C = 45˚
R = 0.94
I = 0.916
IR = 0.916
E = 0. 7
T = 0.05
Fuzzy Logic with Engineering Applications: Timothy J. Ross
Fuzzy mathematics:An application oriented introduction
Fuzzy Sets Example
The temperature graduations are
related to Johnny’s perception of
ambient temperatures.
where:
Y : temp value belongs to the set
(0<A(x)<1)
Y* : temp value is the ideal
member to the set (A(x)=1)
N : temp value is not a member of
the set (A(x)=0)
Temp
(0C).
COLD COOL PLEASANT WARM HOT
0 Y* N N N N
5 Y Y N N N
10 N Y N N N
12.5 N Y* N N N
15 N Y N N N
17.5 N N Y* N N
20 N N N Y N
22.5 N N N Y* N
25 N N N Y N
27.5 N N N N Y
30 N N N N Y*
Fuzzy Sets Example
Johnny’s perception of the speed
of the motor is as follows:
where:
Y : temp value belongs to the set
(0<A(x)<1)
Y* : temp value is the ideal
member to the set (A(x)=1)
N : temp value is not a member of
the set (A(x)=0)
Rev/sec
(RPM)
MINIMAL SLOW MEDIUM FAST BLAST
0 Y* N N N N
10 Y N N N N
20 Y Y N N N
30 N Y* N N N
40 N Y N N N
50 N N Y* N N
60 N N N Y N
70 N N N Y* N
80 N N N Y Y
90 N N N N Y
100 N N N N Y*
Fuzzy Sets Example
• The analytically expressed membership for the reference fuzzy
subsets for the temperature are:
• COLD:
for 0 ≤ t ≤ 10 COLD(t) = – t / 10 + 1
• SLOW:
for 0 ≤ t ≤ 12.5 SLOW(t) = t / 12.5
for 12.5 ≤ t ≤ 17.5 SLOW(t) = – t / 5 + 3.5
• etc… all based on the linear equation:
y = ax + b
Fuzzy Sets Example
Temperature Fuzzy Sets
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
0 5 10 15 20 25 30
Temperature Degrees C
TruthValue
Cold
Cool
Pleasent
Warm
Hot
Fuzzy Sets Example
• The analytically expressed membership for the reference fuzzy
subsets for the temperature are:
• MINIMAL:
for 0 ≤ v ≤ 30 COLD(t) = – v / 30 + 1
• SLOW:
for 10 ≤ v ≤ 30 SLOW(t) = v / 20 – 0.5
for 30 ≤ v ≤ 50 SLOW(t) = – v / 20 + 2.5
• etc… all based on the linear equation:
y = ax + b
Fuzzy Sets Example
Speed Fuzzy Sets
0
0.2
0.4
0.6
0.8
1
0 10 20 30 40 50 60 70 80 90 100
Speed
TruthValue
MINIMAL
SLOW
MEDIUM
FAST
BLAST
Girl-Student Membership Function for “Young”
 










xif
xif
x
xif
xS
400
4025
15
40
251
Membership Function for “Young”
 










xif
xif
x
xif
xB
700
7040
30
70
401
Rank ordering
• Assessing preferences by a single individual, a
committee, a poll, and other opinion methods
can be used to assign membership values to a
fuzzy variable.
• Preference is determined by pair-wise
comparisons, and these determine the
ordering of the membership.
Rank ordering: Example
Fuzzy Set Operations
Characteristics of Fuzzy Sets
• The classical set theory developed in the late 19th century by Georg
Cantor describes how crisp sets can interact. These interactions are
called operations.
• Also fuzzy sets have well defined properties.
• These properties and operations are the basis on which the fuzzy sets
are used to deal with uncertainty on the one hand and to represent
knowledge on the other.
Note: Membership Functions
• For the sake of convenience, usually a fuzzy set is denoted as:
A = A(xi)/xi + …………. + A(xn)/xn
where A(xi)/xi (a singleton) is a pair “grade of membership” element,
that belongs to a finite universe of discourse:
A = {x1, x2, .., xn}
Operations of Fuzzy Sets
Intersection Union
Complement
Not A
A
Containment
AA
B
BA BAA B
Complement
• Crisp Sets: Who does not belong to the set?
• Fuzzy Sets: How much do elements not belong to the set?
• The complement of a set is an opposite of this set. For example, if we
have the set of tall men, its complement is the set of NOT tall men.
When we remove the tall men set from the universe of discourse, we
obtain the complement.
• If A is the fuzzy set, its complement A can be found as follows:
A(x) = 1  A(x)
Containment
• Crisp Sets: Which sets belong to which other sets?
• Fuzzy Sets: Which sets belong to other sets?
• Similar to a Chinese box, a set can contain other sets. The smaller set
is called the subset. For example, the set of tall men contains all tall
men; very tall men is a subset of tall men. However, the tall men set is
just a subset of the set of men. In crisp sets, all elements of a subset
entirely belong to a larger set. In fuzzy sets, however, each element
can belong less to the subset than to the larger set. Elements of the
fuzzy subset have smaller memberships in it than in the larger set.
Intersection
• Crisp Sets: Which element belongs to both sets?
• Fuzzy Sets: How much of the element is in both sets?
• In classical set theory, an intersection between two sets contains the
elements shared by these sets. For example, the intersection of the
set of tall men and the set of fat men is the area where these sets
overlap. In fuzzy sets, an element may partly belong to both sets with
different memberships.
• A fuzzy intersection is the lower membership in both sets of each
element. The fuzzy intersection of two fuzzy sets A and B on universe of
discourse X:
AB(x) = min [A(x), B(x)] = A(x)  B(x),
where xX
Union
• Crisp Sets: Which element belongs to either set?
• Fuzzy Sets: How much of the element is in either set?
• The union of two crisp sets consists of every element that falls into
either set. For example, the union of tall men and fat men contains all
men who are tall OR fat.
• In fuzzy sets, the union is the reverse of the intersection. That is, the
union is the largest membership value of the element in either set.
The fuzzy operation for forming the union of two fuzzy sets A and B on
universe X can be given as:
AB(x) = max [A(x), B(x)] = A(x)  B(x),
where xX
Operations of Fuzzy Sets
Complement
0
x
1
(x)
0
x
1
Containment
0
x
1
0
x
1
A B
Not A
A
Intersection
0
x
1
0
x
A B
Union
0
1
A B
A B
0
x
1
0
x
1
B
A
B
A
(x)
(x) (x)
Properties of Fuzzy Sets
• Equality of two fuzzy sets
• Inclusion of one set into another fuzzy set
• Cardinality of a fuzzy set
• An empty fuzzy set
• -cuts (alpha-cuts)
Equality
• Fuzzy set A is considered equal to a fuzzy set B, IF AND ONLY IF (iff):
A(x) = B(x), xX
A = 0.3/1 + 0.5/2 + 1/3
B = 0.3/1 + 0.5/2 + 1/3
therefore A = B
Inclusion
• Inclusion of one fuzzy set into another fuzzy set. Fuzzy set A  X is
included in (is a subset of) another fuzzy set, B  X:
A(x)  B(x), xX
Consider X = {1, 2, 3} and sets A and B
A = 0.3/1 + 0.5/2 + 1/3;
B = 0.5/1 + 0.55/2 + 1/3
then A is a subset of B, or A  B
Cardinality
• Cardinality of a non-fuzzy set, Z, is the number of elements in Z. BUT
the cardinality of a fuzzy set A, the so-called SIGMA COUNT, is
expressed as a SUM of the values of the membership function of A,
A(x):
cardA = A(x1) + A(x2) + … A(xn) = ΣA(xi), for i=1..n
Consider X = {1, 2, 3} and sets A and B
A = 0.3/1 + 0.5/2 + 1/3;
B = 0.5/1 + 0.55/2 + 1/3
cardA = 1.8
cardB = 2.05
Empty Fuzzy Set
• A fuzzy set A is empty, IF AND ONLY IF:
A(x) = 0, xX
Consider X = {1, 2, 3} and set A
A = 0/1 + 0/2 + 0/3
then A is empty
Alpha-cut
• An -cut or -level set of a fuzzy set A X is an ORDINARY SET A X,
such that:
A={A(x), xX}.
Consider X = {1, 2, 3} and set A
A = 0.3/1 + 0.5/2 + 1/3
then A0.5 = {2, 3},
A0.1 = {1, 2, 3},
A1 = {3}
Alpha levels, core, support, normal
z
zz z z zz
Fuzzy Set Normality
• A fuzzy subset of X is called normal if there exists at least one element
xX such that A(x) = 1.
• A fuzzy subset that is not normal is called subnormal.
• All crisp subsets except for the null set are normal. In fuzzy set theory,
the concept of nullness essentially generalises to sub-normality.
• The height of a fuzzy subset A is the large membership grade of an
element in A
height(A) = maxx(A(x))
Fuzzy Sets Core and Support
• Assume A is a fuzzy subset of X:
• the support of A is the crisp subset of X consisting of all elements with
membership grade:
supp(A) = {x A(x)  0 and xX}
• the core of A is the crisp subset of X consisting of all elements with
membership grade:
core(A) = {x A(x) = 1 and xX}
Fuzzy Set Math Operations
• aA = {aA(x), xX}
Let a =0.5, and
A = {0.5/a, 0.3/b, 0.2/c, 1/d}
then
Aa = {0.25/a, 0.15/b, 0.1/c, 0.5/d}
• Aa = {A(x)a, xX}
Let a =2, and
A = {0.5/a, 0.3/b, 0.2/c, 1/d}
then
Aa = {0.25/a, 0.09/b, 0.04/c, 1/d}
• …
Fuzzy Sets Examples
• Consider two fuzzy subsets of the set X,
X = {a, b, c, d, e }
referred to as A and B
A = {1/a, 0.3/b, 0.2/c 0.8/d, 0/e}
and
B = {0.6/a, 0.9/b, 0.1/c, 0.3/d, 0.2/e}
Fuzzy Sets Examples
• Support:
supp(A) = {a, b, c, d }
supp(B) = {a, b, c, d, e }
• Core:
core(A) = {a}
core(B) = {o}
• Cardinality:
card(A) = 1+0.3+0.2+0.8+0 = 2.3
card(B) = 0.6+0.9+0.1+0.3+0.2 = 2.1
Fuzzy Sets Examples
• Complement:
A = {1/a, 0.3/b, 0.2/c 0.8/d, 0/e}
A = {0/a, 0.7/b, 0.8/c 0.2/d, 1/e}
• Union:
A  B = {1/a, 0.9/b, 0.2/c, 0.8/d, 0.2/e}
• Intersection:
A  B = {0.6/a, 0.3/b, 0.1/c, 0.3/d, 0/e}
Fuzzy Sets Examples
• aA:
for a=0.5
aA = {0.5/a, 0.15/b, 0.1/c, 0.4/d, 0/e}
• Aa:
for a=2
Aa = {1/a, 0.09/b, 0.04/c, 0.64/d, 0/e}
• a-cut:
A0.2 = {a, b, c, d}
A0.3 = {a, b, d}
A0.8 = {a, d}
A1 = {a}
Exercise
For
A = {0.2/a, 0.4/b, 1/c, 0.8/d, 0/e}
B = {0/a, 0.9/b, 0.3/c, 0.2/d, 0.1/e}
Calculate the following:
- Support, Core, Cardinality, and Complement for A and B
independently
- Union and Intersection of A and B
- the new set C, if C = A2
- the new set D, if D = 0.5B
- the new set E, for an alpha cut at A0.5
Solution
A = {0.2/a, 0.4/b, 1/c, 0.8/d, 0/e}
B = {0/a, 0.9/b, 0.3/c, 0.2/d, 0.1/e}
Support
Supp(A) = {a, b, c, d}
Supp(B) = {b, c, d, e}
Core
Core(A) = {c}
Core(B) = {}
Cardinality
Card(A) = 0.2 + 0.4 + 1 + 0.8 + 0 = 2.4
Card(B) = 0 + 0.9 + 0.3 + 0.2 + 0.1 = 1.5
Complement
Comp(A) = {0.8/a, 0.6/b, 0/c, 0.2/d, 1/e}
Comp(B) = {1/a, 0.1/b, 0.7/c, 0.8/d, 0.9/e}
Solution
A = {0.2/a, 0.4/b, 1/c, 0.8/d, 0/e}
B = {0/a, 0.9/b, 0.3/c, 0.2/d, 0.1/e}
Union
AB = {0.2/a, 0.9/b, 1/c, 0.8/d, 0.1/e}
Intersection
AB = {0/a, 0.4/b, 0.3/c, 0.2/d, 0/e}
C=A2
C = {0.04/a, 0.16/b, 1/c, 0.64/d, 0/e}
D = 0.5B
D = {0/a, 0.45/b, 0.15/c, 0.1/d, 0.05/e}
E = A0.5
E = {c, d}
Formal Definitions
Fuzzy mathematics:An application oriented introduction
Fuzzy mathematics:An application oriented introduction
Fuzzy mathematics:An application oriented introduction
Numerical Example
Fuzzy mathematics:An application oriented introduction
Some More Formal
Definitions• Definition 1: Let X be some set of objects, with elements noted as x.
• X = {x}.
• Definition 2: A fuzzy set A in X is characterized by a membership function
mA(x) which maps each point in X onto the real interval [0.0, 1.0]. As
mA(x) approaches 1.0, the "grade of membership" of x in A increases.
• Definition 3: A is EMPTY iff for all x, mA(x) = 0.0.
• Definition 4: A = B iff for all x: mA(x) = mB(x) [or, mA = mB].
• Definition 5: mA' = 1 - mA.
• Definition 6: A is CONTAINED in B iff mA  mB.
• Definition 7: C = A UNION B, where: mC(x) = MAX(mA(x), mB(x)).
• Definition 8: C = A INTERSECTION B where: mC(x) = MIN(mA(x), mB(x)).
Operations
A B
A  B A  B A
Fuzzy Disjunction
• AB max(A, B)
• AB = C "Quality C is the
disjunction of Quality A and B"
0
1
0.375
A
0
1
0.75
B
(AB = C)  (C = 0.75)
Fuzzy Conjunction
• AB min(A, B)
• AB = C "Quality C is the
conjunction of Quality A and B"
0
1
0.375
A
0
1
0.75
B
(AB = C)  (C = 0.375)
Example: Fuzzy Conjunction
Calculate AB given that A is .4 and B is 20
0
1
A
0
1
B
.1 .2 .3 .4 .5 .6 .7 .8 .9 1 5 10 15 20 25 30 35 40
Example: Fuzzy Conjunction
Calculate AB given that A is .4 and B is 20
0
1
A
0
1
B
.1 .2 .3 .4 .5 .6 .7 .8 .9 1 5 10 15 20 25 30 35 40
Determine degrees of membership:
Example: Fuzzy Conjunction
Calculate AB given that A is .4 and B is 20
0
1
A
0
1
B
.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
0.7
Example: Fuzzy Conjunction
Calculate AB given that A is .4 and B is 20
0
1
A
0
1
B
.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
0.7
0.9
Example: Fuzzy Conjunction
Calculate AB given that A is .4 and B is 20
0
1
A
0
1
B
.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
AB = min(A, B) = 0.7
0.7
0.9
Fuzzy mathematics:An application oriented introduction
Fuzzy mathematics:An application oriented introduction
Fuzzy mathematics:An application oriented introduction
Fuzzy mathematics:An application oriented introduction
Fuzzy mathematics:An application oriented introduction
2. Fuzzy Number
A fuzzy number A must possess the following three
properties:
1. A must be a normal fuzzy set,
2. The alpha levels must be closed for every ,
3. The support of A, , must be bounded.
)(A ]1,0(
)0( A
1
Membershipfunction
is the suport of
z1 is the modal value
is an -level of , 
(0,1]

Fuzzy Number (from Jorge dos Santos)
'
< ' [ ] [ ]z z 
   
 ,z z 
z1zz
 z

z
,[ ] z zz   
    
z%
’
z% 
1
A fuzzy number can be given by a
set of nested intervals, the -levels:
Fuzzy numbers defined by its -levels (from Jorge dos Santos)
.7
.5
.2
0
z%
z
0.2
z
0.5
z
0.7
z
0.7
z
0.5
z
0.2
z z1z
1 0.7 0.5 0.2 0
[ ] [ ] [ ] [ ] [ ]z z z z z   
1
Triangular fuzzy numbers
1( / / )z z z z %
zz 1z
1 1;
0 1
, ,[ ] [ ] [ ] [ ]z z z z z z  
Fuzzy Number (figure from Klir&Yuan)
B. Operations on Fuzzy Sets: Union and Intersection
(figure from Klir&Yuan)
Operations on Fuzzy Sets: Intersection (figure from Klir&Yuan)
Operations on Fuzzy Sets: Union and Complement (figure from
Klir&Yuan)
C. Operations on Fuzzy Numbers: Addition and Subtraction (figure
from Klir&Yuan)
Operations on Fuzzy Numbers: Multiplication and Division
(figure from Klir&Yuan)
Fuzzy Equations
},where8.0)(|{
:istioninterpretaAnother
).(/)()(/)()(/)()(/)(ii)
(0,1])(/)()(/)(i)
:iffexistsequationfuzzytheosolution tThen the
)].(),([)(and)](),([)()],(),([)(Let
).()()(
:istioninterpretaOne
~~
*
~
BbAabaxx
abababab
abab
xxXbbBaaA
BXA
BXA











Example of a Fuzzy Equation (figure from Klir&Yuan)
)()(
:that(ii)Verify
5
1232,
3
128)(
thatso
5
1232
3
128
:that(i)Verify
]1232,128[)(
]5,3[)(
3202for12/)32(
2012for8/)12(
32,12for0
)(
54for5
43for3
5,3for0
)(











XX
X
B
A
xx
xx
xx
xB
xx
xx
xx
xA















































The Extension Principle of Zadeh
Given a formula f(x) and a fuzzy set A defined by,
how do we compute the membership function of f(A) ?
How this is done is what is called the extension principle (of
professor Zadeh). What the extension principle says is that
f (A) =f(A( )). The formal definition is:
[f(A)](y)=supx|y=f(x){ }
)(xA

 
)(xA

Extension Principle - Example
Let f(x) = ax+b,
23/15/86
Then.6and,5/3/2,3/2/1


BAf(x)
xBbAa
Fuzzy mathematics:An application oriented introduction
FUZZY RELATIONS,
FUZZY GRAPHS, AND
FUZZY ARITHMETIC
INTRODUCTION
3 Important concepts in fuzzy logic
• Fuzzy Relations
• Fuzzy Graphs
• Extension Principle --
} Form the foundation
of fuzzy rules
basis of fuzzy Arithmetic
- This is what makes a fuzzy system tick!
Fuzzy Relations
• Generalizes classical relation into one
that allows partial membership
– Describes a relationship that holds
between two or more objects
• Example: a fuzzy relation “Friend” describe the
degree of friendship between two person (in
contrast to either being friend or not being
friend in classical relation!)
Fuzzy Relations
• A fuzzy relation is a mapping from the
Cartesian space X x Y to the interval [0,1],
where the strength of the mapping is
expressed by the membership function of the
relation  (x,y)
• The “strength” of the relation between ordered
pairs of the two universes is measured with a
membership function expressing various
“degree” of strength [0,1]
˜R
˜R
Fuzzy Cartesian Product
Let
be a fuzzy set on universe X, and
be a fuzzy set on universe Y, then
Where the fuzzy relation R has membership function
˜A  ˜B  ˜R  X  Y
˜R
(x, y)   ˜Ax˜B
(x, y)  min( ˜A
(x), ˜B
(y))
˜A
˜B
Fuzzy Cartesian Product: Example
Let
defined on a universe of three discrete temperatures, X = {x1,x2,x3}, and
defined on a universe of two discrete pressures, Y = {y1,y2}
Fuzzy set represents the “ambient” temperature and
Fuzzy set the “near optimum” pressure for a certain heat exchanger, and
the Cartesian product might represent the conditions (temperature-
pressure pairs) of the exchanger that are associated with “efficient”
operations. For example, let
˜A
˜B
˜A
˜B
˜A 
0.2
x1

0.5
x2

1
x3
and
˜B 
0.3
y1

0.9
y2
} ˜A  ˜B  ˜R 
x1
x2
x3
0.2 0.2
0.3 0.5
0.3 0.9








y1 y2
Fuzzy Composition
Suppose
is a fuzzy relation on the Cartesian space X x Y,
is a fuzzy relation on the Cartesian space Y x Z, and
is a fuzzy relation on the Cartesian space X x Z; then fuzzy max-min
and fuzzy max-product composition are defined as
˜R
˜S
˜T
˜T  ˜Ro ˜S
max min
˜T
(x,z)  
yY
( ˜R
(x,y)  ˜S
(y,z))
max product
˜T
(x,z)  
yY
( ˜R
(x,y)  ˜S
(y, z))
Fuzzy Composition: Example (max-min)
X  {x1,x2},
˜T
(x1,z1)  
yY
( ˜R
(x1,y)  ˜S
(y,z1))
 max[min(0.7,0.9),min(0.5, 0.1)]
 0.7
Y {y1,y2},and Z  {z1,z2,z3}
Consider the following fuzzy relations:
˜R 
x1
x2
0.7 0.5
0.8 0.4




y1 y2
and ˜S 
y1
y2
0.9 0.6 0.5
0.1 0.7 0.5




z1 z2 z3
Using max-min composition,
}
321
2
1
5.06.08.0
5.06.07.0~
zzz
x
x
T 






Fuzzy Composition: Example (max-Prod)
X  {x1,x2},
˜T
(x2, z2 )  
yY
( ˜R
(x2 , y)  ˜S
(y, z2))
 max[(0.8,0.6),(0.4, 0.7)]
 0.48
Y {y1,y2},and Z  {z1,z2,z3}
Consider the following fuzzy relations:
˜R 
x1
x2
0.7 0.5
0.8 0.4




y1 y2
and ˜S 
y1
y2
0.9 0.6 0.5
0.1 0.7 0.5




z1 z2 z3
Using max-product composition,
}˜T 
x1
x2
.63 .42 .25
.72 .48 .20




z1 z2 z3
Application: Computer Engineering
Problem: In computer engineering, different logic families are often
compared on the basis of their power-delay product. Consider the fuzzy
set F of logic families, the fuzzy set D of delay times(ns), and the fuzzy
set P of power dissipations (mw).
If F = {NMOS,CMOS,TTL,ECL,JJ},
D = {0.1,1,10,100},
P = {0.01,0.1,1,10,100}
Suppose R1 = D x F and R2 = F x P
~
~
~
~ ~ ~ ~ ~ ~
~
~
~
˜R1 
0.1
1
10
100
0 0 0 .6 1
0 .1 .5 1 0
.4 1 1 0 0
1 .2 0 0 0










N C T E J
and ˜R2 
N
C
T
E
J
0 .4 1 .3 0
.2 1 0 0 0
0 0 .7 1 0
0 0 0 1 .5
1 .1 0 0 0












.01 .1 1 10 100
Application: Computer Engineering (Cont)
We can use max-min composition to obtain a relation
between delay times and power dissipation: i.e., we can
compute or˜R3  ˜R1 o ˜R2
˜R3
 (˜R1
 ˜R2
)
˜R3 
0.1
1
10
100
1 .1 0 .6 .5
.1 .1 .5 1 .5
.2 1 .7 1 0
.2 .4 1 .3 0












.01 .1 1 10 100
Application: Fuzzy Relation Petite
Fuzzy Relation Petite defines the degree by which a person with
a specific height and weight is considered petite. Suppose the
range of the height and the weight of interest to us are {5’, 5’1”,
5’2”, 5’3”, 5’4”,5’5”,5’6”}, and {90, 95,100, 105, 110, 115, 120,
125} (in lb). We can express the fuzzy relation in a matrix form
as shown below:
˜P 
5'
5'1"
5' 2"
5' 3"
5' 4"
5' 5"
5' 6"
1 1 1 1 1 1 .5 .2
1 1 1 1 1 .9 .3 .1
1 1 1 1 1 .7 .1 0
1 1 1 1 .5 .3 0 0
.8 .6 .4 .2 0 0 0 0
.6 .4 .2 0 0 0 0 0
0 0 0 0 0 0 0 0
















90 95 100 105 110 115 120 125
Application: Fuzzy Relation Petite
˜P 
5'
5'1"
5' 2"
5' 3"
5' 4"
5' 5"
5' 6"
1 1 1 1 1 1 .5 .2
1 1 1 1 1 .9 .3 .1
1 1 1 1 1 .7 .1 0
1 1 1 1 .5 .3 0 0
.8 .6 .4 .2 0 0 0 0
.6 .4 .2 0 0 0 0 0
0 0 0 0 0 0 0 0
















90 95 100 105 110 115 120 125
Once we define the petite fuzzy relation, we can answer two kinds of
questions:
• What is the degree that a female with a specific height and a specific weight
is considered to be petite?
• What is the possibility that a petite person has a specific pair of height and
weight measures? (fuzzy relation becomes a possibility distribution)
Application: Fuzzy Relation Petite
Given a two-dimensional fuzzy relation and the possible values of one
variable, infer the possible values of the other variable using similar
fuzzy composition as described earlier.
Definition: Let X and Y be the universes of discourse for variables x
and y, respectively, and xi and yj be elements of X and Y. Let R be a
fuzzy relation that maps X x Y to [0,1] and the possibility distribution
of X is known to be Px(xi). The compositional rule of inference
infers the possibility distribution of Y as follows:
max-min composition:
max-product composition:
PY(yj )  max
xi
(min(PX (xi),PR (xi,yj)))
PY(yj )  max
xi
(PX (xi)  PR(xi,yj ))
Application: Fuzzy Relation Petite
Problem: We may wish to know the possible weight of a petite female
who is about 5’4”.
Assume About 5’4” is defined as
About-5’4” = {0/5’, 0/5’1”, 0.4/5’2”, 0.8/5’3”, 1/5’4”, 0.8/5’5”, 0.4/5’6”}
Using max-min compositional, we can find the weight possibility
distribution of a petite person about 5’4” tall:
Pweight
(90)  (0 1) (0 1) (.4 1)  (.8 1) (1 .8) (.8 .6) (.4  0)
 0.8
˜P 
5'
5'1"
5' 2"
5' 3"
5' 4"
5' 5"
5' 6"
1 1 1 1 1 1 .5 .2
1 1 1 1 1 .9 .3 .1
1 1 1 1 1 .7 .1 0
1 1 1 1 .5 .3 0 0
.8 .6 .4 .2 0 0 0 0
.6 .4 .2 0 0 0 0 0
0 0 0 0 0 0 0 0
















90 95 100 105 110 115 120 125
Similarly, we can compute the possibility degree for
other weights. The final result is
Pweight  {0.8/90,0.8/95,0.8/100,0.8/105,0.5/110,0.4/115, 0.1/120,0/125}
Fuzzy Graphs
• A fuzzy relation may not have a meaningful linguistic label.
• Most fuzzy relations used in real-world applications do not represent a
concept, rather they represent a functional mapping from a set of input
variables to one or more output variables.
• Fuzzy rules can be used to describe a fuzzy relation from the observed
state variables to a control decision (using fuzzy graphs)
• A fuzzy graph describes a functional mapping between a set of input
linguistic variables and an output linguistic variable.
Extension Principle
• Provides a general procedure for extending crisp domains of
mathematical expressions to fuzzy domains.
• Generalizes a common point-to-point mapping of a function
f(.) to a mapping between fuzzy sets.
Suppose that f is a function from X to Y and A is a fuzzy set
on X defined as
A  A(x1)/(x1)  A(x2 )/(x2 ) ..... A(xn )/(xn )
Then the extension principle states that the image of fuzzy set A
under the mapping f(.) can be expressed as a fuzzy set B,
B  f(A)  A(x1)/(y1) A(x2 )/(y2 ) ..... A(xn )/(yn )
Where yi =f(xi), i=1,…,n. If f(.) is a many-to-one mapping then
B(y)  max
x f 1
(y)
A (x)
Extension Principle: Example
Let A=0.1/-2+0.4/-1+0.8/0+0.9/1+0.3/2
and
f(x) = x2-3
Upon applying the extension principle, we have
B = 0.1/1+0.4/-2+0.8/-3+0.9/-2+0.3/1
= 0.8/-3+max(0.4, 0.9)/-2+max(0.1, 0.3)/1
= 0.8/-3+0.9/-2+0.3/1
Extension Principle: Example
Let A(x) = bell(x;1.5,2,0.5)
and
f(x) = { (x-1)2-1, if x >=0
x, if x <=0
Extension Principle: Example
Around-4 = 0.3/2 + 0.6/3 + 1/4 + 0.6/5 + 0.3/6
and
Y = f(x) = x2 -6x +11
Arithmetic Operations on Fuzzy Numbers
Applying the extension principle to arithmetic
operations, we have
Fuzzy Addition:
Fuzzy Subtraction:
Fuzzy Multiplication:
Fuzzy Division:
AB(z)  
x,y
xyz
A(x) B (y)
AB(z)  
x,y
xyz
A(x) B (y)
AB(z)  
x,y
xyz
A(x) B (y)
A / B(z) 
x,y
x / yz
A(x) B (y)
Arithmetic Operations on Fuzzy Numbers
Let A and B be two fuzzy integers defined as
A = 0.3/1 + 0.6/2 + 1/3 + 0.7/4 + 0.2/5
B = 0.5/10 + 1/11 + 0.5/12
Then
F(A+B) = 0.3/11+ 0.5/12 + 0.5/13 + 0.5/14 +0.2/15 +
0.3/12 + 0.6/13 + 1/14 + 0.7/15 + 0.2/16 +
0.3/13 + 0.5/14 + 0.5/15 + 0.5/16 +0.2/17
Get max of the duplicates,
F(A+B) =0.3/11 + 0.5/12 + 0.6/13 + 1/14 + 0.7/15
+0.5/16 + 0.2/17
Summary
• A fuzzy relation is a multidimensional fuzzy set
• A composition of two fuzzy relations is an important
technique
• A fuzzy graph is a fuzzy relation formed by pairs of
Cartesian products of fuzzy sets
• A fuzzy graph is the foundation of fuzzy mapping rules
• The extension principle allows a fuzzy set to be mapped
through a function
• Addition, subtraction, multiplication, and division of
fuzzy numbers are all defined based on the extension
principle
A peep into Fuzzy
Control System
DO we need FAT?
• How do you make a machine smart?
– Put some FAT in it!
– A FAT enough machine can model any
process
– A FAT system can always turn inputs to
outputs and turn causes to effects and turn
questions to answer
• FAT stands for “Fuzzy Approximation
Theorem”
CONVENTIONAL CONTROL
• Closed-loop control takes account of actual output
and compares this to desired output
Measurement
Desired
Output
+
-
Process
Dynamics
Controller/
Amplifier
OutputInput
• Open-loop control is ‘blind’ to actual output
Digital Control System Configuration
CONVENTIONAL CONTROL
Example: design a cruise control system
After gaining an intuitive understanding of the plant’s
dynamics and establishing the design objectives, the
control engineer typically solves the cruise control
problem by doing the following:
1. Developing a model of the automobile dynamics
(which may model vehicle and power train dynamics,
tire and suspension dynamics, the effect of road grade
variations, etc.).
2. Using the mathematical model, or a simplified
version of it, to design a controller (e.g., via a linear
model, develop a linear controller with techniques from
classical control).
CONVENTIONAL CONTROL
3. Using the mathematical model of the closed-loop
system and mathematical or simulation-based analysis
to study its performance (possibly leading to redesign).
4. Implementing the controller via, for example, a
microprocessor, and evaluating the performance of the
closed-loop system (again, possibly leading to
redesign).
CONVENTIONAL CONTROL
Mathematical model of the plant:
– never perfect
– an abstraction of the real system
– “is accurate enough to be able to design a controller
that will work.”!
– based on a system of differential equations
Can you re-collect gradient
descent procedures?
Newton-Raphson method?
Fuzzy Control
Fuzzy control provides a formal methodology for
representing, manipulating, and implementing a
human’s heuristic knowledge about how to control a
system.
Fuzzy Systems
How can fuzzy systems be used in a world where
measurements and actions are expressed as crisp
values?
Fuzzy Systems
Fuzzy
Knowledge base
Input Fuzzifier
Inference
Engine
DefuzzifierOutput
Fuzzy Systems (Cont.)
90 Degree F.
It is too hot!
Turn the fan on high
Set the fan at
90% speed
Input Fuzzifier Fuzzy System Defuzzifier output
Fuzzy Control Systems
Fuzzy
Knowledge base
Fuzzifier
Inference
Engine
Defuzzifier Plant Output
Input
Fuzzy Logic Control
• Fuzzy controller design consist of turning
intuitions, and any other information about how
to control a system, into set of rules.
• These rules can then be applied to the system.
• If the rules adequately control the system, the
design work is done.
• If the rules are inadequate, the way they fail
provides information to change the rules.
Components of Fuzzy system
• The components of a conventional expert system and
a fuzzy system are the same.
• Fuzzy systems though contain `fuzzifiers’.
– Fuzzifiers convert crisp numbers into fuzzy
numbers,
• Fuzzy systems contain `defuzzifiers',
– Defuzzifiers convert fuzzy numbers into crisp
numbers.
Conventional vs Fuzzy system
Components of a ...
conventional expert fuzzy
system system
knowledge
model
physical
device
precise
value
physical
device
fuzzy
model
value
fuzzy
value
fuzzy
precise
value
precise
precise
value
value
fuzzifier
defuzzifier
In order to process the input to get the output
reasoning there are six steps involved in the
creation of a rule based fuzzy system:
1. Identify the inputs and their ranges and name them.
2. Identify the outputs and their ranges and name them.
3. Create the degree of fuzzy membership function for
each input and output.
4. Construct the rule base that the system will operate
under
5. Decide how the action will be executed by assigning
strengths to the rules
6. Combine the rules and defuzzify the output
Fuzzy Logic Control
Type of Fuzzy Controllers:
• Mamdani
• Larsen
• TSK (Takagi Sugeno Kang)
• Tsukamoto
• Other methods
Fuzzy Control Systems
Mamdani
Fuzzy models
Mamdani Fuzzy models
• The most commonly used fuzzy inference
technique is the so-called Mamdani method.
• In 1975, Professor Ebrahim Mamdani of
London University built one of the first fuzzy
systems to control a steam engine and boiler
combination.
 Original Goal: Control a steam engine & boiler
combination by a set of linguistic control rules
obtained from experienced human operators.
Mamdani fuzzy inference
The Mamdani-style fuzzy inference process is
performed in four steps:
1. Fuzzification of the input variables,
2. Rule evaluation;
3. Aggregation of the rule outputs, and finally
4. Defuzzification.
Operation of Fuzzy System
Crisp
Input
Fuzzy
Input
Fuzzy
Output
Crisp Output
Fuzzification
Rule Evaluation
Defuzzification
Input Membership
Functions
Rules / Inferences
Output Membership
Functions
Knowledge as Rules is the basis
of FAT
• Every term in one of our rules is Fuzzy
• Every term is vague, hazy, inexact, sloppy
FAT (cont.)
• Fuzzy rule relates fuzzy sets
– If X is A, then Y is B
• A and B are fuzzy sets and subset of X and Y
Building Knowledge base
System
• 3 Steps
– Pick the nouns or variables
• Example: X be input and Y be output
– Let x be temperature and Y be change in motor speed
• Cause, effect. Stimulus, response!
– Pick the fuzzy sets
• Define fuzzy subsets of the nouns X and Y
– Pick the fuzzy rules
• Associate output to the input
Inference Engine
Basil Hamed
Fuzzy
Knowledge base
Fuzzy
Knowledge base
Input Fuzzifier
Inference
Engine
Defuzzifier OutputInput Fuzzifier
Inference
Engine
Defuzzifier Output
Using If-Then type fuzzy rules converts the
fuzzy input to the fuzzy output.
Fuzzy Associative Memory
• Which rule “fires” or activates at which
time?
– They all fire all the time
– They fire in parallel
• All rules fire to some degree
• Most fire to zero degree
– The result is a fuzzy weighted average
Additive Fuzzy System
• Stores m fuzzy rules of the form
– “If X = Aj then Y = Bj,” then computes the output
by defuzzifiy the summed (MAXed) of the
partially fired then-part fuzzy sets B’j
We examine a simple two-input one-output problem that includes
three rules:
Rule: 1 Rule: 1
IF x is A3 IF project_funding is adequate
OR y is B1 OR project_staffing is small
THEN z is C1 THEN risk is low
Rule: 2 Rule: 2
IF x is A2 IF project_funding is marginal
AND y is B2 AND project_staffing is large
THEN z is C2 THEN risk is normal
Rule: 3 Rule: 3
IF x is A1 IF project_funding is inadequate
THEN z is C3 THEN risk is high
Step 1: Fuzzification
■ Take the crisp inputs, x1 and y1 (project funding and
project staffing)
■ Determine the degree to which these inputs belong to
each of the appropriate fuzzy sets.
Crisp Input
y1
0.1
0.7
1
0
y1
B1 B2
Y
Crisp Input
0.2
0.5
1
0
A1 A2 A3
x1
x1 X
(x = A1) = 0.5
(x = A2) = 0.2
(y = B1) = 0.1
(y = B2) = 0.7
Fuzzification
• Process of making a crisp quantity fuzzy
• Vector representation can be viewed as either
a discrete or an approximation of a continuous
set ( use linear interpolation]
Crisp input
Fuzzy Grade
Example: Fuzzification
• Define fuzzy set “near 5”
– S = [ 0:10];
– G = [0.0 0.1 0.3 0.5 0.8 1 0.8 0.5 0.3 0.1 0];
0
0.2
0.4
0.6
0.8
1
0 1 2 3 4 5 6 7 8 9 10
Near 5
0.5
0.9
• Recommend designer to adopt the
following design principles:
– Each Membership function overlaps only with
the closest neighboring membership
functions;
– For any possible input data, its membership
values in all relevant fuzzy sets should sum to 1
(or nearly)
Some Hints while designing Membership
Functions in practice.
Designing Antecedent Membership Functions
A Membership Function Design that violates the second principle
Designing Antecedent Membership Functions
A Membership Function Design that violates both principle
Designing Antecedent Membership Functions
A symmetric Function Design Following the guidelines
Some Hints while designing Membership
Functions in practice.
An asymmetric Function Design Following the guidelines
Step 2: Rule Evaluation
• take the fuzzified inputs, (x=A1) = 0.5, (x=A2) = 0.2,
(y=B1) = 0.1 and (y=B2) = 0.7
• apply them to the antecedents of the fuzzy rules.
• If a given fuzzy rule has multiple antecedents, the fuzzy
operator (AND or OR) is used to obtain a single number
that represents the result of the antecedent evaluation.
This number (the truth value) is then applied to the
consequent membership function.
Step 2: Rule Evaluation
To evaluate the disjunction of the rule antecedents,
we use the OR fuzzy operation. Typically, fuzzy
expert systems make use of the classical fuzzy
operation union:
AB(x) = max [A(x), B(x)]
Similarly, in order to evaluate the conjunction of the
rule antecedents, we apply the AND fuzzy operation
intersection:
AB(x) = min [A(x), B(x)]
Mamdani-style rule evaluation
A3
1
0 X
1
y10 Y
0.0
x1 0
0.1
C1
1
C2
Z
1
0 X
0.2
0
0.2
C1
1
C2
Z
A2
x1
Rule 3:
A1
1
0 X 0
1
Zx1
THEN
C1 C2
1
y1
B2
0 Y
0.7
B1
0.1
C3
C3
C30.5 0.5
OR
(max)
AND
(min)
OR THENRule 1:
AND THENRule 2:
IF x is A3 (0.0) y is B1 (0.1) z is C1 (0.1)
IF x is A2 (0.2) y is B2 (0.7) z is C2 (0.2)
IF x is A1 (0.5) z is C3 (0.5)
• Now the result of the antecedent evaluation can be
applied to the membership function of the
consequent.
• The most common method is to cut the consequent
membership function at the level of the antecedent
truth.
• This method is called clipping (Max-Min Composition) .
• The clipped fuzzy set loses some information.
• Clipping is still often preferred because:
• it involves less complex and faster mathematics
• it generates an aggregated output surface that is
easier to defuzzify.
 While clipping is a frequently used method, scaling
(Max-Product Composition) offers a better approach
for preserving the original shape of the fuzzy set.
 The original membership function of the rule
consequent is adjusted by multiplying all its
membership degrees by the truth value of the rule
antecedent.
 This method, which generally loses less information,
can be very useful in fuzzy expert systems.
Clipped and scaled membership functions
Degree of
Membership
1.0
0.0
0.2
Z
Degree of
Membership
Z
C2
1.0
0.0
0.2
C2
Max-Product CompositionMax-Min Composition
Graphical Technique of
Mamdani (Max-Min] Inference
• If x1
k is A1
k and x2
k is A2
k Then Yk is Bk
Graphical Technique of
Max-Product Inference
• If x1
k is A1
k and x2
k is A2
k Then Yk is Bk
Step 3: Aggregation of The Rule Outputs
• Aggregation is the process of unification of the
outputs of all rules.
• We take the membership functions of all rule
consequents previously clipped or scaled and
combine them into a single fuzzy set.
Aggregation of the rule outputs
0
0.1
1
C1
Cz is 1 (0.1)
C2
0
0.2
1
Cz is 2 (0.2)
0
0.5
1
Cz is 3 (0.5)
ZZZ
0.2
Z0

C3
0.5
0.1
Step 4: Defuzzification
• Fuzziness helps us to evaluate the rules, but the
final output of a fuzzy system has to be a crisp
number.
• The input for the defuzzification process is the
aggregated output fuzzy set and the output is a
single number.
 There are several defuzzification methods, but
probably the most popular one is the centroid
technique.
 It finds the point where a vertical line would slice
the aggregate set into two equal masses.
Mathematically this centre of gravity (COG) can
be expressed as:
 
 



 b
a
A
b
a
A
dxx
dxxx
COG
 Centroid defuzzification method finds a point
representing the centre of gravity of the fuzzy set, A,
on the interval, ab.
 A reasonable estimate can be obtained by calculating
it over a sample of points.
(x)
1.0
0.0
0.2
0.4
0.6
0.8
160 170 180 190 200
a b
210
A
150
X
Centre of gravity (COG):
4.67
5.05.05.05.02.02.02.02.01.01.01.0
5.0)100908070(2.0)60504030(1.0)20100(



COG
1.0
0.0
0.2
0.4
0.6
0.8
0 20 30 40 5010 70 80 90 10060
Z
Degree of
Membership
67.4
Fuzzy mathematics:An application oriented introduction
Defuzzification (Cont.)
• Centroid Method: the most prevalent and
physically appealing of all the defuzzification
methods [Sugeno, 1985; Lee, 1990]
– Often called
• Center of area
• Center of gravity
Defuzzification (Cont.)
• Max-membership principal
– Also known as height method
Defuzzification (Cont.)
• Weighted average method
– Valid for symmetrical output membership functions
Formed by weighting
each functions in the
output by its respective
maximum membership
value
Defuzzification (Cont.)
• Mean-max membership (middle of maxima)
– Maximum membership is a plateau
Z* = a + b
2
Defuzzification (Cont.)
• Center of Largest area
– If the output fuzzy set has at least two convex sub-
region, defuzzify the largest area using centroid
Defuzzification (Cont.)
• First (or last) of maxima
– Determine the smallest value of the domain with
maximized membership degree
Fuzzy mathematics:An application oriented introduction
A simple Fuzzy Control system.
• Example: Speed Control
• How fast am I going to drive today?
• It depends on the weather.
Inputs: Temperature
• Temp: {Freezing, Cool, Warm, Hot}
50 70 90 1103010
Temp. (F°)
Freezing Cool Warm Hot
0
1
Inputs: Temperature, Cloud Cover
• Temp: {Freezing, Cool, Warm, Hot}
• Cover: {Sunny, Partly, Overcast}
50 70 90 1103010
Temp. (F°)
Freezing Cool Warm Hot
0
1
40 60 80 100200
Cloud Cover (%)
OvercastPartly CloudySunny
0
1
Output: Speed
• Speed: {Slow, Fast}
50 75 100250
Speed (mph)
Slow Fast
0
1
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...
Example Speed Calculation
• How fast will I go if it is
– 65 F°
– 25 % Cloud Cover ?
Fuzzification:
Calculate Input Membership Levels
• 65 F°  Cool = 0.4, Warm= 0.7
50 70 90 1103010
Temp. (F°)
Freezing Cool Warm Hot
0
1
Fuzzification:
Calculate Input Membership Levels
• 65 F°  Cool = 0.4, Warm= 0.7
• 25% Cover Sunny = 0.8, Cloudy = 0.2
50 70 90 1103010
Temp. (F°)
Freezing Cool Warm Hot
0
1
40 60 80 100200
Cloud Cover (%)
OvercastPartly CloudySunny
0
1
...Calculating...
• If it's Sunny and Warm, drive Fast
Sunny(Cover)Warm(Temp)Fast(Speed)
0.8  0.7 = 0.7
 Fast = 0.7
• If it's Cloudy and Cool, drive Slow
Cloudy(Cover)Cool(Temp)Slow(Speed)
0.2  0.4 = 0.2
 Slow = 0.2
Defuzzification:
Constructing the Output
• Speed is 20% Slow and 70% Fast
• Find centroids: Location where
membership is 100%
50 75 100250
Speed (mph)
Slow Fast
0
1
Defuzzification:
Constructing the Output
• Speed is 20% Slow and 70% Fast
• Find centroids: Location where
membership is 100%
50 75 100250
Speed (mph)
Slow Fast
0
1
Defuzzification:
Constructing the Output
• Speed is 20% Slow and 70% Fast
• Speed = weighted mean
= (2*25+...
50 75 100250
Speed (mph)
Slow Fast
0
1
Defuzzification:
Constructing the Output
• Speed is 20% Slow and 70% Fast
• Speed = weighted mean
= (2*25+7*75)/(9)
= 63.8 mph
50 75 100250
Speed (mph)
Slow Fast
0
1
Notes: Follow-up Points
• 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
Notes: Drawbacks to Fuzzy logic
• Requires tuning of membership functions
• Fuzzy Logic control may not scale well to
large or complex problems
• Deals with imprecision, and vagueness, but
not uncertainty
Fuzzy mathematics:An application oriented introduction
Example: Build a Fuzzy System
• Design motor speed controller for air
conditioner
– Step 1: assign input and output
variables
• Let X be temperature in Fahrenheit
• Let Y be the change in motor speed of the
air conditioner
Example: Build a Fuzzy System
• Design motor speed controller for air
conditioner
– Step 2: Pick fuzzy sets
• Define subsets of the noun X and Y
– Say 5 fuzzy sets on X
» Cold, Cool, Just Right, Warm, and Hot
– Say 5 fuzzy sets on Y
» Stop, Slow, Medium, Fast, and Blast
Example: Build a Fuzzy System
• Input Fuzzy set
Example: Build a Fuzzy System
• Output Fuzzy set
Example: Build a Fuzzy System
• Design motor speed controller for air
conditioner
– Step 3: Assign a motor speed set to
each temperature set
Example: Build a Fuzzy System
• Rules
– If temperature is cold then motor speed stop
– If temperature is cool then motor speed slows
– If temperature is just right then motor speed is medium
– If temperature is warm then motor speed is fast
– If temperature is hot then motor speed blasts
Example: Build a Fuzzy System
• Fuzzy Relation
Example: Build a Fuzzy System
• Fuzzy system with 5 patches
Example: temp. = 65 degree F.
If temperature is just right then motor speed is medium
Example: temp. = 63 degree F.
– If temperature is cool then motor speed slows
– If temperature is just right then motor speed is medium
Example: t = 63 degree F. (Cont.)
Example: t = 63 degree F. (Cont.)
• Summed (MAXed) of the partially fired then-
part fuzzy sets
OR OUTPUT
Example: t = 63 degree F. (Cont.)
• Defuzzify to find the output motor speed
Defuzzification
• Convert fuzzy grade to Crisp output
Example: Defuzzification
• Find an estimate crisp output from the following
3 membership functions
Example: Defuzzification
• CENTROID
Example: Defuzzification
• Weighted Average
Example: Defuzzification
• Mean-Max
Z* = (6+7)/2 = 6.5
Example: Defuzzification
• Center of largest area
– Same as the centroid method because the complete
output fuzzy set is convex
Example: Defuzzification
• First and Last of maxima
Defuzzification
• Of the seven defuzzification methods presented,
which is the best?
– It is context or problem-dependent
Defuzzification: Criteria
• Hellendoorn and Thomas specified 5 criteria
against which to measure the methods
– #1 Continuity
• Small change in the input should not produce the large
change in the output
– #2 Disambiguity
• Defuzzification method should always result in a unique
value, I.e. no ambiguity
– Not satisfied by the center of largest area!
Defuzzification: Criteria (Cpnt.)
• Hellendoorn and Thomas specified 5 criteria
against which to measure the methods
– #3 Plausibility
• Z* should lie approximately in the middle of the support
region and have high degree of membership
– #4 Computational simplicity
• Centroid and center of sum required complex computation!
– #5 Constitutes the difference between centroid,
weighted average and center of sum
• Problem-dependent, keep computation simplicity
Fuzzy mathematics:An application oriented introduction
Example: Furnace Temperature Control
• Inputs
– Temperature reading from sensor
– Furnace Setting
• Output
– Power control to motor
MATLAB: Create membership functions - Temp
MATLAB: Create membership functions - Setting
MATLAB: Create membership functions - Power
If - then - Rules
Fuzzy Rules for Furnace control
Setting
Temp
Low Medium High
Cold Low Medium High
Cool Low Medium High
Moderate Low Low Low
Warm Low Low Low
Hot low Low Low
Antecedent Table
Antecedent Table
• MATLAB
– A = table(1:5,1:3);
• Table generates matrix represents a table of all
possible combinations
Consequence Matrix
Evaluating Rules with Function
FRULE
Design Guideline (Inference)
• Recommend
—Max-Min (Clipping) Inference method
be used together with the MAX
aggregation operator and the MIN AND
method
—Max-Product (Scaling) Inference
method be used together with the SUM
aggregation operator and the PRODUCT
AND method
Example: Fully Automatic Washing Machine
Example: Fully Automatic Washing Machine
• Inputs
—Laundry Softness
—Laundry Quantity
• Outputs
—Washing Cycle
—Washing Time
Example: Input Membership functions
Example: Output Membership functions
Example: Fuzzy Rules for Washing Cycle
Quantity
Softness
Small Medium Large
Soft Delicate Light Normal
Normal
Soft
Light Normal Normal
Normal
Hard
Light Normal Strong
Hard Light Normal Strong
Example: Control Surface View (Clipping)
Example: Control Surface View (Scaling)
Example: Control Surface View
ScalingClipping
Example: Rule View (Clipping)
Example: Rule View (Scaling)
Fuzzy mathematics:An application oriented introduction
Building a Fuzzy Expert System: Case Study
 A service centre keeps spare parts and repairs failed
ones.
 A customer brings a failed item and receives a spare of
the same type.
 Failed parts are repaired, placed on the shelf, and thus
become spares.
 The objective here is to advise a manager of the service
centre on certain decision policies to keep the customers
satisfied.
Process of Developing a Fuzzy Expert System
1. Specify the problem and define linguistic variables.
2. Determine fuzzy sets.
3. Elicit and construct fuzzy rules.
4. Encode the fuzzy sets, fuzzy rules and procedures to
perform fuzzy inference into the expert system.
5. Evaluate and tune the system.
There are four main linguistic variables: average waiting
time (mean delay) m, repair utilization factor of the
service centre  (is the ratio of the customer arrival day
to the customer departure rate) number of servers s, and
initial number of spare parts n .
Step 1: Specify the problem and define
linguistic variables
Linguistic variables and their ranges
Linguistic Value Notation Numerical Range (normalised)
Very Short
Short
Medium
VS
S
M
[0, 0.3]
[0.1, 0.5]
[0.4, 0.7]
Linguistic Value Notation
Notation
Numerical Range (normalised)
Small
Medium
Large
S
M
L
[0, 0.35]
[0.30, 0.70]
[0.60, 1]
Linguistic Value Numerical Range
Low
Medium
High
L
M
H
[0, 0.6]
[0.4, 0.8]
[0.6, 1]
Linguistic Value Notation Numerical Range (normalised)
Very Small
Small
Rather Small
Medium
Rather Large
Large
Very Large
VS
S
RS
M
RL
L
VL
[0, 0.30]
[0, 0.40]
[0.25, 0.45]
[0.30, 0.70]
[0.55, 0.75]
[0.60, 1]
[0.70, 1]
Linguistic Variable: Mean Delay, m
Linguistic Variable: Number of Servers, s
Linguistic Variable: Repair Utilisation Factor, 
Linguistic Variable: Number of Spares, n
Step 2: Determine Fuzzy Sets
Fuzzy sets can have a variety of shapes. However,
a triangle or a trapezoid can often provide an
adequate representation of the expert knowledge,
and at the same time, significantly simplifies the
process of computation.
Fuzzy sets of Mean Delay m
0.10
1.0
0.0
0.2
0.4
0.6
0.8
0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Mean Delay (normalised)
SVS M
Degree of
Membership
Fuzzy sets of Number of Servers s
0.10
1.0
0.0
0.2
0.4
0.6
0.8
0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
M LS
Degree of
Membership
Fuzzy sets of Repair Utilisation Factor 
0.10
1.0
0.0
0.2
0.4
0.6
0.8
0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Repair Utilisation Factor
M HL
Degree of
Membership
Fuzzy sets of Number of Spares n
0.10
1.0
0.0
0.2
0.4
0.6
0.8
0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
S RSVS M RL L VL
Degree of
Membership
Number of Spares (normalised)
Step 3: Elicit and construct fuzzy rules
To accomplish this task, we might ask the expert to
describe how the problem can be solved using the
fuzzy linguistic variables defined previously.
Required knowledge also can be collected from
other sources such as books, computer databases,
flow diagrams and observed human behavior.
The matrix form of representing fuzzy rules is called
fuzzy associative memory (FAM).
m
s
M
RL
VL
S
RS
L
VS
S
M
MVS S
L
M
S
The square FAM representation
The rule table
Rule m s  n Rule m s  n Rule m s  n
1 VS S L VS 10 VS S M S 19 VS S H VL
2 S S L VS 11 S S M VS 20 S S
S
3 M S L VS 12 M S M VS 21 M S
4 VS M L VS 13 VS M M RS 22 VS M H M
M
M
M
5 S M L VS 14 S M M S 23 S M
6 M M L VS 15 M M M VS 24 M M
7 VS L L S 16 VS L M M 25 VS L H
H
H
H
H
H
RL
8 S L
L
L S 17 S L M RS 26 S L
9 M L L VS 18 M L M S 27 M L H RS
Rule Base 1
1. If (utilisation_factor is L) then (number_ of_spares is S)
2. If (utilisation_factor is M) then (number_of_spares is M)
3. If (utilisation_factor is H) then (number_of_spares is L)
4. If (mean_delay is VS) and (number_of_servers is S) then (number_of_spares is VL)
5. If (mean_delay is S) and (number_of_servers is S) then (number_of_spares is L)
6. If (mean_delay is M) and (number_of_servers is S) then (number_of_spares is M)
7. If (mean_delay is VS) and (number_of_servers is M) then (number_of_spares is RL)
8. If (mean_delay is S) and (number_of_servers is M) then (number_of_spares is RS)
9. If (mean_delay is M) and (number_of_servers is M) then (number_of_spares is S)
10. If (mean_delay is VS) and (number_of_servers is L) then ( number_of_spares is M)
11. If (mean_delay is S) and (number_of_servers is L) then ( number_of_spares is S)
12. If (mean_delay is M) and (number_of_servers is L) then ( number_of_spares is VS)
Cube FAM of Rule Base 2
VS VS VS
VS VS VS
VS VS VS
VL L M
HS
VS VS VS
VS VS VS
VS VS VSM
VS VS VS
VS VS VS
S S VSL
s
L
VS S M
m
M
H

VS VS VS
L
VS S M
S
m
VS VS VSM
S S VSL
s
S VS VS
M
VS S M
m
VS S M
m
S
RS S VSM
M RS SL
s
S
M M SM
RL M RSL
s
Step 4: Encode the fuzzy sets, fuzzy rules
and procedures to perform fuzzy
inference into the expert system
To accomplish this task, we may choose one of
two options: to build our system using a
programming language such as C/C++, Java, or to
apply a fuzzy logic development tool such as
MATLAB Fuzzy Logic Toolbox or Fuzzy
Knowledge Builder.
Step 5: Evaluate and Tune the System
The last task is to evaluate and tune the system.
We want to see whether our fuzzy system meets
the requirements specified at the beginning.
Several test situations depend on the mean delay,
number of servers and repair utilisation factor.
The Fuzzy Logic Toolbox can generate surface to
help us analyse the system’s performance.
317
However, even now, the expert might not be
satisfied with the system performance.
To improve the system performance, we may use
additional sets  Rather Small and Rather Large 
on the universe of discourse Number of Servers,
and then extend the rule base.
Modified Fuzzy Sets of Number of Servers s
0.10
1.0
0.0
0.2
0.4
0.6
0.8
0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Number of Servers (normalised)
RS M RL LS
Degree of
Membership
Cube FAM of Rule Base 3
VS VS VS
VS VS VS
VS VS VS
VS VS VS
VS VS VS
VS VS VS
VS VS VS
VS VS VS
VS VS VS
VS VS VS
VS VS VS
VS VS VS
VS VS VS
S S VS
S S VS
VL L M
VL RL RS
M M S
RL M RS
L M RS
HS
M
RL
L
RS
s
L
VS S M
m
M
H

VS VS VS
VS VS VS
VS VS VS
S S VS
S S VS
L
VS S M
S
M
RL
L
RS
m
s
S VS VS
S VS VS
RS S VS
M RS S
M RS S
M
VS S M
m
VS S M
m
S
M
RL
L
RS
s
S
M
RL
L
RS
s
Fuzzy Control Example
Input Fuzzy Sets
• Angle:- -30 to 30 degrees
Output Fuzzy Sets
• Car velocity:- -2.0 to 2.0 meters per second
Fuzzy Rules
• If Angle is Zero then output ?
• If Angle is SP then output ?
• If Angle is SN then output ?
• If Angle is LP then output ?
• If Angle is LN then output ?
Fuzzy Rule Table
Extended System
• Make use of additional information
– angular velocity:- -5.0 to 5.0 degrees/ second
• Gives better control
New Fuzzy Rules
• Make use of old Fuzzy rules for angular
velocity Zero
• If Angle is Zero and Angular vel is Zero
– then output Zero velocity
• If Angle is SP and Angular vel is Zero
– then output SN velocity
• If Angle is SN and Angular vel is Zero
– then output SP velocity
Table Format (FAM)
Complete Table
• When angular velocity is opposite to the angle
do nothing
– System can correct itself
• If Angle is SP and Angular velocity is SN
– then output ZE velocity
• etc
Example
• Inputs:10 degrees, -3.5 degrees/sec
• Fuzzified Values
• Inference Rules
• Output Fuzzy Sets
• Defuzzified Values
Internet resources used.
• www.csee.wvu.edu
• www.surrey.ac.uk
• http://www.cs.tamu.edu/research/CFL/fuzzy.
html
• L. Zadah, “Fuzzy sets as a basis of possibility” Fuzzy
Sets Systems, Vol. 1, pp3-28, 1978.
• T. J. Ross, “Fuzzy Logic with Engineering
Applications”, McGraw-Hill, 1995.
• K. M. Passino, S. Yurkovich, "Fuzzy Control" Addison

More Related Content

PPT
Fuzzy Set Theory
PPTX
Dynamic and Static Modeling
PDF
L7 fuzzy relations
PPTX
Fuzzy logic lec 1
PPTX
Fuzzy set and its application
PPTX
Fuzzy logic Notes AI CSE 8th Sem
PPTX
Maths contribution in Engineering
PPTX
Engineering mathematics presentation
Fuzzy Set Theory
Dynamic and Static Modeling
L7 fuzzy relations
Fuzzy logic lec 1
Fuzzy set and its application
Fuzzy logic Notes AI CSE 8th Sem
Maths contribution in Engineering
Engineering mathematics presentation

What's hot (20)

PPTX
Fuzzy Set
PPTX
FUZZY LOGIC
PPT
Fuzzy logic
PPTX
Application of fuzzy logic
PPT
Fuzzy control and its applications
PPTX
First order logic
PPTX
Midsquare method- simulation system
PPT
Knowledge Representation & Reasoning
PPTX
Numerical method-Picards,Taylor and Curve Fitting.
PPT
Fuzzy logic ppt
PPTX
Fuzzy sets
PPTX
Chapter 5 - Fuzzy Logic
PPTX
Fuzzy logic mis
PPTX
A* Algorithm
PDF
Group Theory and Its Application: Beamer Presentation (PPT)
PPTX
Fuzzy Logic ppt
PPTX
Fuzzy logic
PPTX
Fuzzy sets
PDF
Mathematics For Artificial Intelligence
Fuzzy Set
FUZZY LOGIC
Fuzzy logic
Application of fuzzy logic
Fuzzy control and its applications
First order logic
Midsquare method- simulation system
Knowledge Representation & Reasoning
Numerical method-Picards,Taylor and Curve Fitting.
Fuzzy logic ppt
Fuzzy sets
Chapter 5 - Fuzzy Logic
Fuzzy logic mis
A* Algorithm
Group Theory and Its Application: Beamer Presentation (PPT)
Fuzzy Logic ppt
Fuzzy logic
Fuzzy sets
Mathematics For Artificial Intelligence
Ad

Similar to Fuzzy mathematics:An application oriented introduction (20)

PPTX
IC_Unit3_FuzzyLogic information technology(1).pptx
PPTX
update -2022 Lec 4 - Knowledge Representation.pptx
PPT
Ap think lang ss
PPT
fuzzy.ppt
PPT
fuzzy logic,proposition with types and example
PPTX
Module4_AI 4th semester engineering.pptx
PDF
Course Design Best Practices
PPTX
This is the new m*th! 2024 edition (researchEd Belfast 28-9-24)
PPT
Introduction to logic and prolog - Part 1
PPTX
Foundations of Knowledge Representation in Artificial Intelligence.pptx
PPTX
PAIML-UNIT 3dfgbgfdbdfgbdfbdfbdfbdfb.pptx
PPTX
2. The goals of critical thinking including sentences arguments milgram etc.pptx
PDF
1.Symbolic Reasoning Under Uncertainty - Statistical Reasoning.pdf
PPTX
1_Introductio_thinking, reasoning, logic, argument, fallacies.pptx
PDF
Chapter-3-PROBLEM-SOLVING.pdf hhhhhhhhhh
PDF
A Concise Introduction to Logic.pdf
PPTX
AI IMPORTANT QUESTION
DOC
artficial intelligence
PPTX
This ppt is about philosophy of logic...
PPT
8. Hypothesis Testing.ppt
IC_Unit3_FuzzyLogic information technology(1).pptx
update -2022 Lec 4 - Knowledge Representation.pptx
Ap think lang ss
fuzzy.ppt
fuzzy logic,proposition with types and example
Module4_AI 4th semester engineering.pptx
Course Design Best Practices
This is the new m*th! 2024 edition (researchEd Belfast 28-9-24)
Introduction to logic and prolog - Part 1
Foundations of Knowledge Representation in Artificial Intelligence.pptx
PAIML-UNIT 3dfgbgfdbdfgbdfbdfbdfbdfb.pptx
2. The goals of critical thinking including sentences arguments milgram etc.pptx
1.Symbolic Reasoning Under Uncertainty - Statistical Reasoning.pdf
1_Introductio_thinking, reasoning, logic, argument, fallacies.pptx
Chapter-3-PROBLEM-SOLVING.pdf hhhhhhhhhh
A Concise Introduction to Logic.pdf
AI IMPORTANT QUESTION
artficial intelligence
This ppt is about philosophy of logic...
8. Hypothesis Testing.ppt
Ad

More from Nagasuri Bala Venkateswarlu (20)

PPT
Building mathematicalcraving
PPTX
PPTX
Nbvtalkatbzaonencryptionpuzzles
PPT
Nbvtalkon what is engineering(Revised)
PPTX
Swift: A parallel scripting for applications at the petascale and beyond.
PPT
Nbvtalkon what is engineering
PPTX
PPT
Let us explore How To solve Technical Education in India.
PPT
Nbvtalkstaffmotivationataitam
PPT
top 10 Data Mining Algorithms
PPTX
PPTX
Introduction to socket programming nbv
PPT
Nbvtalkataitamimageprocessingconf
PPT
Nbvtalkatjntuvizianagaram
PPT
Webinaron muticoreprocessors
PPT
Nbvtalkonfeatureselection
Building mathematicalcraving
Nbvtalkatbzaonencryptionpuzzles
Nbvtalkon what is engineering(Revised)
Swift: A parallel scripting for applications at the petascale and beyond.
Nbvtalkon what is engineering
Let us explore How To solve Technical Education in India.
Nbvtalkstaffmotivationataitam
top 10 Data Mining Algorithms
Introduction to socket programming nbv
Nbvtalkataitamimageprocessingconf
Nbvtalkatjntuvizianagaram
Webinaron muticoreprocessors
Nbvtalkonfeatureselection

Recently uploaded (20)

PPTX
Welding lecture in detail for understanding
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPT
Project quality management in manufacturing
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PDF
composite construction of structures.pdf
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
PPT on Performance Review to get promotions
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
DOCX
573137875-Attendance-Management-System-original
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
Welding lecture in detail for understanding
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
Operating System & Kernel Study Guide-1 - converted.pdf
Project quality management in manufacturing
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Internet of Things (IOT) - A guide to understanding
CH1 Production IntroductoryConcepts.pptx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
composite construction of structures.pdf
CYBER-CRIMES AND SECURITY A guide to understanding
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPT on Performance Review to get promotions
UNIT-1 - COAL BASED THERMAL POWER PLANTS
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
573137875-Attendance-Management-System-original
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx

Fuzzy mathematics:An application oriented introduction

  • 1. N.B. Venkateswawrlu AITAM, Tekkali www.ritchcenter.com/nbv venkat_ritch@yahoo.com Formerly at U. of Leeds, UK Also, at BITS, Pilani Fuzzy Mathematics : An application Oriented introduction
  • 2. Thanks a lot for Inviting.
  • 3. I am not a Mathematician!!!. I am an Engineering teacher.
  • 4. Thus, my talk will be more application oriented!!!. Of course, I am a great Mathematics fan.
  • 5. Rather, I can say that I am that group of people who supports practical, example based illustrated teaching. This lecture series is also to request you, Mathematics teachers to explore the possibility of teaching with Engineering examples.
  • 6. What am I going to cover? • Introduction and background. • Fuzzy Sets. • Simple Fuzzy Mathematical operations • Fuzzy Relations. • How to design a Fuzzy control system? • More Practical Fuzzy Control examples.
  • 7. Do forgive me for not using standardized notations in the presentation.
  • 8. The syllabus of your course seems to be too fuzzy!!!!. A simple satire, do take it in light manner.
  • 9. Traditional (Crisp) logic In 300 B.C. Aristotle formulated the law of the excluded middle, which is now the principle foundation of mathematics. X must be in a set of A or in a set of not A. In logic, the law of excluded middle says that a proposition can be either true or false.
  • 10. Classical sets Classical sets are also called crisp (sets). Ex: A = {apples, oranges, cherries, mangoes} A = {a1,a2,a3 } A = {2, 4, 6, 8, …} Mathematically: A = {x | x is an even natural number} A = {x | x = 2n, n is a natural number} Membership or characteristic function          Ax Ax x A if0 if1 )(
  • 11. Crisp (Traditional) Variables • Crisp variables represent precise quantities: – x = 3.1415296 – A {0,1} • A proposition is either True or False – A  B  C • King(Richard)  Greedy(Richard)  Evil(Richard) • Richard is either greedy or he isn't: – Greedy(Richard) {0,1} 29
  • 12. Is rose is RED? Is rose is not RED?. Is rose is not RED?. Traditional (crisp) logic
  • 13. Traditional (crisp) logic What about this rose?. Is rose is not RED?.
  • 14. What color is this leopard?
  • 15. Is this glass full or empty?
  • 16. Where do tall people start? A tall guy
  • 17. Crisp
  • 19. Fuzzy Are bowls are full of Apples?.
  • 20. Thus, fuzzy can be said as imprecise or not clear cut.
  • 21. What is fuzzy logic? Fuzzy logic is a superset of conventional (Boolean) logic that has been extended to handle the concept of partial truth -- truth values between "completely true" and "completely false".
  • 22. What is fuzzy logic? A type of logic that recognizes more than simple true and false values. With fuzzy logic, propositions can be represented with degrees of truthfulness and falsehood. For example, the statement, today is sunny, might be 100% true if there are no clouds, 80% true if there are a few clouds, 50% true if it's hazy and 0% true if it rains all day. Fuzzy logic has proved to be particularly useful in expert system and other artificial intelligence applications. It is also used in some spell checkers to suggest a list of probable words to replace a misspelled one.
  • 23. Fuzzy Logic “ A form of knowledge representation suitable for notions that cannot be defined precisely, but which depend upon their context. It enables computerized devices to reason more like humans”
  • 24. Classical Set (Crisp) • Contain objects that satisfy precise properties of membership. – Example: Set of heights from 5 to 7 feet 5 6 7 X (height) c (x) = {A 1 x є A 0 x є A 0 1 Characteristic Function
  • 25. Fuzzy Sets as Possibility Measure modeling-parameter Degree of membership to a fuzzy set 1 0  certainly possible values certainly not possible values as for known analytical models more or less possible values Crispmeans,exactly known parameter value, e. g.: 13.21345678953142........ - 3 -
  • 26. An example to elucidate possibility (not probability). • Probability is based on chance • Possibility is based on similarity. Fuzzy set theory is around this. • Take an example where you are in midst of a desert and thirsty. You found to bottles of water with two ratings on them, probability of good water and possibility of good water. Ratings of first bottle:0.9,0.5 while second bottle is:0.5,0.9. Which one do you pick up
  • 27. Fuzzy Set • Contain objects that satisfy imprecise properties of membership – Example : The set of heights in the region around 6 feet 5 6 7 X (height)  (x)є {0-1} A 0 1 Membership Function
  • 28. Some More Membership functions (figure from Klir&Yuan)
  • 29. Fuzzy Sets • What if Richard is only somewhat greedy? • Fuzzy Sets can represent the degree to which a quality is possessed. • Fuzzy Sets (Simple Fuzzy Variables) have values in the range of [0,1] • Greedy(Richard) = 0.7 • Question: How evil is Richard?
  • 30. Fuzzy sets: Linguistic Variables • Fuzzy Linguistic Variables are used to represent qualities spanning a particular spectrum • Temp: {Freezing, Cool, Warm, Hot} • Membership Function • Question: What is the temperature? • Answer: It is warm. • Question: How warm is it?
  • 31. • Directions For soup preparation: • 1. Empty contents into saucepan; add 4½ cups (1 L) cold water. • 2. Bring to a boil, stirring constantly. • 3. Reduce heat; partially cover and simmer for 15 minutes, stirring occasionally. Fuzzy Linguistic Variables
  • 32. Linguistic variables: Our report to the physician. • High fever • frequent coughing. • Shaking, • Too chilling • Hardly, I can move
  • 33. Fuzzy Logic: Motivations • Alleviate difficulties in developing and analyzing complex systems encountered by conventional mathematical tools. • Observing that human reasoning can utilize concepts and knowledge that do not have well-defined, sharp boundaries.
  • 36. Representing Age • Fuzzy sets can be used to represent fuzzy concepts. Let U be a reasonable age interval of human beings. • U = {0, 1, 2, 3, ... , 100} • Solution 2-1. This interval can be interpreted with fuzzy sets by setting the universal space for age to range from 0 to 100. • Assume that the concept of "young" is represented by a fuzzy set Young, whose membership function is given by the following fuzzy set. • The concept of "old" can also be represented by a fuzzy set, Old, whose membership function could be defined in the following way. • We define the concept of middle-aged to be neither young nor old. We do this by using fuzzy operators from Fuzzy Logic. • We can find a fuzzy set to represent the concept of middle-aged by taking the intersection of the complements of our Young and Old fuzzy sets. • We can now see a graphical interpretation of our age descriptors. From the graph, you can see that the intersection of "not young" and "not old" gives a reasonable definition for the concept of "middle- aged."
  • 38. Membership Functions • How cool is 36 F° ? 50 70 90 1103010 Temp. (F°) Freezing Cool Warm Hot 0 1
  • 39. Membership Functions • How cool is 36 F° ? • It is 30% Cool and 70% Freezing 50 70 90 1103010 Temp. (F°) Freezing Cool Warm Hot 0 1 0.7 0.3
  • 40. Natural Numbers • Suppose you are asked to define the set of natural numbers close to 6. There are a number of different ways in which you could accomplish this using fuzzy sets. • Solution 1. One solution would be to manually create a fuzzy set describing the numbers near 6. This can be done as above.
  • 43. Choosing a Job • Fuzzy sets can be used to aid in decision making or management. We illustrate this with an example from Klir and Folger [Klir and Folger, 1988]. Given four jobs (Jobs 1, 2, 3, and 4), our task is to choose the job that will give us the highest salary, given the constraints that the job should be interesting and close to our home. • Solution. The first constraint of job interest can be represented with the following fuzzy set. • We can see that Job 3 has the highest membership grade, meaning that Job 3 is the most interesting of the four jobs. Job 1 on the other hand is the least interesting, since it has a membership grade of only 0.4.
  • 44. • We can form a fuzzy set for our second constraint in a similar manner. Here is a fuzzy set used to represent the driving distance to the four jobs. • In the fuzzy set above, the membership grades indicate the length of the drive to work. A high membership grade indicates that it is a short drive to work--a good thing. A small membership grade indicates an undesirable, long drive to work. From the fuzzy set above, we can see that Job 4 is located near our home, while Job 1 is a long way from our home.
  • 48. History of Fuzzy Logic •1964: Lotfi A. Zadeh, UC Berkeley, introduced the paper on fuzzy sets. – Idea of grade of membership was born – Sharp criticism from academic community • Name! • Theory’s emphasis on imprecision – Waste of government funds!
  • 49. History of Fuzzy Logic • 1965-1975: Zadeh continued to broaden the foundation of fuzzy set theory – Fuzzy multistage decision-making – Fuzzy similarity relations – Fuzzy restrictions – Linguistic hedges •1970s: research groups were form in JAPAN
  • 50. History of Fuzzy Logic • 1974: Mamdani, United Kingdom, developed the first fuzzy logic controller •1977: Dubois applied fuzzy sets in a comphrensive study of traffic conditions •1976-1987: Industrial application of fuzzy logic in Japan and Europe •1987-Present: Fuzzy Boom
  • 51. Fuzzy Logic Applications “If all motion vectors are almost parallel and their time differential is small, then the hand jittering is detected and the direction of the hand movement is in the direction of the moving vectors”. Image Stabilization via Fuzzy Logic
  • 52. Fuzzy Logic Applications • Aerospace – Altitude control of spacecraft, satellite altitude control, flow and mixture regulation in aircraft de- icing vehicles. • Automotive – Trainable fuzzy systems for idle speed control, shift scheduling method for automatic transmission, intelligent highway systems, traffic control, improving efficiency of automatic transmissions
  • 53. Fuzzy Logic Applications (Cont.) • Business – Decision-making support systems, personnel evaluation in a large company • Chemical Industry – Control of pH, drying, chemical distillation processes, polymer extrusion production, a coke oven gas cooling plant
  • 54. Fuzzy Logic Applications (Cont.) • Defense – Underwater target recognition, automatic target recognition of thermal infrared images, naval decision support aids, control of a hypervelocity interceptor, fuzzy set modeling of NATO decision making. • Electronics – Control of automatic exposure in video cameras, humidity in a clean room, air conditioning systems, washing machine timing, microwave ovens, vacuum cleaners.
  • 55. Fuzzy Logic Applications (Cont.) • Financial – Banknote transfer control, fund management, stock market predictions. • Industrial – Cement kiln controls (dating back to 1982), heat exchanger control, activated sludge wastewater treatment process control, water purification plant control, quantitative pattern analysis for industrial quality assurance, control of constraint satisfaction problems in structural design, control of water purification plants
  • 56. Fuzzy Logic Applications (Cont.) • Manufacturing – Optimization of cheese production. • Marine – Autopilot for ships, optimal route selection, control of autonomous underwater vehicles, ship steering. • Medical – Medical diagnostic support system, control of arterial pressure during anesthesia, multivariable control of anesthesia, modeling of neuro-pathological findings in Alzheimer's patients, radiology diagnoses, fuzzy inference diagnosis of diabetes and prostate cancer.
  • 57. Fuzzy Logic Applications (Cont.) • Mining and Metal Processing – Sinter plant control, decision making in metal forming. • Robotics – Fuzzy control for flexible-link manipulators, robot arm control. • Securities – Decision systems for securities trading.
  • 58. Fuzzy Logic Applications (Cont.) • Signal Processing and Telecommunications – Adaptive filter for nonlinear channel equalization control of broadband noise • Transportation – Automatic underground train operation, train schedule control, railway acceleration, braking, and stopping
  • 59. Fuzzy logic & probability theory • Suppose you are seated at a table on which rest two glasses of liquid. – First glass is described : “having a 95% chance Of being healthful and good” – Second glass is described : “having a .95 membership in the class of healthful and good” • Which glass would you select, keeping in mind that the first glass has a 5 % chance of being filled with non-healthful liquids, including poisons [Bezdek 1993]?
  • 60. Air conditioner (Mitsubishi) • Conventional air conditioning systems use on-off controllers. When the temperature drops below a preset level the unit is automatically turned off. When the temperature rises above a preset level the unit is turned on. The former preset value is slightly lower than the latter preset value, providing a dead zone, so that high-frequency on-off cycling (chatter) is avoided. The thermostat in the system controls the on-off action. For example, "when the temperature rises to 25°C, turn on the unit, and when the temperature falls to 20°C, turn off the unit." The Mitsubishi air conditioner controls by using fuzzy rules such as: "If the ambient air is getting warmer, turn the cooling power up a little; if the air is getting chilly, turn the power down moderately, etc." The machine becomes smoother as a result. This means less wear and tear of the air conditioner, more consistent comfortable room temperatures, and increased efficiency (energy savings).
  • 61. Vacuum cleaner (Panasonic) • Characteristics of the floor and the amount of dust are sensed by an infrared sensor, and the microprocessor selects the appropriate power by fuzzy control according to these characteristics. The floor characteristics include the type (hardwood, cement, tile, carpet softness, carpet thickness, etc.). The changing pattern of the amount of dust passing through the infrared sensor is established as well. The microprocessor establishes the appropriate setting of the vacuum head and the power of the motor, using a fuzzy control scheme. Red and green lamps of the vacuum cleaner show the amount of dust left on the floor.
  • 62. Automatic transmission system (Nissan, Subaru, Mitsubishi) • In a conventional automatic transmission system, electronic sensors measure the vehicle speed and throttle opening, and gears are shifted based on the predetermined values of these variables. According to Nissan, this type of system is incapable of uniformly providing satisfactory control performance to a driver because it provides only about three different shift patterns. The fuzzy control transmission senses several variables including vehicle speed and acceleration, throttle opening, the rate of change of throttle opening, engine load, and driving style. Each sensed value is given a weight, and a fuzzy aggregate is calculated to decide whether to shift gears. This controller is said to be more flexible, smooth, and efficient, providing better performance. Also, an integrated system developed by Mitsubishi uses fuzzy logic for active control of the suspension system, four-wheel-drive (traction), steering, and air conditioning.
  • 63. Washing machine (Matsushita, Hitachi) • The control system senses both quality and quantity of dirt, load size, and fabric type, and adjusts the washing cycle and detergent amount accordingly. Clarity of water in the washing machine is measured by light sensors. At the start of the cycle, dirt from clothes will not have yet reached the water, so light will pass through it easily. The water becomes more discoloured as the wash cycle proceeds, and less light will pass through. This information is analyzed and control decisions are made using fuzzy logic.
  • 64. Camcorder (Panasonic, Sanyo, Fisher, Canon) • The video camera determines the best focus and lighting, particularly when several objects are in the picture. Also, it has a digital image stabilizer to remove hand jitter. Fuzzy decision-making is used in these actions. For example, the following scheme is used for image stabilization. The present image frame is compared with the previous frame from memory. A typically stationary object (e.g., house) is identified and its shift coordinates are computed. This shift is subtracted from the image to compensate for the hand jitter. A fuzzy algorithm provides a smooth control/compensation action.
  • 65. Other… • Elevator control (Fujitec, Toshiba): A fuzzy scheme evaluates passenger traffic and the elevator variables (load, speed, etc.) to determine car announcement and stopping time. This reduces waiting time and improves the efficiency and reliability of operation. • Handheld computer (Sony): A fuzzy logic scheme reads the hand- written input and interprets the characters for data entry. • Television (Sony): A fuzzy logic scheme uses sensed variables such as ambient lighting, time of day, and user profile, and adjusts such parameters as screen brightness, colour, contrast, and sound. • Antilock braking system (Nissan): The system senses wheel speed, road conditions, and driving pattern, and the fuzzy ABS determines the braking action, with skid control.
  • 66. Other… • Subway train (Sendai): A fuzzy decision scheme is used by the subway trains in Sendai, Japan, to determine the speed and stopping routine. Ride comfort and safety are used as performance requirements. • Other applications of fuzzy logic include a hot water heater (Matsushita), a rice cooker (Hitachi), and a cement kiln (Denmark). A fuzzy stock-trading program can manage stock portfolios. A fuzzy golf diagnostic system is able to select the best golf club based on size, characteristics, and swing of a golfer. A fuzzy mug search system helps in criminal investigations by analyzing mug shots (photos of the suspects) along with other input data (say, statements such as "short, heavy-set, and young-looking . . ." from witnesses) to determine the most likely criminal. Gift-wrapped chocolates with fuzzy statements are available for Valentine's Day. Even a Yamaha "fuzzy" scooter was spotted in Taipei.
  • 68. Fuzzy sets A fuzzy set is a set with a smooth boundary. A fuzzy set is defined by a functions that maps objects in a domain of concern into their membership value in a set. Such a function is called the membership function.
  • 69. Features of the Membership Function • Core: comprises those elements x of the universe such that  a (x) = 1. • Support : region of the universe that is characterized by nonzero membership. • Boundary :boundaries comprise those elements x of the universe such that 0<  a (x) <1
  • 70. Features of the Membership Function (Cont.) • Normal Fuzzy Set : at least one element x in the universe whose membership value is unity
  • 71. Features of the Membership Function (Cont.) • Convex Fuzzy set: membership values are strictly monotonically increasing, or strictly monotonically decreasing, or strictly monotonically increasing then strictly monotonically decreasing with increasing values for elements in the universe.  a (y) ≥ min[ a (x) ,  a (z) ]
  • 72. Features of the Membership Function (Cont.) • Cross-over points :  a (x)= 0.5 • Height: defined as max { a (x)}
  • 73. Fuzzy Set (figure from Earl Cox)
  • 74. Definitions – fuzzy sets (figure from Klir&Yuan)
  • 75. Definitions: Fuzzy Sets (figure from Klir&Yuan)
  • 76. Fuzzy set (figure from Earl Cox)
  • 77. Design Membership Functions Manual - Expert knowledge. Interview those who are familiar with the underlying concepts and later adjust. Tuned through a trial-and-error - Inference - Statistical techniques (Rank ordering)
  • 78. Intuition • Derived from the capacity of humans to develop membership functions through their own innate intelligence and understanding. • Involves contextual and semantic knowledge about an issue; it can also involve linguistic truth values about this knowledge. Fuzzy Logic with Engineering Applications: Timothy J. Ross
  • 79. Inference • Use knowledge to perform deductive reasoning, i.e . we wish to deduce or infer a conclusion, given a body of facts and knowledge.
  • 80. Inference : Example • In the identification of a triangle – Let A, B, C be the inner angles of a triangle • Where A≥ B≥C – Let U be the universe of triangles, i.e., • U = {(A,B,C) | A≥B≥C≥0; A+B+C = 180˚} – Let ‘s define a number of geometric shapes • I Approximate isosceles triangle • R Approximate right triangle • IR Approximate isosceles and right triangle • E Approximate equilateral triangle • T Other triangles Fuzzy Logic with Engineering Applications: Timothy J. Ross
  • 81. Inference : Example • We can infer membership values for all of these triangle types through the method of inference, because we possess knowledge about geometry that helps us to make the membership assignments. • For Isosceles,  i (A,B,C) = 1- 1/60* min(A-B,B-C) – If A=B OR B=C THEN i (A,B,C) = 1; – If A=120˚,B=60˚, and C =0˚ THEN i (A,B,C) = 0. Fuzzy Logic with Engineering Applications: Timothy J. Ross
  • 82. Inference : Example • For right triangle,  R (A,B,C) = 1- 1/90* |A-90˚| – If A=90˚ THEN i (A,B,C) = 1; – If A=180˚ THEN i (A,B,C) = 0. • For isosceles and right triangle – IR = min (I, R)  IR (A,B,C) = min[I (A,B,C), R (A,B,C)] = 1 - max[1/60min(A-B, B-C), 1/90|A-90|] Fuzzy Logic with Engineering Applications: Timothy J. Ross
  • 83. Inference : Example • For equilateral triangle  E (A,B,C) = 1 - 1/180* (A-C) – When A = B = C then E (A,B,C) = 1, A = 180 then E (A,B,C) = 0 • For all other triangles – T = (I.R.E)’ = I’.R’.E’ = min {1 - I (A,B,C) , 1 - R (A,B,C) , 1 - E (A,B,C) Fuzzy Logic with Engineering Applications: Timothy J. Ross
  • 84. Inference : Example – Define a specific triangle: • A = 85˚ ≥ B = 50˚ ≥ C = 45˚ R = 0.94 I = 0.916 IR = 0.916 E = 0. 7 T = 0.05 Fuzzy Logic with Engineering Applications: Timothy J. Ross
  • 86. Fuzzy Sets Example The temperature graduations are related to Johnny’s perception of ambient temperatures. where: Y : temp value belongs to the set (0<A(x)<1) Y* : temp value is the ideal member to the set (A(x)=1) N : temp value is not a member of the set (A(x)=0) Temp (0C). COLD COOL PLEASANT WARM HOT 0 Y* N N N N 5 Y Y N N N 10 N Y N N N 12.5 N Y* N N N 15 N Y N N N 17.5 N N Y* N N 20 N N N Y N 22.5 N N N Y* N 25 N N N Y N 27.5 N N N N Y 30 N N N N Y*
  • 87. Fuzzy Sets Example Johnny’s perception of the speed of the motor is as follows: where: Y : temp value belongs to the set (0<A(x)<1) Y* : temp value is the ideal member to the set (A(x)=1) N : temp value is not a member of the set (A(x)=0) Rev/sec (RPM) MINIMAL SLOW MEDIUM FAST BLAST 0 Y* N N N N 10 Y N N N N 20 Y Y N N N 30 N Y* N N N 40 N Y N N N 50 N N Y* N N 60 N N N Y N 70 N N N Y* N 80 N N N Y Y 90 N N N N Y 100 N N N N Y*
  • 88. Fuzzy Sets Example • The analytically expressed membership for the reference fuzzy subsets for the temperature are: • COLD: for 0 ≤ t ≤ 10 COLD(t) = – t / 10 + 1 • SLOW: for 0 ≤ t ≤ 12.5 SLOW(t) = t / 12.5 for 12.5 ≤ t ≤ 17.5 SLOW(t) = – t / 5 + 3.5 • etc… all based on the linear equation: y = ax + b
  • 89. Fuzzy Sets Example Temperature Fuzzy Sets 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 5 10 15 20 25 30 Temperature Degrees C TruthValue Cold Cool Pleasent Warm Hot
  • 90. Fuzzy Sets Example • The analytically expressed membership for the reference fuzzy subsets for the temperature are: • MINIMAL: for 0 ≤ v ≤ 30 COLD(t) = – v / 30 + 1 • SLOW: for 10 ≤ v ≤ 30 SLOW(t) = v / 20 – 0.5 for 30 ≤ v ≤ 50 SLOW(t) = – v / 20 + 2.5 • etc… all based on the linear equation: y = ax + b
  • 91. Fuzzy Sets Example Speed Fuzzy Sets 0 0.2 0.4 0.6 0.8 1 0 10 20 30 40 50 60 70 80 90 100 Speed TruthValue MINIMAL SLOW MEDIUM FAST BLAST
  • 92. Girl-Student Membership Function for “Young”             xif xif x xif xS 400 4025 15 40 251
  • 93. Membership Function for “Young”             xif xif x xif xB 700 7040 30 70 401
  • 94. Rank ordering • Assessing preferences by a single individual, a committee, a poll, and other opinion methods can be used to assign membership values to a fuzzy variable. • Preference is determined by pair-wise comparisons, and these determine the ordering of the membership.
  • 97. Characteristics of Fuzzy Sets • The classical set theory developed in the late 19th century by Georg Cantor describes how crisp sets can interact. These interactions are called operations. • Also fuzzy sets have well defined properties. • These properties and operations are the basis on which the fuzzy sets are used to deal with uncertainty on the one hand and to represent knowledge on the other.
  • 98. Note: Membership Functions • For the sake of convenience, usually a fuzzy set is denoted as: A = A(xi)/xi + …………. + A(xn)/xn where A(xi)/xi (a singleton) is a pair “grade of membership” element, that belongs to a finite universe of discourse: A = {x1, x2, .., xn}
  • 99. Operations of Fuzzy Sets Intersection Union Complement Not A A Containment AA B BA BAA B
  • 100. Complement • Crisp Sets: Who does not belong to the set? • Fuzzy Sets: How much do elements not belong to the set? • The complement of a set is an opposite of this set. For example, if we have the set of tall men, its complement is the set of NOT tall men. When we remove the tall men set from the universe of discourse, we obtain the complement. • If A is the fuzzy set, its complement A can be found as follows: A(x) = 1  A(x)
  • 101. Containment • Crisp Sets: Which sets belong to which other sets? • Fuzzy Sets: Which sets belong to other sets? • Similar to a Chinese box, a set can contain other sets. The smaller set is called the subset. For example, the set of tall men contains all tall men; very tall men is a subset of tall men. However, the tall men set is just a subset of the set of men. In crisp sets, all elements of a subset entirely belong to a larger set. In fuzzy sets, however, each element can belong less to the subset than to the larger set. Elements of the fuzzy subset have smaller memberships in it than in the larger set.
  • 102. Intersection • Crisp Sets: Which element belongs to both sets? • Fuzzy Sets: How much of the element is in both sets? • In classical set theory, an intersection between two sets contains the elements shared by these sets. For example, the intersection of the set of tall men and the set of fat men is the area where these sets overlap. In fuzzy sets, an element may partly belong to both sets with different memberships. • A fuzzy intersection is the lower membership in both sets of each element. The fuzzy intersection of two fuzzy sets A and B on universe of discourse X: AB(x) = min [A(x), B(x)] = A(x)  B(x), where xX
  • 103. Union • Crisp Sets: Which element belongs to either set? • Fuzzy Sets: How much of the element is in either set? • The union of two crisp sets consists of every element that falls into either set. For example, the union of tall men and fat men contains all men who are tall OR fat. • In fuzzy sets, the union is the reverse of the intersection. That is, the union is the largest membership value of the element in either set. The fuzzy operation for forming the union of two fuzzy sets A and B on universe X can be given as: AB(x) = max [A(x), B(x)] = A(x)  B(x), where xX
  • 104. Operations of Fuzzy Sets Complement 0 x 1 (x) 0 x 1 Containment 0 x 1 0 x 1 A B Not A A Intersection 0 x 1 0 x A B Union 0 1 A B A B 0 x 1 0 x 1 B A B A (x) (x) (x)
  • 105. Properties of Fuzzy Sets • Equality of two fuzzy sets • Inclusion of one set into another fuzzy set • Cardinality of a fuzzy set • An empty fuzzy set • -cuts (alpha-cuts)
  • 106. Equality • Fuzzy set A is considered equal to a fuzzy set B, IF AND ONLY IF (iff): A(x) = B(x), xX A = 0.3/1 + 0.5/2 + 1/3 B = 0.3/1 + 0.5/2 + 1/3 therefore A = B
  • 107. Inclusion • Inclusion of one fuzzy set into another fuzzy set. Fuzzy set A  X is included in (is a subset of) another fuzzy set, B  X: A(x)  B(x), xX Consider X = {1, 2, 3} and sets A and B A = 0.3/1 + 0.5/2 + 1/3; B = 0.5/1 + 0.55/2 + 1/3 then A is a subset of B, or A  B
  • 108. Cardinality • Cardinality of a non-fuzzy set, Z, is the number of elements in Z. BUT the cardinality of a fuzzy set A, the so-called SIGMA COUNT, is expressed as a SUM of the values of the membership function of A, A(x): cardA = A(x1) + A(x2) + … A(xn) = ΣA(xi), for i=1..n Consider X = {1, 2, 3} and sets A and B A = 0.3/1 + 0.5/2 + 1/3; B = 0.5/1 + 0.55/2 + 1/3 cardA = 1.8 cardB = 2.05
  • 109. Empty Fuzzy Set • A fuzzy set A is empty, IF AND ONLY IF: A(x) = 0, xX Consider X = {1, 2, 3} and set A A = 0/1 + 0/2 + 0/3 then A is empty
  • 110. Alpha-cut • An -cut or -level set of a fuzzy set A X is an ORDINARY SET A X, such that: A={A(x), xX}. Consider X = {1, 2, 3} and set A A = 0.3/1 + 0.5/2 + 1/3 then A0.5 = {2, 3}, A0.1 = {1, 2, 3}, A1 = {3}
  • 111. Alpha levels, core, support, normal z zz z z zz
  • 112. Fuzzy Set Normality • A fuzzy subset of X is called normal if there exists at least one element xX such that A(x) = 1. • A fuzzy subset that is not normal is called subnormal. • All crisp subsets except for the null set are normal. In fuzzy set theory, the concept of nullness essentially generalises to sub-normality. • The height of a fuzzy subset A is the large membership grade of an element in A height(A) = maxx(A(x))
  • 113. Fuzzy Sets Core and Support • Assume A is a fuzzy subset of X: • the support of A is the crisp subset of X consisting of all elements with membership grade: supp(A) = {x A(x)  0 and xX} • the core of A is the crisp subset of X consisting of all elements with membership grade: core(A) = {x A(x) = 1 and xX}
  • 114. Fuzzy Set Math Operations • aA = {aA(x), xX} Let a =0.5, and A = {0.5/a, 0.3/b, 0.2/c, 1/d} then Aa = {0.25/a, 0.15/b, 0.1/c, 0.5/d} • Aa = {A(x)a, xX} Let a =2, and A = {0.5/a, 0.3/b, 0.2/c, 1/d} then Aa = {0.25/a, 0.09/b, 0.04/c, 1/d} • …
  • 115. Fuzzy Sets Examples • Consider two fuzzy subsets of the set X, X = {a, b, c, d, e } referred to as A and B A = {1/a, 0.3/b, 0.2/c 0.8/d, 0/e} and B = {0.6/a, 0.9/b, 0.1/c, 0.3/d, 0.2/e}
  • 116. Fuzzy Sets Examples • Support: supp(A) = {a, b, c, d } supp(B) = {a, b, c, d, e } • Core: core(A) = {a} core(B) = {o} • Cardinality: card(A) = 1+0.3+0.2+0.8+0 = 2.3 card(B) = 0.6+0.9+0.1+0.3+0.2 = 2.1
  • 117. Fuzzy Sets Examples • Complement: A = {1/a, 0.3/b, 0.2/c 0.8/d, 0/e} A = {0/a, 0.7/b, 0.8/c 0.2/d, 1/e} • Union: A  B = {1/a, 0.9/b, 0.2/c, 0.8/d, 0.2/e} • Intersection: A  B = {0.6/a, 0.3/b, 0.1/c, 0.3/d, 0/e}
  • 118. Fuzzy Sets Examples • aA: for a=0.5 aA = {0.5/a, 0.15/b, 0.1/c, 0.4/d, 0/e} • Aa: for a=2 Aa = {1/a, 0.09/b, 0.04/c, 0.64/d, 0/e} • a-cut: A0.2 = {a, b, c, d} A0.3 = {a, b, d} A0.8 = {a, d} A1 = {a}
  • 119. Exercise For A = {0.2/a, 0.4/b, 1/c, 0.8/d, 0/e} B = {0/a, 0.9/b, 0.3/c, 0.2/d, 0.1/e} Calculate the following: - Support, Core, Cardinality, and Complement for A and B independently - Union and Intersection of A and B - the new set C, if C = A2 - the new set D, if D = 0.5B - the new set E, for an alpha cut at A0.5
  • 120. Solution A = {0.2/a, 0.4/b, 1/c, 0.8/d, 0/e} B = {0/a, 0.9/b, 0.3/c, 0.2/d, 0.1/e} Support Supp(A) = {a, b, c, d} Supp(B) = {b, c, d, e} Core Core(A) = {c} Core(B) = {} Cardinality Card(A) = 0.2 + 0.4 + 1 + 0.8 + 0 = 2.4 Card(B) = 0 + 0.9 + 0.3 + 0.2 + 0.1 = 1.5 Complement Comp(A) = {0.8/a, 0.6/b, 0/c, 0.2/d, 1/e} Comp(B) = {1/a, 0.1/b, 0.7/c, 0.8/d, 0.9/e}
  • 121. Solution A = {0.2/a, 0.4/b, 1/c, 0.8/d, 0/e} B = {0/a, 0.9/b, 0.3/c, 0.2/d, 0.1/e} Union AB = {0.2/a, 0.9/b, 1/c, 0.8/d, 0.1/e} Intersection AB = {0/a, 0.4/b, 0.3/c, 0.2/d, 0/e} C=A2 C = {0.04/a, 0.16/b, 1/c, 0.64/d, 0/e} D = 0.5B D = {0/a, 0.45/b, 0.15/c, 0.1/d, 0.05/e} E = A0.5 E = {c, d}
  • 128. Some More Formal Definitions• Definition 1: Let X be some set of objects, with elements noted as x. • X = {x}. • Definition 2: A fuzzy set A in X is characterized by a membership function mA(x) which maps each point in X onto the real interval [0.0, 1.0]. As mA(x) approaches 1.0, the "grade of membership" of x in A increases. • Definition 3: A is EMPTY iff for all x, mA(x) = 0.0. • Definition 4: A = B iff for all x: mA(x) = mB(x) [or, mA = mB]. • Definition 5: mA' = 1 - mA. • Definition 6: A is CONTAINED in B iff mA  mB. • Definition 7: C = A UNION B, where: mC(x) = MAX(mA(x), mB(x)). • Definition 8: C = A INTERSECTION B where: mC(x) = MIN(mA(x), mB(x)).
  • 129. Operations A B A  B A  B A
  • 130. Fuzzy Disjunction • AB max(A, B) • AB = C "Quality C is the disjunction of Quality A and B" 0 1 0.375 A 0 1 0.75 B (AB = C)  (C = 0.75)
  • 131. Fuzzy Conjunction • AB min(A, B) • AB = C "Quality C is the conjunction of Quality A and B" 0 1 0.375 A 0 1 0.75 B (AB = C)  (C = 0.375)
  • 132. Example: Fuzzy Conjunction Calculate AB given that A is .4 and B is 20 0 1 A 0 1 B .1 .2 .3 .4 .5 .6 .7 .8 .9 1 5 10 15 20 25 30 35 40
  • 133. Example: Fuzzy Conjunction Calculate AB given that A is .4 and B is 20 0 1 A 0 1 B .1 .2 .3 .4 .5 .6 .7 .8 .9 1 5 10 15 20 25 30 35 40 Determine degrees of membership:
  • 134. Example: Fuzzy Conjunction Calculate AB given that A is .4 and B is 20 0 1 A 0 1 B .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 0.7
  • 135. Example: Fuzzy Conjunction Calculate AB given that A is .4 and B is 20 0 1 A 0 1 B .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 0.7 0.9
  • 136. Example: Fuzzy Conjunction Calculate AB given that A is .4 and B is 20 0 1 A 0 1 B .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 AB = min(A, B) = 0.7 0.7 0.9
  • 142. 2. Fuzzy Number A fuzzy number A must possess the following three properties: 1. A must be a normal fuzzy set, 2. The alpha levels must be closed for every , 3. The support of A, , must be bounded. )(A ]1,0( )0( A
  • 143. 1 Membershipfunction is the suport of z1 is the modal value is an -level of ,  (0,1]  Fuzzy Number (from Jorge dos Santos) ' < ' [ ] [ ]z z       ,z z  z1zz  z  z ,[ ] z zz         z% ’ z% 
  • 144. 1 A fuzzy number can be given by a set of nested intervals, the -levels: Fuzzy numbers defined by its -levels (from Jorge dos Santos) .7 .5 .2 0 z% z 0.2 z 0.5 z 0.7 z 0.7 z 0.5 z 0.2 z z1z 1 0.7 0.5 0.2 0 [ ] [ ] [ ] [ ] [ ]z z z z z   
  • 145. 1 Triangular fuzzy numbers 1( / / )z z z z % zz 1z 1 1; 0 1 , ,[ ] [ ] [ ] [ ]z z z z z z  
  • 146. Fuzzy Number (figure from Klir&Yuan)
  • 147. B. Operations on Fuzzy Sets: Union and Intersection (figure from Klir&Yuan)
  • 148. Operations on Fuzzy Sets: Intersection (figure from Klir&Yuan)
  • 149. Operations on Fuzzy Sets: Union and Complement (figure from Klir&Yuan)
  • 150. C. Operations on Fuzzy Numbers: Addition and Subtraction (figure from Klir&Yuan)
  • 151. Operations on Fuzzy Numbers: Multiplication and Division (figure from Klir&Yuan)
  • 152. Fuzzy Equations },where8.0)(|{ :istioninterpretaAnother ).(/)()(/)()(/)()(/)(ii) (0,1])(/)()(/)(i) :iffexistsequationfuzzytheosolution tThen the )].(),([)(and)](),([)()],(),([)(Let ).()()( :istioninterpretaOne ~~ * ~ BbAabaxx abababab abab xxXbbBaaA BXA BXA           
  • 153. Example of a Fuzzy Equation (figure from Klir&Yuan) )()( :that(ii)Verify 5 1232, 3 128)( thatso 5 1232 3 128 :that(i)Verify ]1232,128[)( ]5,3[)( 3202for12/)32( 2012for8/)12( 32,12for0 )( 54for5 43for3 5,3for0 )(            XX X B A xx xx xx xB xx xx xx xA                                               
  • 154. The Extension Principle of Zadeh Given a formula f(x) and a fuzzy set A defined by, how do we compute the membership function of f(A) ? How this is done is what is called the extension principle (of professor Zadeh). What the extension principle says is that f (A) =f(A( )). The formal definition is: [f(A)](y)=supx|y=f(x){ } )(xA    )(xA 
  • 155. Extension Principle - Example Let f(x) = ax+b, 23/15/86 Then.6and,5/3/2,3/2/1   BAf(x) xBbAa
  • 157. FUZZY RELATIONS, FUZZY GRAPHS, AND FUZZY ARITHMETIC
  • 158. INTRODUCTION 3 Important concepts in fuzzy logic • Fuzzy Relations • Fuzzy Graphs • Extension Principle -- } Form the foundation of fuzzy rules basis of fuzzy Arithmetic - This is what makes a fuzzy system tick!
  • 159. Fuzzy Relations • Generalizes classical relation into one that allows partial membership – Describes a relationship that holds between two or more objects • Example: a fuzzy relation “Friend” describe the degree of friendship between two person (in contrast to either being friend or not being friend in classical relation!)
  • 160. Fuzzy Relations • A fuzzy relation is a mapping from the Cartesian space X x Y to the interval [0,1], where the strength of the mapping is expressed by the membership function of the relation  (x,y) • The “strength” of the relation between ordered pairs of the two universes is measured with a membership function expressing various “degree” of strength [0,1] ˜R ˜R
  • 161. Fuzzy Cartesian Product Let be a fuzzy set on universe X, and be a fuzzy set on universe Y, then Where the fuzzy relation R has membership function ˜A  ˜B  ˜R  X  Y ˜R (x, y)   ˜Ax˜B (x, y)  min( ˜A (x), ˜B (y)) ˜A ˜B
  • 162. Fuzzy Cartesian Product: Example Let defined on a universe of three discrete temperatures, X = {x1,x2,x3}, and defined on a universe of two discrete pressures, Y = {y1,y2} Fuzzy set represents the “ambient” temperature and Fuzzy set the “near optimum” pressure for a certain heat exchanger, and the Cartesian product might represent the conditions (temperature- pressure pairs) of the exchanger that are associated with “efficient” operations. For example, let ˜A ˜B ˜A ˜B ˜A  0.2 x1  0.5 x2  1 x3 and ˜B  0.3 y1  0.9 y2 } ˜A  ˜B  ˜R  x1 x2 x3 0.2 0.2 0.3 0.5 0.3 0.9         y1 y2
  • 163. Fuzzy Composition Suppose is a fuzzy relation on the Cartesian space X x Y, is a fuzzy relation on the Cartesian space Y x Z, and is a fuzzy relation on the Cartesian space X x Z; then fuzzy max-min and fuzzy max-product composition are defined as ˜R ˜S ˜T ˜T  ˜Ro ˜S max min ˜T (x,z)   yY ( ˜R (x,y)  ˜S (y,z)) max product ˜T (x,z)   yY ( ˜R (x,y)  ˜S (y, z))
  • 164. Fuzzy Composition: Example (max-min) X  {x1,x2}, ˜T (x1,z1)   yY ( ˜R (x1,y)  ˜S (y,z1))  max[min(0.7,0.9),min(0.5, 0.1)]  0.7 Y {y1,y2},and Z  {z1,z2,z3} Consider the following fuzzy relations: ˜R  x1 x2 0.7 0.5 0.8 0.4     y1 y2 and ˜S  y1 y2 0.9 0.6 0.5 0.1 0.7 0.5     z1 z2 z3 Using max-min composition, } 321 2 1 5.06.08.0 5.06.07.0~ zzz x x T       
  • 165. Fuzzy Composition: Example (max-Prod) X  {x1,x2}, ˜T (x2, z2 )   yY ( ˜R (x2 , y)  ˜S (y, z2))  max[(0.8,0.6),(0.4, 0.7)]  0.48 Y {y1,y2},and Z  {z1,z2,z3} Consider the following fuzzy relations: ˜R  x1 x2 0.7 0.5 0.8 0.4     y1 y2 and ˜S  y1 y2 0.9 0.6 0.5 0.1 0.7 0.5     z1 z2 z3 Using max-product composition, }˜T  x1 x2 .63 .42 .25 .72 .48 .20     z1 z2 z3
  • 166. Application: Computer Engineering Problem: In computer engineering, different logic families are often compared on the basis of their power-delay product. Consider the fuzzy set F of logic families, the fuzzy set D of delay times(ns), and the fuzzy set P of power dissipations (mw). If F = {NMOS,CMOS,TTL,ECL,JJ}, D = {0.1,1,10,100}, P = {0.01,0.1,1,10,100} Suppose R1 = D x F and R2 = F x P ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ˜R1  0.1 1 10 100 0 0 0 .6 1 0 .1 .5 1 0 .4 1 1 0 0 1 .2 0 0 0           N C T E J and ˜R2  N C T E J 0 .4 1 .3 0 .2 1 0 0 0 0 0 .7 1 0 0 0 0 1 .5 1 .1 0 0 0             .01 .1 1 10 100
  • 167. Application: Computer Engineering (Cont) We can use max-min composition to obtain a relation between delay times and power dissipation: i.e., we can compute or˜R3  ˜R1 o ˜R2 ˜R3  (˜R1  ˜R2 ) ˜R3  0.1 1 10 100 1 .1 0 .6 .5 .1 .1 .5 1 .5 .2 1 .7 1 0 .2 .4 1 .3 0             .01 .1 1 10 100
  • 168. Application: Fuzzy Relation Petite Fuzzy Relation Petite defines the degree by which a person with a specific height and weight is considered petite. Suppose the range of the height and the weight of interest to us are {5’, 5’1”, 5’2”, 5’3”, 5’4”,5’5”,5’6”}, and {90, 95,100, 105, 110, 115, 120, 125} (in lb). We can express the fuzzy relation in a matrix form as shown below: ˜P  5' 5'1" 5' 2" 5' 3" 5' 4" 5' 5" 5' 6" 1 1 1 1 1 1 .5 .2 1 1 1 1 1 .9 .3 .1 1 1 1 1 1 .7 .1 0 1 1 1 1 .5 .3 0 0 .8 .6 .4 .2 0 0 0 0 .6 .4 .2 0 0 0 0 0 0 0 0 0 0 0 0 0                 90 95 100 105 110 115 120 125
  • 169. Application: Fuzzy Relation Petite ˜P  5' 5'1" 5' 2" 5' 3" 5' 4" 5' 5" 5' 6" 1 1 1 1 1 1 .5 .2 1 1 1 1 1 .9 .3 .1 1 1 1 1 1 .7 .1 0 1 1 1 1 .5 .3 0 0 .8 .6 .4 .2 0 0 0 0 .6 .4 .2 0 0 0 0 0 0 0 0 0 0 0 0 0                 90 95 100 105 110 115 120 125 Once we define the petite fuzzy relation, we can answer two kinds of questions: • What is the degree that a female with a specific height and a specific weight is considered to be petite? • What is the possibility that a petite person has a specific pair of height and weight measures? (fuzzy relation becomes a possibility distribution)
  • 170. Application: Fuzzy Relation Petite Given a two-dimensional fuzzy relation and the possible values of one variable, infer the possible values of the other variable using similar fuzzy composition as described earlier. Definition: Let X and Y be the universes of discourse for variables x and y, respectively, and xi and yj be elements of X and Y. Let R be a fuzzy relation that maps X x Y to [0,1] and the possibility distribution of X is known to be Px(xi). The compositional rule of inference infers the possibility distribution of Y as follows: max-min composition: max-product composition: PY(yj )  max xi (min(PX (xi),PR (xi,yj))) PY(yj )  max xi (PX (xi)  PR(xi,yj ))
  • 171. Application: Fuzzy Relation Petite Problem: We may wish to know the possible weight of a petite female who is about 5’4”. Assume About 5’4” is defined as About-5’4” = {0/5’, 0/5’1”, 0.4/5’2”, 0.8/5’3”, 1/5’4”, 0.8/5’5”, 0.4/5’6”} Using max-min compositional, we can find the weight possibility distribution of a petite person about 5’4” tall: Pweight (90)  (0 1) (0 1) (.4 1)  (.8 1) (1 .8) (.8 .6) (.4  0)  0.8 ˜P  5' 5'1" 5' 2" 5' 3" 5' 4" 5' 5" 5' 6" 1 1 1 1 1 1 .5 .2 1 1 1 1 1 .9 .3 .1 1 1 1 1 1 .7 .1 0 1 1 1 1 .5 .3 0 0 .8 .6 .4 .2 0 0 0 0 .6 .4 .2 0 0 0 0 0 0 0 0 0 0 0 0 0                 90 95 100 105 110 115 120 125 Similarly, we can compute the possibility degree for other weights. The final result is Pweight  {0.8/90,0.8/95,0.8/100,0.8/105,0.5/110,0.4/115, 0.1/120,0/125}
  • 172. Fuzzy Graphs • A fuzzy relation may not have a meaningful linguistic label. • Most fuzzy relations used in real-world applications do not represent a concept, rather they represent a functional mapping from a set of input variables to one or more output variables. • Fuzzy rules can be used to describe a fuzzy relation from the observed state variables to a control decision (using fuzzy graphs) • A fuzzy graph describes a functional mapping between a set of input linguistic variables and an output linguistic variable.
  • 173. Extension Principle • Provides a general procedure for extending crisp domains of mathematical expressions to fuzzy domains. • Generalizes a common point-to-point mapping of a function f(.) to a mapping between fuzzy sets. Suppose that f is a function from X to Y and A is a fuzzy set on X defined as A  A(x1)/(x1)  A(x2 )/(x2 ) ..... A(xn )/(xn ) Then the extension principle states that the image of fuzzy set A under the mapping f(.) can be expressed as a fuzzy set B, B  f(A)  A(x1)/(y1) A(x2 )/(y2 ) ..... A(xn )/(yn ) Where yi =f(xi), i=1,…,n. If f(.) is a many-to-one mapping then B(y)  max x f 1 (y) A (x)
  • 174. Extension Principle: Example Let A=0.1/-2+0.4/-1+0.8/0+0.9/1+0.3/2 and f(x) = x2-3 Upon applying the extension principle, we have B = 0.1/1+0.4/-2+0.8/-3+0.9/-2+0.3/1 = 0.8/-3+max(0.4, 0.9)/-2+max(0.1, 0.3)/1 = 0.8/-3+0.9/-2+0.3/1
  • 175. Extension Principle: Example Let A(x) = bell(x;1.5,2,0.5) and f(x) = { (x-1)2-1, if x >=0 x, if x <=0
  • 176. Extension Principle: Example Around-4 = 0.3/2 + 0.6/3 + 1/4 + 0.6/5 + 0.3/6 and Y = f(x) = x2 -6x +11
  • 177. Arithmetic Operations on Fuzzy Numbers Applying the extension principle to arithmetic operations, we have Fuzzy Addition: Fuzzy Subtraction: Fuzzy Multiplication: Fuzzy Division: AB(z)   x,y xyz A(x) B (y) AB(z)   x,y xyz A(x) B (y) AB(z)   x,y xyz A(x) B (y) A / B(z)  x,y x / yz A(x) B (y)
  • 178. Arithmetic Operations on Fuzzy Numbers Let A and B be two fuzzy integers defined as A = 0.3/1 + 0.6/2 + 1/3 + 0.7/4 + 0.2/5 B = 0.5/10 + 1/11 + 0.5/12 Then F(A+B) = 0.3/11+ 0.5/12 + 0.5/13 + 0.5/14 +0.2/15 + 0.3/12 + 0.6/13 + 1/14 + 0.7/15 + 0.2/16 + 0.3/13 + 0.5/14 + 0.5/15 + 0.5/16 +0.2/17 Get max of the duplicates, F(A+B) =0.3/11 + 0.5/12 + 0.6/13 + 1/14 + 0.7/15 +0.5/16 + 0.2/17
  • 179. Summary • A fuzzy relation is a multidimensional fuzzy set • A composition of two fuzzy relations is an important technique • A fuzzy graph is a fuzzy relation formed by pairs of Cartesian products of fuzzy sets • A fuzzy graph is the foundation of fuzzy mapping rules • The extension principle allows a fuzzy set to be mapped through a function • Addition, subtraction, multiplication, and division of fuzzy numbers are all defined based on the extension principle
  • 180. A peep into Fuzzy Control System
  • 181. DO we need FAT? • How do you make a machine smart? – Put some FAT in it! – A FAT enough machine can model any process – A FAT system can always turn inputs to outputs and turn causes to effects and turn questions to answer • FAT stands for “Fuzzy Approximation Theorem”
  • 182. CONVENTIONAL CONTROL • Closed-loop control takes account of actual output and compares this to desired output Measurement Desired Output + - Process Dynamics Controller/ Amplifier OutputInput • Open-loop control is ‘blind’ to actual output
  • 183. Digital Control System Configuration
  • 184. CONVENTIONAL CONTROL Example: design a cruise control system After gaining an intuitive understanding of the plant’s dynamics and establishing the design objectives, the control engineer typically solves the cruise control problem by doing the following: 1. Developing a model of the automobile dynamics (which may model vehicle and power train dynamics, tire and suspension dynamics, the effect of road grade variations, etc.). 2. Using the mathematical model, or a simplified version of it, to design a controller (e.g., via a linear model, develop a linear controller with techniques from classical control).
  • 185. CONVENTIONAL CONTROL 3. Using the mathematical model of the closed-loop system and mathematical or simulation-based analysis to study its performance (possibly leading to redesign). 4. Implementing the controller via, for example, a microprocessor, and evaluating the performance of the closed-loop system (again, possibly leading to redesign).
  • 186. CONVENTIONAL CONTROL Mathematical model of the plant: – never perfect – an abstraction of the real system – “is accurate enough to be able to design a controller that will work.”! – based on a system of differential equations
  • 187. Can you re-collect gradient descent procedures? Newton-Raphson method?
  • 188. Fuzzy Control Fuzzy control provides a formal methodology for representing, manipulating, and implementing a human’s heuristic knowledge about how to control a system.
  • 189. Fuzzy Systems How can fuzzy systems be used in a world where measurements and actions are expressed as crisp values?
  • 190. Fuzzy Systems Fuzzy Knowledge base Input Fuzzifier Inference Engine DefuzzifierOutput
  • 191. Fuzzy Systems (Cont.) 90 Degree F. It is too hot! Turn the fan on high Set the fan at 90% speed Input Fuzzifier Fuzzy System Defuzzifier output
  • 192. Fuzzy Control Systems Fuzzy Knowledge base Fuzzifier Inference Engine Defuzzifier Plant Output Input
  • 193. Fuzzy Logic Control • Fuzzy controller design consist of turning intuitions, and any other information about how to control a system, into set of rules. • These rules can then be applied to the system. • If the rules adequately control the system, the design work is done. • If the rules are inadequate, the way they fail provides information to change the rules.
  • 194. Components of Fuzzy system • The components of a conventional expert system and a fuzzy system are the same. • Fuzzy systems though contain `fuzzifiers’. – Fuzzifiers convert crisp numbers into fuzzy numbers, • Fuzzy systems contain `defuzzifiers', – Defuzzifiers convert fuzzy numbers into crisp numbers.
  • 195. Conventional vs Fuzzy system Components of a ... conventional expert fuzzy system system knowledge model physical device precise value physical device fuzzy model value fuzzy value fuzzy precise value precise precise value value fuzzifier defuzzifier
  • 196. In order to process the input to get the output reasoning there are six steps involved in the creation of a rule based fuzzy system: 1. Identify the inputs and their ranges and name them. 2. Identify the outputs and their ranges and name them. 3. Create the degree of fuzzy membership function for each input and output. 4. Construct the rule base that the system will operate under 5. Decide how the action will be executed by assigning strengths to the rules 6. Combine the rules and defuzzify the output
  • 197. Fuzzy Logic Control Type of Fuzzy Controllers: • Mamdani • Larsen • TSK (Takagi Sugeno Kang) • Tsukamoto • Other methods
  • 199. Mamdani Fuzzy models • The most commonly used fuzzy inference technique is the so-called Mamdani method. • In 1975, Professor Ebrahim Mamdani of London University built one of the first fuzzy systems to control a steam engine and boiler combination.  Original Goal: Control a steam engine & boiler combination by a set of linguistic control rules obtained from experienced human operators.
  • 200. Mamdani fuzzy inference The Mamdani-style fuzzy inference process is performed in four steps: 1. Fuzzification of the input variables, 2. Rule evaluation; 3. Aggregation of the rule outputs, and finally 4. Defuzzification.
  • 201. Operation of Fuzzy System Crisp Input Fuzzy Input Fuzzy Output Crisp Output Fuzzification Rule Evaluation Defuzzification Input Membership Functions Rules / Inferences Output Membership Functions
  • 202. Knowledge as Rules is the basis of FAT • Every term in one of our rules is Fuzzy • Every term is vague, hazy, inexact, sloppy
  • 203. FAT (cont.) • Fuzzy rule relates fuzzy sets – If X is A, then Y is B • A and B are fuzzy sets and subset of X and Y
  • 204. Building Knowledge base System • 3 Steps – Pick the nouns or variables • Example: X be input and Y be output – Let x be temperature and Y be change in motor speed • Cause, effect. Stimulus, response! – Pick the fuzzy sets • Define fuzzy subsets of the nouns X and Y – Pick the fuzzy rules • Associate output to the input
  • 205. Inference Engine Basil Hamed Fuzzy Knowledge base Fuzzy Knowledge base Input Fuzzifier Inference Engine Defuzzifier OutputInput Fuzzifier Inference Engine Defuzzifier Output Using If-Then type fuzzy rules converts the fuzzy input to the fuzzy output.
  • 206. Fuzzy Associative Memory • Which rule “fires” or activates at which time? – They all fire all the time – They fire in parallel • All rules fire to some degree • Most fire to zero degree – The result is a fuzzy weighted average
  • 207. Additive Fuzzy System • Stores m fuzzy rules of the form – “If X = Aj then Y = Bj,” then computes the output by defuzzifiy the summed (MAXed) of the partially fired then-part fuzzy sets B’j
  • 208. We examine a simple two-input one-output problem that includes three rules: Rule: 1 Rule: 1 IF x is A3 IF project_funding is adequate OR y is B1 OR project_staffing is small THEN z is C1 THEN risk is low Rule: 2 Rule: 2 IF x is A2 IF project_funding is marginal AND y is B2 AND project_staffing is large THEN z is C2 THEN risk is normal Rule: 3 Rule: 3 IF x is A1 IF project_funding is inadequate THEN z is C3 THEN risk is high
  • 209. Step 1: Fuzzification ■ Take the crisp inputs, x1 and y1 (project funding and project staffing) ■ Determine the degree to which these inputs belong to each of the appropriate fuzzy sets. Crisp Input y1 0.1 0.7 1 0 y1 B1 B2 Y Crisp Input 0.2 0.5 1 0 A1 A2 A3 x1 x1 X (x = A1) = 0.5 (x = A2) = 0.2 (y = B1) = 0.1 (y = B2) = 0.7
  • 210. Fuzzification • Process of making a crisp quantity fuzzy • Vector representation can be viewed as either a discrete or an approximation of a continuous set ( use linear interpolation] Crisp input Fuzzy Grade
  • 211. Example: Fuzzification • Define fuzzy set “near 5” – S = [ 0:10]; – G = [0.0 0.1 0.3 0.5 0.8 1 0.8 0.5 0.3 0.1 0]; 0 0.2 0.4 0.6 0.8 1 0 1 2 3 4 5 6 7 8 9 10 Near 5 0.5 0.9
  • 212. • Recommend designer to adopt the following design principles: – Each Membership function overlaps only with the closest neighboring membership functions; – For any possible input data, its membership values in all relevant fuzzy sets should sum to 1 (or nearly) Some Hints while designing Membership Functions in practice.
  • 213. Designing Antecedent Membership Functions A Membership Function Design that violates the second principle
  • 214. Designing Antecedent Membership Functions A Membership Function Design that violates both principle
  • 215. Designing Antecedent Membership Functions A symmetric Function Design Following the guidelines
  • 216. Some Hints while designing Membership Functions in practice. An asymmetric Function Design Following the guidelines
  • 217. Step 2: Rule Evaluation • take the fuzzified inputs, (x=A1) = 0.5, (x=A2) = 0.2, (y=B1) = 0.1 and (y=B2) = 0.7 • apply them to the antecedents of the fuzzy rules. • If a given fuzzy rule has multiple antecedents, the fuzzy operator (AND or OR) is used to obtain a single number that represents the result of the antecedent evaluation. This number (the truth value) is then applied to the consequent membership function.
  • 218. Step 2: Rule Evaluation To evaluate the disjunction of the rule antecedents, we use the OR fuzzy operation. Typically, fuzzy expert systems make use of the classical fuzzy operation union: AB(x) = max [A(x), B(x)] Similarly, in order to evaluate the conjunction of the rule antecedents, we apply the AND fuzzy operation intersection: AB(x) = min [A(x), B(x)]
  • 219. Mamdani-style rule evaluation A3 1 0 X 1 y10 Y 0.0 x1 0 0.1 C1 1 C2 Z 1 0 X 0.2 0 0.2 C1 1 C2 Z A2 x1 Rule 3: A1 1 0 X 0 1 Zx1 THEN C1 C2 1 y1 B2 0 Y 0.7 B1 0.1 C3 C3 C30.5 0.5 OR (max) AND (min) OR THENRule 1: AND THENRule 2: IF x is A3 (0.0) y is B1 (0.1) z is C1 (0.1) IF x is A2 (0.2) y is B2 (0.7) z is C2 (0.2) IF x is A1 (0.5) z is C3 (0.5)
  • 220. • Now the result of the antecedent evaluation can be applied to the membership function of the consequent. • The most common method is to cut the consequent membership function at the level of the antecedent truth. • This method is called clipping (Max-Min Composition) . • The clipped fuzzy set loses some information. • Clipping is still often preferred because: • it involves less complex and faster mathematics • it generates an aggregated output surface that is easier to defuzzify.
  • 221.  While clipping is a frequently used method, scaling (Max-Product Composition) offers a better approach for preserving the original shape of the fuzzy set.  The original membership function of the rule consequent is adjusted by multiplying all its membership degrees by the truth value of the rule antecedent.  This method, which generally loses less information, can be very useful in fuzzy expert systems.
  • 222. Clipped and scaled membership functions Degree of Membership 1.0 0.0 0.2 Z Degree of Membership Z C2 1.0 0.0 0.2 C2 Max-Product CompositionMax-Min Composition
  • 223. Graphical Technique of Mamdani (Max-Min] Inference • If x1 k is A1 k and x2 k is A2 k Then Yk is Bk
  • 224. Graphical Technique of Max-Product Inference • If x1 k is A1 k and x2 k is A2 k Then Yk is Bk
  • 225. Step 3: Aggregation of The Rule Outputs • Aggregation is the process of unification of the outputs of all rules. • We take the membership functions of all rule consequents previously clipped or scaled and combine them into a single fuzzy set.
  • 226. Aggregation of the rule outputs 0 0.1 1 C1 Cz is 1 (0.1) C2 0 0.2 1 Cz is 2 (0.2) 0 0.5 1 Cz is 3 (0.5) ZZZ 0.2 Z0  C3 0.5 0.1
  • 227. Step 4: Defuzzification • Fuzziness helps us to evaluate the rules, but the final output of a fuzzy system has to be a crisp number. • The input for the defuzzification process is the aggregated output fuzzy set and the output is a single number.
  • 228.  There are several defuzzification methods, but probably the most popular one is the centroid technique.  It finds the point where a vertical line would slice the aggregate set into two equal masses. Mathematically this centre of gravity (COG) can be expressed as:         b a A b a A dxx dxxx COG
  • 229.  Centroid defuzzification method finds a point representing the centre of gravity of the fuzzy set, A, on the interval, ab.  A reasonable estimate can be obtained by calculating it over a sample of points. (x) 1.0 0.0 0.2 0.4 0.6 0.8 160 170 180 190 200 a b 210 A 150 X
  • 230. Centre of gravity (COG): 4.67 5.05.05.05.02.02.02.02.01.01.01.0 5.0)100908070(2.0)60504030(1.0)20100(    COG 1.0 0.0 0.2 0.4 0.6 0.8 0 20 30 40 5010 70 80 90 10060 Z Degree of Membership 67.4
  • 232. Defuzzification (Cont.) • Centroid Method: the most prevalent and physically appealing of all the defuzzification methods [Sugeno, 1985; Lee, 1990] – Often called • Center of area • Center of gravity
  • 233. Defuzzification (Cont.) • Max-membership principal – Also known as height method
  • 234. Defuzzification (Cont.) • Weighted average method – Valid for symmetrical output membership functions Formed by weighting each functions in the output by its respective maximum membership value
  • 235. Defuzzification (Cont.) • Mean-max membership (middle of maxima) – Maximum membership is a plateau Z* = a + b 2
  • 236. Defuzzification (Cont.) • Center of Largest area – If the output fuzzy set has at least two convex sub- region, defuzzify the largest area using centroid
  • 237. Defuzzification (Cont.) • First (or last) of maxima – Determine the smallest value of the domain with maximized membership degree
  • 239. A simple Fuzzy Control system. • Example: Speed Control • How fast am I going to drive today? • It depends on the weather.
  • 240. Inputs: Temperature • Temp: {Freezing, Cool, Warm, Hot} 50 70 90 1103010 Temp. (F°) Freezing Cool Warm Hot 0 1
  • 241. Inputs: Temperature, Cloud Cover • Temp: {Freezing, Cool, Warm, Hot} • Cover: {Sunny, Partly, Overcast} 50 70 90 1103010 Temp. (F°) Freezing Cool Warm Hot 0 1 40 60 80 100200 Cloud Cover (%) OvercastPartly CloudySunny 0 1
  • 242. Output: Speed • Speed: {Slow, Fast} 50 75 100250 Speed (mph) Slow Fast 0 1
  • 243. 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...
  • 244. Example Speed Calculation • How fast will I go if it is – 65 F° – 25 % Cloud Cover ?
  • 245. Fuzzification: Calculate Input Membership Levels • 65 F°  Cool = 0.4, Warm= 0.7 50 70 90 1103010 Temp. (F°) Freezing Cool Warm Hot 0 1
  • 246. Fuzzification: Calculate Input Membership Levels • 65 F°  Cool = 0.4, Warm= 0.7 • 25% Cover Sunny = 0.8, Cloudy = 0.2 50 70 90 1103010 Temp. (F°) Freezing Cool Warm Hot 0 1 40 60 80 100200 Cloud Cover (%) OvercastPartly CloudySunny 0 1
  • 247. ...Calculating... • If it's Sunny and Warm, drive Fast Sunny(Cover)Warm(Temp)Fast(Speed) 0.8  0.7 = 0.7  Fast = 0.7 • If it's Cloudy and Cool, drive Slow Cloudy(Cover)Cool(Temp)Slow(Speed) 0.2  0.4 = 0.2  Slow = 0.2
  • 248. Defuzzification: Constructing the Output • Speed is 20% Slow and 70% Fast • Find centroids: Location where membership is 100% 50 75 100250 Speed (mph) Slow Fast 0 1
  • 249. Defuzzification: Constructing the Output • Speed is 20% Slow and 70% Fast • Find centroids: Location where membership is 100% 50 75 100250 Speed (mph) Slow Fast 0 1
  • 250. Defuzzification: Constructing the Output • Speed is 20% Slow and 70% Fast • Speed = weighted mean = (2*25+... 50 75 100250 Speed (mph) Slow Fast 0 1
  • 251. Defuzzification: Constructing the Output • Speed is 20% Slow and 70% Fast • Speed = weighted mean = (2*25+7*75)/(9) = 63.8 mph 50 75 100250 Speed (mph) Slow Fast 0 1
  • 252. Notes: Follow-up Points • 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
  • 253. Notes: Drawbacks to Fuzzy logic • Requires tuning of membership functions • Fuzzy Logic control may not scale well to large or complex problems • Deals with imprecision, and vagueness, but not uncertainty
  • 255. Example: Build a Fuzzy System • Design motor speed controller for air conditioner – Step 1: assign input and output variables • Let X be temperature in Fahrenheit • Let Y be the change in motor speed of the air conditioner
  • 256. Example: Build a Fuzzy System • Design motor speed controller for air conditioner – Step 2: Pick fuzzy sets • Define subsets of the noun X and Y – Say 5 fuzzy sets on X » Cold, Cool, Just Right, Warm, and Hot – Say 5 fuzzy sets on Y » Stop, Slow, Medium, Fast, and Blast
  • 257. Example: Build a Fuzzy System • Input Fuzzy set
  • 258. Example: Build a Fuzzy System • Output Fuzzy set
  • 259. Example: Build a Fuzzy System • Design motor speed controller for air conditioner – Step 3: Assign a motor speed set to each temperature set
  • 260. Example: Build a Fuzzy System • Rules – If temperature is cold then motor speed stop – If temperature is cool then motor speed slows – If temperature is just right then motor speed is medium – If temperature is warm then motor speed is fast – If temperature is hot then motor speed blasts
  • 261. Example: Build a Fuzzy System • Fuzzy Relation
  • 262. Example: Build a Fuzzy System • Fuzzy system with 5 patches
  • 263. Example: temp. = 65 degree F. If temperature is just right then motor speed is medium
  • 264. Example: temp. = 63 degree F. – If temperature is cool then motor speed slows – If temperature is just right then motor speed is medium
  • 265. Example: t = 63 degree F. (Cont.)
  • 266. Example: t = 63 degree F. (Cont.) • Summed (MAXed) of the partially fired then- part fuzzy sets OR OUTPUT
  • 267. Example: t = 63 degree F. (Cont.) • Defuzzify to find the output motor speed
  • 268. Defuzzification • Convert fuzzy grade to Crisp output
  • 269. Example: Defuzzification • Find an estimate crisp output from the following 3 membership functions
  • 273. Example: Defuzzification • Center of largest area – Same as the centroid method because the complete output fuzzy set is convex
  • 274. Example: Defuzzification • First and Last of maxima
  • 275. Defuzzification • Of the seven defuzzification methods presented, which is the best? – It is context or problem-dependent
  • 276. Defuzzification: Criteria • Hellendoorn and Thomas specified 5 criteria against which to measure the methods – #1 Continuity • Small change in the input should not produce the large change in the output – #2 Disambiguity • Defuzzification method should always result in a unique value, I.e. no ambiguity – Not satisfied by the center of largest area!
  • 277. Defuzzification: Criteria (Cpnt.) • Hellendoorn and Thomas specified 5 criteria against which to measure the methods – #3 Plausibility • Z* should lie approximately in the middle of the support region and have high degree of membership – #4 Computational simplicity • Centroid and center of sum required complex computation! – #5 Constitutes the difference between centroid, weighted average and center of sum • Problem-dependent, keep computation simplicity
  • 279. Example: Furnace Temperature Control • Inputs – Temperature reading from sensor – Furnace Setting • Output – Power control to motor
  • 280. MATLAB: Create membership functions - Temp
  • 281. MATLAB: Create membership functions - Setting
  • 282. MATLAB: Create membership functions - Power
  • 283. If - then - Rules Fuzzy Rules for Furnace control Setting Temp Low Medium High Cold Low Medium High Cool Low Medium High Moderate Low Low Low Warm Low Low Low Hot low Low Low
  • 285. Antecedent Table • MATLAB – A = table(1:5,1:3); • Table generates matrix represents a table of all possible combinations
  • 287. Evaluating Rules with Function FRULE
  • 288. Design Guideline (Inference) • Recommend —Max-Min (Clipping) Inference method be used together with the MAX aggregation operator and the MIN AND method —Max-Product (Scaling) Inference method be used together with the SUM aggregation operator and the PRODUCT AND method
  • 289. Example: Fully Automatic Washing Machine
  • 290. Example: Fully Automatic Washing Machine • Inputs —Laundry Softness —Laundry Quantity • Outputs —Washing Cycle —Washing Time
  • 293. Example: Fuzzy Rules for Washing Cycle Quantity Softness Small Medium Large Soft Delicate Light Normal Normal Soft Light Normal Normal Normal Hard Light Normal Strong Hard Light Normal Strong
  • 294. Example: Control Surface View (Clipping)
  • 295. Example: Control Surface View (Scaling)
  • 296. Example: Control Surface View ScalingClipping
  • 297. Example: Rule View (Clipping)
  • 298. Example: Rule View (Scaling)
  • 300. Building a Fuzzy Expert System: Case Study  A service centre keeps spare parts and repairs failed ones.  A customer brings a failed item and receives a spare of the same type.  Failed parts are repaired, placed on the shelf, and thus become spares.  The objective here is to advise a manager of the service centre on certain decision policies to keep the customers satisfied.
  • 301. Process of Developing a Fuzzy Expert System 1. Specify the problem and define linguistic variables. 2. Determine fuzzy sets. 3. Elicit and construct fuzzy rules. 4. Encode the fuzzy sets, fuzzy rules and procedures to perform fuzzy inference into the expert system. 5. Evaluate and tune the system.
  • 302. There are four main linguistic variables: average waiting time (mean delay) m, repair utilization factor of the service centre  (is the ratio of the customer arrival day to the customer departure rate) number of servers s, and initial number of spare parts n . Step 1: Specify the problem and define linguistic variables
  • 303. Linguistic variables and their ranges Linguistic Value Notation Numerical Range (normalised) Very Short Short Medium VS S M [0, 0.3] [0.1, 0.5] [0.4, 0.7] Linguistic Value Notation Notation Numerical Range (normalised) Small Medium Large S M L [0, 0.35] [0.30, 0.70] [0.60, 1] Linguistic Value Numerical Range Low Medium High L M H [0, 0.6] [0.4, 0.8] [0.6, 1] Linguistic Value Notation Numerical Range (normalised) Very Small Small Rather Small Medium Rather Large Large Very Large VS S RS M RL L VL [0, 0.30] [0, 0.40] [0.25, 0.45] [0.30, 0.70] [0.55, 0.75] [0.60, 1] [0.70, 1] Linguistic Variable: Mean Delay, m Linguistic Variable: Number of Servers, s Linguistic Variable: Repair Utilisation Factor,  Linguistic Variable: Number of Spares, n
  • 304. Step 2: Determine Fuzzy Sets Fuzzy sets can have a variety of shapes. However, a triangle or a trapezoid can often provide an adequate representation of the expert knowledge, and at the same time, significantly simplifies the process of computation.
  • 305. Fuzzy sets of Mean Delay m 0.10 1.0 0.0 0.2 0.4 0.6 0.8 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Mean Delay (normalised) SVS M Degree of Membership
  • 306. Fuzzy sets of Number of Servers s 0.10 1.0 0.0 0.2 0.4 0.6 0.8 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 M LS Degree of Membership
  • 307. Fuzzy sets of Repair Utilisation Factor  0.10 1.0 0.0 0.2 0.4 0.6 0.8 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Repair Utilisation Factor M HL Degree of Membership
  • 308. Fuzzy sets of Number of Spares n 0.10 1.0 0.0 0.2 0.4 0.6 0.8 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 S RSVS M RL L VL Degree of Membership Number of Spares (normalised)
  • 309. Step 3: Elicit and construct fuzzy rules To accomplish this task, we might ask the expert to describe how the problem can be solved using the fuzzy linguistic variables defined previously. Required knowledge also can be collected from other sources such as books, computer databases, flow diagrams and observed human behavior. The matrix form of representing fuzzy rules is called fuzzy associative memory (FAM).
  • 311. The rule table Rule m s  n Rule m s  n Rule m s  n 1 VS S L VS 10 VS S M S 19 VS S H VL 2 S S L VS 11 S S M VS 20 S S S 3 M S L VS 12 M S M VS 21 M S 4 VS M L VS 13 VS M M RS 22 VS M H M M M M 5 S M L VS 14 S M M S 23 S M 6 M M L VS 15 M M M VS 24 M M 7 VS L L S 16 VS L M M 25 VS L H H H H H H RL 8 S L L L S 17 S L M RS 26 S L 9 M L L VS 18 M L M S 27 M L H RS
  • 312. Rule Base 1 1. If (utilisation_factor is L) then (number_ of_spares is S) 2. If (utilisation_factor is M) then (number_of_spares is M) 3. If (utilisation_factor is H) then (number_of_spares is L) 4. If (mean_delay is VS) and (number_of_servers is S) then (number_of_spares is VL) 5. If (mean_delay is S) and (number_of_servers is S) then (number_of_spares is L) 6. If (mean_delay is M) and (number_of_servers is S) then (number_of_spares is M) 7. If (mean_delay is VS) and (number_of_servers is M) then (number_of_spares is RL) 8. If (mean_delay is S) and (number_of_servers is M) then (number_of_spares is RS) 9. If (mean_delay is M) and (number_of_servers is M) then (number_of_spares is S) 10. If (mean_delay is VS) and (number_of_servers is L) then ( number_of_spares is M) 11. If (mean_delay is S) and (number_of_servers is L) then ( number_of_spares is S) 12. If (mean_delay is M) and (number_of_servers is L) then ( number_of_spares is VS)
  • 313. Cube FAM of Rule Base 2 VS VS VS VS VS VS VS VS VS VL L M HS VS VS VS VS VS VS VS VS VSM VS VS VS VS VS VS S S VSL s L VS S M m M H  VS VS VS L VS S M S m VS VS VSM S S VSL s S VS VS M VS S M m VS S M m S RS S VSM M RS SL s S M M SM RL M RSL s
  • 314. Step 4: Encode the fuzzy sets, fuzzy rules and procedures to perform fuzzy inference into the expert system To accomplish this task, we may choose one of two options: to build our system using a programming language such as C/C++, Java, or to apply a fuzzy logic development tool such as MATLAB Fuzzy Logic Toolbox or Fuzzy Knowledge Builder.
  • 315. Step 5: Evaluate and Tune the System The last task is to evaluate and tune the system. We want to see whether our fuzzy system meets the requirements specified at the beginning. Several test situations depend on the mean delay, number of servers and repair utilisation factor. The Fuzzy Logic Toolbox can generate surface to help us analyse the system’s performance. 317
  • 316. However, even now, the expert might not be satisfied with the system performance. To improve the system performance, we may use additional sets  Rather Small and Rather Large  on the universe of discourse Number of Servers, and then extend the rule base.
  • 317. Modified Fuzzy Sets of Number of Servers s 0.10 1.0 0.0 0.2 0.4 0.6 0.8 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Number of Servers (normalised) RS M RL LS Degree of Membership
  • 318. Cube FAM of Rule Base 3 VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS VS S S VS S S VS VL L M VL RL RS M M S RL M RS L M RS HS M RL L RS s L VS S M m M H  VS VS VS VS VS VS VS VS VS S S VS S S VS L VS S M S M RL L RS m s S VS VS S VS VS RS S VS M RS S M RS S M VS S M m VS S M m S M RL L RS s S M RL L RS s
  • 320. Input Fuzzy Sets • Angle:- -30 to 30 degrees
  • 321. Output Fuzzy Sets • Car velocity:- -2.0 to 2.0 meters per second
  • 322. Fuzzy Rules • If Angle is Zero then output ? • If Angle is SP then output ? • If Angle is SN then output ? • If Angle is LP then output ? • If Angle is LN then output ?
  • 324. Extended System • Make use of additional information – angular velocity:- -5.0 to 5.0 degrees/ second • Gives better control
  • 325. New Fuzzy Rules • Make use of old Fuzzy rules for angular velocity Zero • If Angle is Zero and Angular vel is Zero – then output Zero velocity • If Angle is SP and Angular vel is Zero – then output SN velocity • If Angle is SN and Angular vel is Zero – then output SP velocity
  • 327. Complete Table • When angular velocity is opposite to the angle do nothing – System can correct itself • If Angle is SP and Angular velocity is SN – then output ZE velocity • etc
  • 328. Example • Inputs:10 degrees, -3.5 degrees/sec • Fuzzified Values • Inference Rules • Output Fuzzy Sets • Defuzzified Values
  • 329. Internet resources used. • www.csee.wvu.edu • www.surrey.ac.uk • http://www.cs.tamu.edu/research/CFL/fuzzy. html • L. Zadah, “Fuzzy sets as a basis of possibility” Fuzzy Sets Systems, Vol. 1, pp3-28, 1978. • T. J. Ross, “Fuzzy Logic with Engineering Applications”, McGraw-Hill, 1995. • K. M. Passino, S. Yurkovich, "Fuzzy Control" Addison