0% found this document useful (0 votes)
28 views

Fuzzy Expert System: Fuzzy Logic: Faculty of Electrical & Electronics Engineering University Malaysia Pahang

Uploaded by

Arron Yew
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Fuzzy Expert System: Fuzzy Logic: Faculty of Electrical & Electronics Engineering University Malaysia Pahang

Uploaded by

Arron Yew
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 89

FUZZY EXPERT SYSTEM :

FUZZY LOGIC

FACULTY OF ELECTRICAL & ELECTRONICS ENGINEERING


UNIVERSITY MALAYSIA PAHANG
3.1 Overview of Fuzzy Concepts
and Fuzzy Logic Systems
3.2 Definition of Fuzzy Sets

LO1 : Able to understand basic concept of


fuzzy sets which is the basis of fuzzy logic
system

Achievements : CO2
o Introduction, or what is fuzzy thinking?
o Fuzzy sets
o Linguistic variables and hedges
o Operations of fuzzy sets
o Fuzzy rules
o Summary
 Experts rely on common sense when they
solve problems
 How can we represent expert knowledge that
uses vague and ambiguous terms in a
computer?
 Fuzzy logic is not logic that is fuzzy, but logic
that is used to describe fuzziness.
 Fuzzy logic is based on the idea that all
things admit of degrees.
 Fuzzy logic is the theory of fuzzy sets, sets
that calibrate vagueness.
Bicycle tyre pressure : IC supply voltage :
Expert knows how to Expert knows a
measure and human Existence of considerable average
may understand on Degree or of voltage stability and
when to re-pump the range to be supplied,
pressure. But how Level but can system or
about computer software define
interpretation? properly as we expect?
Degree of
confidence,
multi-
valued,
humanistic
Range of
Vagueness logic
Classic
logic

0 01 0 1 1 0 0 0.2 0.4 0.6 0.8 1 1


(a) Boolean Logic. (b) Multi-valued Logic.
 What do you understand about ‘Fuzzy’ word?

 Give ONE example of any system using Fuzzy


Logic control?

 Put in Padlet Page link given.


 A set of mathematical principles for
knowledge representation based on degree of
membership rather than on crisp membership
of classical binary logic.[Lotfi Zadeh, 1965]

• Technology proposed to move from


probability theory to mathematical logic.
• Fuzzy sets : a set with fuzzy boundaries.
http://www.control-systems-
principles.co.uk/whitepapers
/fuzzy-logic-systems.pdf
Sanjaa, B., Tsoozol, P.,
Fuzzy and Probability,
International Forum
on Strategic Technology,
2007. IFOST 2007, pp 141 –
143, 2007
 The concept of a set is fundamental to
mathematics

 The classical example in fuzzy sets is tall


men. The element of the fuzzy set ‘tall men’
are all men, but their degree of membership
(membership value) depend on their height
◦ The x-axis represents the universe of discourse –
the range of all possible values applicable to a
chosen variable. In this case, the variable is the man
height.

◦ The y-axis represents the membership value of the


fuzzy set. In this case, the fuzzy set of ‘tall men’
maps height values into corresponding membership
values.
 Let X be the universe of discourse and its
elements be denoted as x. In the classical set
theory, crisp set A of X is defined as
function fA(x) called the characteristic
function of A
1, if x  A
fA(x): X ® {0, 1}, where f A ( x) = 
0, if x  A
 In the fuzzy theory, fuzzy set A of universe X
is defined by function mA(x) called the
membership function of set A

mA(x): X → [0, 1],

where mA(x) = 1 if x is totally in A;


mA (x) = 0 if x is not in A;
0 < mA (x) < 1 if x is partly in A.
 First, we determine the membership
functions. In our ‘tall men’ example, we can
obtain fuzzy sets of tall, short and average
men.
 The universe of discourse (the men’s height)
consists of three sets :short, average and tall
men.
 As you will see, a man who is 184cm tall is a
member of the average men set with a degree
of membership of 0.1 and at the same time
he is also a member of the tall men set with a
degree of 0.4
Crisp and fuzzy sets of short,
average and tall men
Degreeof CrispSets
Membership
1.0
0.8 Short Average Tall

0.6
0.4
0.2

0.0
150 160 170 180 190 200 210
Height, cm
Degreeof Fuzzy Sets
Membership
1.0

0.8
0.6 Short Average Tall

0.4
0.2

0.0
150 160 170 180 190 200 210
A B

Fuzzy set
Crisp set
Crisp set Fuzzy set
fA(x): X ® {0, 1}, where mA(x): X → [0, 1], where mA(x) = 1 if x is
totally in A;
1, if x  A mA (x) = 0 if x is not in A;
f A ( x) = 
0, if x  A 0 < mA (x) < 1 if x is partly in A.
A = { (x1, μA(x1)), (x2, μA(x2)),…., (xn, μA(xn)) }

Membership association

A = { μA(x1)/x1), μA(x2)/x2), …., μA(xn)/xn)}


Tall men = (0/180, 0.5/185,1/190)

Short men = (1/160, 0.5/165, 0/170)


 To represent a continous fuzzy set in a
computer, we need to express it a function
then map the elements of the set to their
degree of membership. (sigmoid, gaussian
and pi)
 But, they also increase the time of
computation, therefore we use linear fit
functions.
Tall men = (0/180, 0.5/185,1/190)
Tall men = (0/180, 1/190)

Short men = (1/160, 0.5/165, 0/170)


Short men = (1/160, 0/170)
3.1 Overview of Fuzzy Concepts
and Fuzzy Logic Systems
3.2 Definition of Fuzzy Sets

LO1 : Able to understand basic concept of


fuzzy sets which is the basis of fuzzy logic
system

Achievements : CO2
3.3 Fuzzy Set Operations

LO1 : Able to execute fuzzy sets using the


common fuzzy operations
LO2 : Able to understand and determine the
purpose of fuzzy relations
Achievements : CO2
 IF sun is shining, THEN temperature is hot.
 IF people is happy, THEN society is at peace.

 IF stomach is full, THEN ?


Linguistic variable→fuzzy variable
• Linguistic variable has hedges
– Hedges
• Act as fuzzy set qualifiers
• Expression on adverbs ; little, few, most, extreme, some
• Reflects human thinking
• Creates sets of individual operation; dilation(expansion),
concentration
• Continuum→fuzzy intervals; from tall, average, short to slightly tall,
tall, moderately tall etc.
Degreeof
Membership
1.0
Short Short
Tall
0.8
0.6 Average

0.4
Very Short Very
VeryTall
Tall
Tall
0.2

0.0
150 160 170 180 190 200 210
Height, cm
Hedges in fuzzy logic
Hedge Mathematical Graphical Representation
Expression

A little [ mA( x)] 1.3

Slightly [ mA(x)] 1.7

Very [ mA (x)] 2

Extremely [ mA(x) ] 3
Hedges in fuzzy logic (cont’d)
Mathematical
Hedge Graphical Representation
Expression

Very very [mA (x)]4

More or less mA (x)

Somewhat mA (x)

2 [mA (x )]2
if 0 m A  0.5
Indeed
1 − 2 [1 −m A ( x)]2
if 0.5 < mA  1
Operations 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.

Not A
B

A AA

Complement Containment

A B AA B

Intersection Union
◼ 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.
Tall men : (0/180, 0.25/182.5, 0.5/185, 0.75/187.5, 1/190)
For example, if we have the set of tall men, its
NOT Tall men : (1/180, 0.75/182.5, 0.5/185, 0.25/187.5, 0/190)
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:

mA(x) = 1 − mA(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 mentall men is
: (0/180, 0.25/182.5, of tall men
a subset 0.5/185, 0.75/187.5, 1/190)
. However, the
Very
talltall
menmenset
: (0/180,
is just0.1/182.5,
a subset0.4/185, 0.3/187.5,
of the set of men1/190)
. 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
Tall men : (0/180, 0.25/182.5, 0.5/185, 0.75/187.5, 1/190)
these sets overlap. In fuzzy sets, an element may partly
Very tall men : (0/180, 0.1/182.5, 0.4/185, 0.3/187.5, 1/190)
belong to both sets with different memberships. A fuzzy
So, mA∩B(x) = (0/180, 0.1/182.5, 0.4/185, 0.3/187.5, 1/190)
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:
mA∩B(x) = min [mA (x), mB (x)] = mA (x) ∩ mB(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 men
Tall fat. :In fuzzy0.25/182.5,
(0/180, sets, the union is 0.75/187.5,
0.5/185, the reverse1/190)
of the
Very tall men : (0/180,
intersection. 0.1/182.5,
That is, 0.4/185,
the union is the0.3/187.5,
largest 1/190)
So, mAUB(x) = (0/180,
membership value0.25/182.5, 0.5/185,
of the element in 0.75/187.5,
either set. 1/190)
The
fuzzy operation for forming the union of two fuzzy
sets A and B on universe X can be given as:

mAUB(x) = max [mA (x), mB(x)] = mA (x) U mB(x),


where x ϵ X
Operations of fuzzy sets
m ( x) m ( x)
B
1 1 A
A
0 0
x x
B
1 1 A
Not A
0 0
Complement x Containment x

m ( x) m ( x)
1 1
AB AB
0 0
x x
1 AB 1
AB
0 0
x x
Intersection Union
 Commutavity - A U B = B U A
 Associativity
 A U (B U C) = (A U B) U C
 A ∩ (B ∩ C) = (A ∩ B) ∩ C

 Distributivity
 A U (B ∩ C) = (A U B) ∩ ( A U C)
 A ∩ (B U C) = (A ∩ B) U ( A ∩ C)

 Idempotency
 Identity
 Involution
 Transitivity
3.4 Fuzzy Relation
3.5 Fuzzy Inference

LO1 : Able to execute fuzzy sets using the common fuzzy operations
LO2 : Able to understand and determine the purpose of fuzzy relations
LO3 : Able to understand how inference process is done in fuzzy
implication
LO4 : Able to understand how to design a fuzzy logic controller
LO5 : Able to understand how inference process is done in a fuzzy logic
controller

Achievements : CO2
Fuzzy rules
In 1973, Lotfi Zadeh published his second most
influential paper.

This paper outlined a new approach to analysis of


complex systems, in which Zadeh suggested capturing
human knowledge in fuzzy rules.
What is a fuzzy rule?

A fuzzy rule can be defined as a conditional


statement in the form:

IF x is A
THEN y is B

where x and y are linguistic variables; and A and B


are linguistic values determined by fuzzy sets on the
universe of discourses X and Y, respectively.
What is the difference between
classical and fuzzy rules?
A classical IF-THEN rule uses binary logic,
for example,

Rule: 1 Rule: 2
IF speed is > 100 IF speed is < 40
THEN stopping_distance is long THEN stopping_distance is short

The variable speed can have any numerical value between 0 and
220 km/h, but the linguistic variable stopping_distance can take
either value long or short.

In other words, classical rules are expressed in the


black-and-white language of Boolean logic.
We can also represent the stopping distance
rules in a fuzzy form:

Rule 1 : Rule 2 :
IF speed is fast IF speed is slow
THEN stopping_distance is long THEN stopping_distance is short

In fuzzy rules, the linguistic variable speed also has


the range (the universe of discourse) between 0 and
220 km/h, but this range includes fuzzy sets, such as
slow, medium and fast. The universe of discourse of
the linguistic variable stopping_distance can be
between 0 and 300 m and may include such fuzzy
sets as short, medium and long.
◼ Fuzzy rules relate fuzzy sets.
◼ In a fuzzy system, all rules fire to some
extent, or in other words they fire partially. If
the antecedent is true to some degree of
membership, then the consequent is also true
to that same degree.
Fuzzy sets of tall and heavy men
Degree of Degree of
Membership Membership
1.0 1.0
Tall men Heavy men
0.8 0.8
0.6 0.6

0.4 0.4
0.2 0.2
0.0 0.0
160 180 190 200 70 80 100 120
Height, cm Weight, kg

These fuzzy sets provide the basis for a weight


Estimation model. The model is based on a
relationship between a man’s height and his weight:
IF height is tall
THEN weight is heavy
The value of the output or a truth membership
grade of the rule consequent can be estimated
directly from a corresponding truth membership
grade in the antecedent. This form of fuzzy
inference uses a method called monotonic selection.
Degree of Degree of
Membership Membership
1.0 1.0
Tall men
0.8 0.8 Heavy men
0.6 0.6

0.4 0.4

0.2 0.2

0.0 0.0
160 180 190 200 70 80 100 120
Height, cm Weight, kg
A fuzzy rule can have multiple antecedents,
for
example:

IF project_duration is long
AND project_staffing is large
AND project_funding is inadequate
THEN risk is high

IF service is excellent
OR food is delicious
THEN tip is generous
The consequent of a fuzzy rule can also
include multiple parts, for instance:

IF temperature is hot
THEN hot_water is reduced;
cold_water is increased
 Fuzzy inference - process of mapping a
given input to an output using the fuzzy sets
theory.
 Several techniques are available, commonly
listed as follow;
◦ Mamdani-style inference
◦ Sugeno-style inference
 Historic event ; Prof Ebrahim Mamdani designed a control
system for a combination of steam engine and boiler
combination using fuzzy system.

 4 steps are proposed;


 Input Fuzzification
 Rule Evaluations
 Rule Output Aggregation
 Defuzzification
A human resource of a ‘JKR Cawangan Elektrik’ company would like to estimate
risk of hiring new staff according to the availability of project funds. Use Fuzzy
Logic to estimate the % of risk if the project funding is 35% and project staffing is
60%.
Find the risk when the project funding is 35% and the project staffing is
60%!

Rule 1
IF project funding is adequate
OR project staffing is small
THEN risk is low Project Funding

Rule 2
IF project funding is marginal
AND project staffing is large
THEN risk is normal
Project Staffing
Rule 3
1 IF project funding is1 inadequate 1
THEN risk is A3
high B1 C1 C2 C3
0.1 OR 0.1
0.0
(max)
0 x1 X 0 y1 Y 0 Z
Risk
Rule 1: IF x is A3 (0.0) OR y is B1 (0.1) THEN z is C1 (0.1)
Rule 1
IF x is A3 Crisp Input Crisp Input
OR y is B1 x1 = 35% y1 = 60%
THEN z is C1

Rule 2
IF x is A2
AND y is B2
THEN z is C2

Rule 3
IF x is A1
THEN z is C3
The second step is to take the fuzzified
inputs,
m(x=A1) = 0.5 m(y=B1) = 0.1
m(x=A2) = 0.2 m(y=B2) = 0.7

and 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.
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:
mAUB(x) = max [mA(x), mB(x)]

Similarly, in order to evaluate the conjunction of the rule


antecedents, we apply the AND fuzzy operation
intersection:
mA∩B(x) = min [mA(x), mB(x)]

Researchers are freely allowed to define their system!


Mamdani-style rule evaluation
1 1 1
A3 B1 C1 C2 C3
0.1 OR 0.1
0.0
(max)
0 x1 X 0 y1 Y 0 Z

Rule 1: IF x is A3 (0.0) OR y is B1 (0.1) THEN z is C1 (0.1)


1 1 1
0.7
C1 C2 C3
A2 0.2 B2 AND 0.2
(min)
0 x1 X 0 y1 Y 0 Z

Rule 2: IF x is A2 (0.2) AND y is B2 (0.7) THEN z is C2 (0.2)


1 1
A1 0.5 0.5 C1 C2 C3

0 x1 X 0 Z
Rule 3: IF x is A1 (0.5) THEN z is C3 (0.5)

Fuzzified Val → m(x=A1) = 0.5, m(x=A2) = 0.2, m(y=B1) = 0.1, m(y=B2) = 0.7,
Now the result of the antecedent evaluation can be
applied to the membership function of the
consequent.
◼ The most common method of correlating the rule
consequent with the truth value of the rule antecedent
is clipping; to cut the consequent membership
function at the level of the antecedent truth.
◼ Since the top of the membership function is sliced, the
clipped fuzzy set loses some information.
◼ Clipping involves less complex and faster
mathematics, and generates an aggregated output
surface that is easier to defuzzify.
◼ While clipping is a frequently used method, scaling
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.
Degree of Degree of
Membership Membership
1.0 1.0

C2 C2

0.2 0.2
Clipping Scaling
0.0 0.0
Z Z
 Aggregation : process of unification of
outputs of all rules or combining clipped or
scaled rules on previous consequents.

 The input of the aggregation process :


the list of clipped or scaled consequent
membersip functions.

 The output
One fuzzy set for each output variable.
Aggregation of the rule outputs

1 1 1
C1 C2 C3
0.5 0.5
0.2 0.2
0.1 0.1
0 Z 0 Z 0 Z 0 Z

z is C1 (0.1) z is C2 (0.2) z is C3 (0.5) 


 The last step in the fuzzy inference process
is 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 aggregate output fuzzy set.

 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
mA x x dx
COG = a
b
m A x dx
a
◼ 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.

1.0
0.8
0.6 A
0.4
0.2
a b
0.0 X
150 160 170 180 190 200 210
Centre of gravity (COG):
(0 + 10 + 20)  0.1 + (30 + 40 + 50 + 60)  0.2 + (70 + 80 + 90 + 100)  0.5
COG = = 67.4
0.1 + 0.1 + 0.1 + 0.2 + 0.2 + 0.2 + 0.2 + 0.5 + 0.5 + 0.5 + 0.5

Degreeof
Membership
1.0
0.8
The risk percentage to conduct project with 35% project
0.6
funding and 60% project staffing will give result 67.4% risk.
0.4
0.2
0.0
0 10 20 30 40 50 60 70 80 90 100
67.4 Z
3.4 Fuzzy Relation
3.5 Fuzzy Inference

LO1 : Able to execute fuzzy sets using the common fuzzy operations
LO2 : Able to understand and determine the purpose of fuzzy relations
LO3 : Able to understand how inference process is done in fuzzy
implication
LO4 : Able to understand how to design a fuzzy logic controller
LO5 : Able to understand how inference process is done in a fuzzy logic
controller
Achievements : CO2
3.5 Fuzzy Inference – Sugeno style
inference

LO3 : Able to understand how inference process is done in fuzzy


implication
LO4 : Able to understand how to design a fuzzy logic controller
LO5 : Able to understand how inference process is done in a fuzzy
logic controller

Achievements : CO2
Mamdani-style : finding the centroid/weightage of the
consequent across continuously varying function – not
computationally efficient
Michino Sugeno-style use singleton to represent the
membership of a system instead of trapezium, triangle etc.

Fuzzy set with a membership function that is unity at a


single particular point on the universe of discourse and
zero elsewhere else.
The format of the Sugeno-style fuzzy rule is
IF x is A
AND y is B
THEN z is f (x, y) → Mathematical function
Commonly used is zero-order Sugeno fuzzy model
IF x is A
AND y is B
THEN z is k → k; constant

In this case, the output of each fuzzy rule is constant.


All consequent membership functions are
represented by singleton spikes.
 Consider rules that we used in Mamdani FIS :
Rule 1 Rule 1 In Mamdani :
IF project funding is adequate IF x is A3
OR project staffing is small OR y is B1
THEN risk is low THEN z is C1

Rule 2 Rule 2
In Sugeno :
IF project funding is marginal IF x is A2
1
AND project staffing is large AND y is B2
THEN risk is normal THEN z is C2

Rule 3 Rule 3
IF project funding is 0 k1 k2 k3 Z
IF x is A1
inadequate User define : k1 = 20, k2 = 50 and k3 = 80
THEN z is C3
THEN risk is high
Dwi Pebrianti, 2015/2016 Semester 2
1 1 1
A3 B1
0.1 OR 0.1
0.0
(max)
0 x1 X 0 y1 Y 0 k1 Z

Rule 1: IF x is A3 (0.0) OR y is B1 (0.1) THEN z is k1 (0.1)


1 1 1
0.7
A2 0.2 B2 AND 0.2
(min)
0 x1 X 0 y1 Y 0 k2 Z

Rule 2: IF x is A2 (0.2) AND y is B2 (0.7) THEN z is k2 (0.2)


1 1
A1 0.5 0.5

0 x1 X 0 k3 Z
Rule 3: IF x is A1 (0.5) THEN z is k3 (0.5)

Given that k1=20, k2=50, k3=80


1 1 1 1
0.5 0.5
0.2
0.1 0.2 0.1
0 k1 Z 0 k2 Z 0 k3 Z 0 k1 k2 k3 Z

z is k1 (0.1) z is k2 (0.2) z is k3 (0.5) 


Weighted average (WA):
m(k1) X k1 + m(k 2) X k 2 + m(k 3) X k 3 0.1X 20 + 0.2 X50 + 0.5 X80
WA = = = 65
m(k1) + m(k 2) + m(k 3) 0.1 + 0.2 + 0.5
Sugeno-style defuzzification

0 z1 Z
Crisp Output
z1
Hamam, A.; Georganas, N.D.; 2008
Mamdani-style
 Refer KALAM in Chapter 3 section.

 Click these link:-


We want to compare two sensors based upon their detection levels and gain
settings. The following table of gain settings and sensor detection levels with a
standard item being monitored provides typical membership values to represents
the detection levels for each of the sensors.

The universe of discourse is X = {0, 20, 40, 60, 80, 100} . Find the membership
function for the two sensors: Find the following membership functions using
standard set operations:
a) μS1 U S2(x) b) μS1 ∩ S2(x)
Each sensors has the following membership of fuzzy set.
S1 = {0.5/20, 0.65/40, 0.85/60, 1/80, 1/100 }
S2 = {0.35/20, 0.5/40, 0.75/60, 0.9/80, 1/100}

a) μS1 U S2(x)
= {0.5/20, 0.65/40, 0.85/60, 1/80, 1/100 }

b) μS1 ∩ S2(x)
= {……………………………………………………………}
Let x be the universe of commercial aircraft of interest

Let be the fuzzy set passenger class aircraft

Let be the fuzzy set of cargo

Find the values of the operation performed on these fuzzy sets.


For the elements below, check whether the associativity property can be applied.
In a temperature controller for room, the linguistic comfort range
is “slightly cold” and “not too hot” using these membership
functions defined on a universe of temperature in ◦ C.

“Hot” = {0/25, 0.1/26, 0.3/27, 0.5/28, 0.7/29, 0.9/30}


“Cold”= {1/25, 0.8/26, 0.7/27, 0.4/28, 0.3/29, 0.2/30}

Find the membership functions for:


(a) Not very hot
(b) Slightly cold or slightly hot
Hedges in fuzzy logic
Hedge Mathematical Graphical Representation
Expression

A little [ mA( x)] 1.3

Slightly [ mA(x)] 1.7

Very [ mA (x)] 2

Extremely [ mA(x) ] 3
Hedges in fuzzy logic (cont’d)
Mathematical
Hedge Graphical Representation
Expression

Very very [mA (x)]4

More or less mA (x)

Somewhat mA (x)

2 [mA (x )]2
if 0 m A  0.5
Indeed
1 − 2 [1 −m A ( x)]2
if 0.5 < mA  1
 The problem is to design a fuzzy expert
system to predict (advise) how much to buy
or sell shares in a company based on two
sources of information:
1. the past share price of the company itself (share
pr), and
2. the Euro / Dollar exchange rate (xchg rate)
 Membership of each Input
1. share_pr : falling, stable, rising
2. xchg_rate : low, medium, high
 Rule applied :
1. IF share_pr is falling AND xchg_rate is high THEN
advice is sell
2. IF share_pr is stable THEN advice is keep
3. IF share_pr is rising OR xchg_rate is low then
advice is buy
share_pr xchg_pr advice

3.5 4.5 6.5


-24 -6 6 24 1.5

Range -30 to 30 Range 1 to 7 Range -30 to 30

If the previous share price is 10, and the exchange rate is 4.5, then what should the
company do?
Do the calculation by using Mamdani.
-1.82 → the company
should buy more
share about 1.82

You might also like