0% found this document useful (0 votes)
269 views104 pages

Fuzzy Logic

Fuzzy sets were introduced by Zadeh in 1965 to mathematically represent uncertainty and vagueness. Fuzzy logic provides a framework to model imprecise concepts using membership functions ranging from 0 to 1. It generalizes classical binary logic by allowing intermediate values between true and false. Fuzzy numbers represent imprecise numeric values as fuzzy sets over the real numbers. Common fuzzy numbers include triangular and trapezoidal fuzzy numbers defined by membership functions.

Uploaded by

Illyas Janu
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)
269 views104 pages

Fuzzy Logic

Fuzzy sets were introduced by Zadeh in 1965 to mathematically represent uncertainty and vagueness. Fuzzy logic provides a framework to model imprecise concepts using membership functions ranging from 0 to 1. It generalizes classical binary logic by allowing intermediate values between true and false. Fuzzy numbers represent imprecise numeric values as fuzzy sets over the real numbers. Common fuzzy numbers include triangular and trapezoidal fuzzy numbers defined by membership functions.

Uploaded by

Illyas Janu
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/ 104

FS I: Fuzzy Sets and Fuzzy Logic

Fuzzy sets were introduced by Zadeh in 1965 to


represent/manipulate data and information possessing nonstatistical uncertainties.
L.A.Zadeh, Fuzzy Sets, Information and Control, 8(1965) 338-353.
It was specifically designed to mathematically represent uncertainty and vagueness and to provide formalized tools for dealing with the imprecision intrinsic to many problems. However, the story of
fuzzy logic started much more earlier . . .
To devise a concise theory of logic, and later mathematics, Aristotle posited the so-called Laws of
Thought.
1

One of these, the Law of the Excluded Middle,


states that every proposition must either be True (T)
or False (F). Even when Parminedes proposed the
first version of this law (around 400 Before Christ)
there were strong and immediate objections: for example, Heraclitus proposed that things could be simultaneously True and not True.
It was Plato who laid the foundation for what would
become fuzzy logic, indicating that there was a third
region (beyond T and F) where these opposites tumbled about. A systematic alternative to the bi-valued
logic of Aristotle was first proposed by ukasiewicz
around 1920, when he described a three-valued logic,
along with the mathematics to accompany it. The
third value he proposed can best be translated as the
term possible, and he assigned it a numeric value
between T and F. Eventually, he proposed an entire notation and axiomatic system from which he
hoped to derive modern mathematics.
2

Later, he explored four-valued logics, five-valued


logics, and then declared that in principle there was
nothing to prevent the derivation of an infinite-valued
logic.ukasiewicz felt that three- and infinite-valued
logics were the most intriguing, but he ultimately
settled on a four-valued logic because it seemed to
be the most easily adaptable to Aristotelian logic.
It should be noted that Knuth also proposed a threevalued logic similar to Lukasiewiczs, from which
he speculated that mathematics would become even
more elegant than in traditional bi-valued logic.
The notion of an infinite-valued logic was introduced
in Zadehs seminal work Fuzzy Sets where he described the mathematics of fuzzy set theory, and by
extension fuzzy logic. This theory proposed making the membership function (or the values F and T)
operate over the range of real numbers [0, 1]. New
operations for the calculus of logic were proposed,
and showed to be in principle at least a generaliza3

tion of classic logic.


Fuzzy logic provides an inference morphology that
enables approximate human reasoning capabilities
to be applied to knowledge-based systems. The theory of fuzzy logic provides a mathematical strength
to capture the uncertainties associated with human
cognitive processes, such as thinking and reasoning.
The conventional approaches to knowledge representation lack the means for representating the meaning of fuzzy concepts. As a consequence, the approaches based on first order logic and classical probablity theory do not provide an appropriate conceptual framework for dealing with the representation
of commonsense knowledge, since such knowledge
is by its nature both lexically imprecise and noncategorical.
The developement of fuzzy logic was motivated in
large measure by the need for a conceptual frame4

work which can address the issue of uncertainty and


lexical imprecision.
Some of the essential characteristics of fuzzy logic
relate to the following (Zadeh, 1992):
In fuzzy logic, exact reasoning is viewed
as a limiting case of approximate reasoning.
In fuzzy logic, everything is a matter of
degree.
In fuzzy logic, knowledge is interpreted a
collection of elastic or, equivalently, fuzzy
constraint on a collection of variables.
Inference is viewed as a process of propagation of elastic constraints.
Any logical system can be fuzzified.
There are two main characteristics of fuzzy systems
5

that give them better performance for specific applications.


Fuzzy systems are suitable for uncertain or approximate reasoning, especially for the system
with a mathematical model that is difficult to derive.
Fuzzy logic allows decision making with estimated values under incomplete or uncertain information.
Definition 1. (fuzzy set) Let X be a nonempty set. A
fuzzy set A in X is characterized by its membership
function
A : X [0, 1]
and A(x) is interpreted as the degree of membership of element x in fuzzy set A for each x X.
It is clear that A is completely determined by the set
6

of tuples
A = {(u, A(u))|u X}.
Frequently we will write A(x) instead of A(x). The
family of all fuzzy sets in X is denoted by F(X).
If X = {x1, . . . , xn} is a finite set and A is a fuzzy
set in X then we often use the notation
A = 1/x1 + + n/xn
where the term i/xi, i = 1, . . . , n signifies that i
is the grade of membership of xi in A and the plus
sign represents the union.
1

-2

-1

A discrete membership function for x is close to 1.


Example 1. The membership function of the fuzzy
set of real numbers close to 1, is can be defined
7

as
A(t) = exp((t 1)2)
where is a positive real number.

A membership function for x is close to 1.


Example 2. Assume someone wants to buy a cheap
car. Cheap can be represented as a fuzzy set on a
universe of prices, and depends on his purse. For instance, from the Figure cheap is roughly interpreted
as follows:
Below 3000$ cars are considered as cheap, and
prices make no real difference to buyers eyes.
Between 3000$ and 4500$, a variation in the
price induces a weak preference in favor of the
cheapest car.
8

Between 4500$ and 6000$, a small variation in


the price induces a clear preference in favor of
the cheapest car.
Beyond 6000$ the costs are too high (out of consideration).
1

3000$

4500$

6000$

Membership function of cheap.


Definition 2. (support) Let A be a fuzzy subset of
X; the support of A, denoted supp(A), is the crisp
subset of X whose elements all have nonzero membership grades in A.
supp(A) = {x X|A(x) > 0}.
Definition 3. (normal fuzzy set) A fuzzy subset A of
a classical set X is called normal if there exists an
9

x X such that A(x) = 1. Otherwise A is subnormal.


Definition 4. (-cut) An -level set of a fuzzy set
A of X is a non-fuzzy set denoted by [A] and is
defined by

{t X|A(t) } if > 0
[A] =
cl(suppA)
if = 0
where cl(suppA) denotes the closure of the support
of A.
Example 3. Assume X = {2, 1, 0, 1, 2, 3, 4} and
A = 0.0/ 2 + 0.3/ 1
+ 0.6/0 + 1.0/1 + 0.6/2 + 0.3/3 + 0.0/4,
in this case
{1, 0, 1, 2, 3} if 0 0.3
if 0.3 < 0.6
[A] = {0, 1, 2}

{1}
if 0.6 < 1
Definition 5. (convex fuzzy set) A fuzzy set A of X is
called convex if [A] is a convex subset of X
[0, 1].
10

cut

An -cut of a triangular fuzzy number.


In many situations people are only able to characterize numeric information imprecisely. For example,
people use terms such as, about 5000, near zero, or
essentially bigger than 5000. These are examples of
what are called fuzzy numbers. Using the theory of
fuzzy subsets we can represent these fuzzy numbers
as fuzzy subsets of the set of real numbers. More
exactly,
Definition 6. (fuzzy number) A fuzzy number A is a
fuzzy set of the real line with a normal, (fuzzy) convex and continuous membership function of bounded
support. The family of fuzzy numbers will be denoted by F.
11

Definition 7. (quasi fuzzy number) A quasi fuzzy number A is a fuzzy set of the real line with a normal,
fuzzy convex and continuous membership function
satisfying the limit conditions
lim A(t) = 0.
lim A(t) = 0,
t

Fuzzy number.
Let A be a fuzzy number. Then [A] is a closed
convex (compact) subset of R for all [0, 1]. Let
us introduce the notations
a1() = min[A] , a2() = max[A]
In other words, a1() denotes the left-hand side and
a2() denotes the right-hand side of the -cut. It is
easy to see that
If then [A] [A]
12

Furthermore, the left-hand side function


a1 : [0, 1] R
is monoton increasing and lower semicontinuous,
and the right-hand side function
a2 : [0, 1] R
is monoton decreasing and upper semicontinuous.
We shall use the notation
[A] = [a1(), a2()].
The support of A is the open interval (a1(0), a2(0)).
A
1

a1()
a2 ()

a1 (0)

a2 (0)

The support of A is (a1(0), a2(0)).


If A is not a fuzzy number then there exists an
[0, 1] such that [A] is not a convex subset of R.
13

Not fuzzy number.


Definition 8. (triangular fuzzy number) A fuzzy set
A is called triangular fuzzy number with peak (or
center) a, left width > 0 and right width > 0 if
its membership function has the following form

at

if a t a
1

ta
A(t) =
1
if a t a +

0
otherwise
and we use the notation A = (a, , ). It can easily
be verified that
[A] = [a (1 ), a + (1 )], [0, 1].
The support of A is (a , b + ).
14

a-

a+

Triangular fuzzy number.


A triangular fuzzy number with center a may be
seen as a fuzzy quantity
x is approximately equal to a.
Definition 9. (trapezoidal fuzzy number) A fuzzy set
A is called trapezoidal fuzzy number with tolerance
interval [a, b], left width and right width if its
membership function has the following form

1 (a t)/ if a t a

1
if a t b
A(t) =

1 (t b)/ if a t b +

0
otherwise
15

and we use the notation A = (a, b, , ). It can


easily be shown that
[A] = [a (1 ), b + (1 )], [0, 1].
The support of A is (a , b + ).
1

a-

b+

Trapezoidal fuzzy number.


A trapezoidal fuzzy number may be seen as a fuzzy
quantity
x is approximately in the interval [a, b].
Definition 10. Any fuzzy number A F can be de-

16

scribed as




at

L
if t [a , a]

1
if t [a, b]


A(t) =

t b)

R
if t [b, b + ]

0
otherwise
where [a, b] is the peak or core of A,
L : [0, 1] [0, 1],

R : [0, 1] [0, 1],

are continuous and non-increasing shape functions


with L(0) = R(0) = 1 and R(1) = L(1) = 0. We
call this fuzzy interval of LR-type and refer to it by
A = (a, b, , )LR .
The support of A is (a , b + ).
Let A = (a, b, , )LR be a fuzzy number of type
LR. If a = b then we use the notation
A = (a, , )LR
17

and say that A is a quasi-triangular fuzzy number.


Furthermore if L(x) = R(x) = 1 x then instead
of A = (a, b, , )LR we simply write
A = (a, b, , ).

1-x

Nonlinear and linear reference functions.


Definition 11. (subsethood) Let A and B are fuzzy
subsets of a classical set X. We say that A is a
subset of B if A(t) B(t), t X.
B
A

A is a subset of B.
18

Definition 12. (equality of fuzzy sets) Let A and B


are fuzzy subsets of a classical set X. A and B
are said to be equal, denoted A = B, if A B
and B A. We note that A = B if and only if
A(x) = B(x) for x X.
Definition 13. (empty fuzzy set) The empty fuzzy subset of X is defined as the fuzzy subset of X such
that (x) = 0 for each x X.
It is easy to see that A holds for any fuzzy
subset A of X.
Definition 14. The largest fuzzy set in X, called universal fuzzy set in X, denoted by 1X , is defined by
1X (t) = 1, t X.
It is easy to see that A 1X holds for any fuzzy
subset A of X.

19

1X
1

10

The graph of the universal fuzzy subset in X = [0, 10].


Definition 15. (Fuzzy point) Let A be a fuzzy number. If supp(A) = {x0} then A is called a fuzzy
point and we use the notation A = x0.
_

x0

x0

Fuzzy point.
Let A = x0 be a fuzzy point. It is easy to see that
[A] = [x0, x0] = {x0}, [0, 1].
20

Operations on fuzzy sets


We extend the classical set theoretic operations from
ordinary set theory to fuzzy sets. We note that all
those operations which are extensions of crisp concepts reduce to their usual meaning when the fuzzy
subsets have membership degrees that are drawn from
{0, 1}. For this reason, when extending operations
to fuzzy sets we use the same symbol as in set theory.
Let A and B are fuzzy subsets of a nonempty (crisp)
set X.
Definition 16. (intersection) The intersection of A
and B is defined as
(A B)(t) = min{A(t), B(t)} = A(t) B(t),
for all t X.

21

Intersection of two triangular fuzzy numbers.


Definition 17. (union) The union of A and B is defined as
(A B)(t) = max{A(t), B(t)} = A(t) B(t),
for all t X.
A

Union of two triangular fuzzy numbers.


Definition 18. (complement) The complement of a
22

fuzzy set A is defined as


(A)(t) = 1 A(t)
A closely related pair of properties which hold in
ordinary set theory are the law of excluded middle
A A = X
and the law of noncontradiction principle
A A =
It is clear that 1X = and = 1X , however, the
laws of excluded middle and noncontradiction are
not satisfied in fuzzy logic.
Lemma 1. The law of excluded middle is not valid.
Let A(t) = 1/2, t R, then it is easy to see that
(A A)(t) = max{A(t), A(t)}
= max{1 1/2, 1/2} =
1/2 = 1.
23

Lemma 2. The law of noncontradiction is not valid.


Let A(t) = 1/2, t R, then it is easy to see that
(A A)(t) = min{A(t), A(t)} =
min{1 1/2, 1/2} =
1/2 = 0.
However, fuzzy logic does satisfy De Morgans laws
(A B) = A B, (A B) = A B.

24

FS II: Fuzzy relations

A classical relation can be considered as a set of


tuples, where a tuple is an ordered pair. A binary
tuple is denoted by (u, v), an example of a ternary
tuple is (u, v, w) and an example of n-ary tuple is
(x1, . . . , xn).
Example 1. Let X be the domain of man {John,
Charles, James} and Y the domain of women {Diana,
Rita, Eva}, then the realtion married to on X Y
is, for example
{(Charles, Diana), (John, Eva), (James, Rita) }
Definition 1. (classical n-ary relation) Let X1, . . . , Xn
be classical sets. The subsets of the Cartesian product X1 Xn are called n-ary relations. If
X1 = = Xn and R X n then R is called an
n-ary relation in X.
Let R be a binary relation in R. Then the charac1

teristic function of R is defined as



1 if (u, v) R
R (u, v) =
0 otherwise
Example 2. Consider the following relation
(u, v) R u [a, b] and v [0, c]


R (u, v) =

1 if (u, v) [a, b] [0, c]


0 otherwise

Let R be a binary relation in a classical set X. Then


Definition 2. (reflexivity) R is reflexive if u U :
(u, u) R
2

Definition 3. (anti-reflexivity) R is anti-reflexive if


u U : (u, u)
/R
Definition 4. (symmetricity) R is symmetric if from
(u, v) R (v, u) R, u, v U
Definition 5. (anti-symmetricity) R is anti-symmetric
if (u, v) R and (v, u) R then u = v, u, v U
Definition 6. (transitivity) R is transitive if (u, v)
R and (v, w) R then (u, w) R, u, v, w U
Example 3. Consider the classical inequality relations on the real line R. It is clear that is reflexive,
anti-symmetric and transitive, < is anti-reflexive,
anti-symmetric and transitive.
Other important properties of binary relations are
Property 1. (equivalence) R is an equivalence relation if, R is reflexive, symmetric and transitive
Property 2. (partial order) R is a partial order relation if it is reflexive, anti-symmetric and transitive
3

Property 3. (total order) R is a total order relation if it is partial order and u, v R, (u, v)
R or (v, u) R hold
Example 4. Let us consider the binary relation subset of. It is clear that we have a partial order relation.
The relation on natural numbers is a total order
relation.
Consider the relation mod 3 on natural numbers
{(m, n) | (n m) mod 3 0}
This is an equivalence relation.
Definition 7. Let X and Y be nonempty sets. A
fuzzy relation R is a fuzzy subset of X Y .
In other words, R F(X Y ).
If X = Y then we say that R is a binary fuzzy relation in X.
4

Let R be a binary fuzzy relation on R. Then R(u, v)


is interpreted as the degree of membership of the
ordered pair (u, v) in R.
Example 5. A simple example of a binary fuzzy relation on
U = {1, 2, 3},
called approximately equal can be defined as
R(1, 1) = R(2, 2) = R(3, 3) = 1
R(1, 2) = R(2, 1) = R(2, 3) = R(3, 2) = 0.8
R(1, 3) = R(3, 1) = 0.3
The membership function of R is given by

1 if u = v
R(u, v) = 0.8 if |u v| = 1

0.3 if |u v| = 2
In matrix notation it can be represented as
5

1 1 0.8 0.3

2
0.8
1
0.8

3 0.3 0.8 1
Operations on fuzzy relations
Fuzzy relations are very important because they can
describe interactions between variables. Let R and
S be two binary fuzzy relations on X Y .
Definition 8. The intersection of R and S is defined
by

(R S)(u, v) = min{R(u, v), S(u, v)}.


Note that R : X Y [0, 1], i.e. R the domain of
R is the whole Cartesian product X Y .
6

Definition 9. The union of R and S is defined by


(R S)(u, v) = max{R(u, v), S(u, v)}
Example 6. Let us define two binary relations
R = x is considerable larger than y

y 1 y2 y3 y4

x1 0.8 0.1 0.1 0.7

x2 0 0.8 0 0
x3 0.9 1 0.7 0.8
S = x is very close to y

y1 y2 y3 y4

x1 0.4 0 0.9 0.6

x2 0.9 0.4 0.5 0.7


x3 0.3 0 0.8 0.5
The intersection of R and S means that x is considerable larger than y and x is very close to y.
7

y1 y2 y3 y4

x1 0.4 0 0.1 0.6

(R S)(x, y) =

x2 0 0.4 0 0
x3 0.3 0 0.7 0.5
The union of R and S means that x is considerable
larger than y or x is very close to y.

y1 y2 y3 y4

x1 0.8 0 0.9 0.7

(R S)(x, y) =

x2 0.9 0.8 0.5 0.7


x3 0.9 1 0.8 0.8
Consider a classical relation R on R.


R(u, v) =

1 if (u, v) [a, b] [0, c]


0 otherwise

It is clear that the projection (or shadow) of R on


the X-axis is the closed interval [a, b] and its projection on the Y -axis is [0, c].
If R is a classical relation in X Y then
X = {x X | y Y : (x, y) R}

Y = {y Y | x X : (x, y) R}
where X denotes projection on X and Y denotes
projection on Y .

Definition 10. Let R be a fuzzy binary fuzzy relation


on X Y . The projection of R on X is defined as
X (x) = sup{R(x, y) | y Y }
and the projection of R on Y is defined as

Y (y) = sup{R(x, y) | x X}
Example 7. Consider the relation
R = x is considerable larger than y

10

y1 y2 y3 y4

x1 0.8 0.1 0.1 0.7

x2 0 0.8 0 0
x3 0.9 1 0.7 0.8
then the projection on X means that
x1 is assigned the highest membership degree
from the tuples (x1, y1), (x1, y2), (x1, y3), (x1, y4),
i.e. X (x1) = 1, which is the maximum of the
first row.
x2 is assigned the highest membership degree
from the tuples (x2, y1), (x2, y2), (x2, y3), (x2, y4),
i.e. X (x2) = 0.8, which is the maximum of the
second row.
x3 is assigned the highest membership degree
from the tuples (x3, y1), (x3, y2), (x3, y3), (x3, y4),
i.e. X (x3) = 1, which is the maximum of the
third row.
11

Y
Shadows of a fuzzy relation.
Definition 11. The Cartesian product of A F(X)
and B F(Y ) is defined as
(A B)(u, v) = min{A(u), B(v)}.
for all u X and v Y .
12

AxB

It is clear that the Cartesian product of two fuzzy


sets is a fuzzy relation in X Y .
If A and B are normal then Y (A B) = B and
X (A B) = A.

13

Really,
X (x) = sup{(A B)(x, y) | y}
= sup{A(x) B(y) | y} =
min{A(x), sup{B(y)} | y}
= min{A(x), 1} = A(x).
Definition 12. The sup-min composition of a fuzzy
set C F(X) and a fuzzy relation R F(X Y )
is defined as

(C R)(y) = sup min{C(x), R(x, y)}


xX

for all y Y .
The composition of a fuzzy set C and a fuzzy relation R can be considered as the shadow of the relation R on the fuzzy set C.

14

C(x)
R(x,y')

(C o R)(y')

X
y'
R(x,y)

Example 8. Let A and B be fuzzy numbers and let

R=AB
a fuzzy relation.
Observe the following property of composition
A R = A (A B) = A,
15

B R = B (A B) = B.
Example 9. Let C be a fuzzy set in the universe of
discourse {1, 2, 3} and let R be a binary fuzzy relation in {1, 2, 3}. Assume that
C = 0.2/1 + 1/2 + 0.2/3
and

1 1 0.8 0.3

R=

2
0.8
1
0.8

3 0.3 0.8 1
Using the definition of sup-min composition we get

1 1 0.8 0.3
=
CR = (0.2/1+1/2+0.2/3)

2 0.8 1 0.8
3 0.3 0.8 1
16

0.8/1 + 1/2 + 0.8/3.


Example 10. Let C be a fuzzy set in the universe of
discourse [0, 1] and let R be a binary fuzzy relation
in [0, 1]. Assume that C(x) = x and

R(x, y) = 1 |x y|.
Using the definition of sup-min composition we get

1+y
(C R)(y) = sup min{x, 1 |x y|} =
2
x[0,1]
for all y [0, 1].
Definition 13. (sup-min composition of fuzzy relations) Let R F(X Y ) and S F(Y Z). The
sup-min composition of R and S, denoted by R S
is defined as
17

(R S)(u, w) = sup min{R(u, v), S(v, w)}


vY

It is clear that R S is a binary fuzzy relation in


X Z.
Example 11. Consider two fuzzy relations

R = x is considerable larger than y

y 1 y2 y3 y4

x1 0.8 0.1 0.1 0.7

x2 0 0.8 0 0
x3 0.9 1 0.7 0.8

18

z1 z2 z3

y1 0.4 0.9 0.3

S = y is very close to z = y2 0 0.4 0

y3 0.9 0.5 0.8


y4 0.6 0.7 0.5
Then their composition is

z1 z2 z3

x1 0.6 0.8 0.5

RS =

x
0
0.4
0

2
x3 0.7 0.9 0.7
Formally,

y1

x1 0.8

x2 0
x3 0.9

y2 y3 y4

z1 z2 z3

y1 0.4 0.9 0.3

0.1 0.1 0.7


y 0 0.4 0 =
2

0.8 0 0

y3 0.9 0.5 0.8


1 0.7 0.8
y4 0.6 0.7 0.5
19

z1 z2 z3

x1 0.6 0.8 0.5

x2 0 0.4 0
x3 0.7 0.9 0.7
i.e., the composition of R and S is nothing else, but
the classical product of the matrices R and S with
the difference that instead of addition we use maximum and instead of multiplication we use minimum
operator.

20

FS III: Fuzzy implications

The material implication


Let p = x is in A and q = y is in B are crisp
propositions, where A and B are crisp sets for the
moment.
The implication p q is interpreted as (p q).
p entails q means that it can never happen that p
is true and q is not true.
It is easy to see that
p q = p q
The full interpretation of the material implication
p q is that the degree of truth of p q quantifies
to what extend q is at least as true as p, i.e.
p q is true (p) (q)
1


pq=

p
1
0
0
1

1 if (p) (q)
0 otherwise
q pq
1
1
1
1
0
1
0
0

The truth table for the material implication.


Example 1. Let p = x is bigger than 10 and let
q = x is bigger than 9. It is easy to see that p q
is true, because it can never happen that x is bigger
than 10 and x is not bigger than 9.
This property of material implication can be interpreted as:
if X Y then X Y
Other interpretation of the implication operator is
2

X Y = sup{Z|X Z Y }.
Fuzzy implications
Consider the implication statement
if pressure is high then volume is small
The membership function of the fuzzy set A, big
pressure, illustrated in the figure

Membership function for big pressure.


can be interpreted as

1 is in the fuzzy set big pressure with grade of


membership 0
2 is in the fuzzy set big pressure with grade of
membership 0.25
4 is in the fuzzy set big pressure with grade of
membership 0.75
x is in the fuzzy set big pressure with grade of
membership 1, for all x 5

1
if u 5

5u
A(u) = 1
if 1 u 5

0
otherwise
The membership function of the fuzzy set B, small
volume, can be interpreted as (see figure)
5 is in the fuzzy set small volume with grade of
4

membership 0
4 is in the fuzzy set small volume with grade of
membership 0.25
2 is in the fuzzy set small volume with grade of
membership 0.75
x is in the fuzzy set small volume with grade of
membership 1, for all x 1

1
if v 1

v1
B(v) = 1
if 1 v 5

0
otherwise

Membership function for small volume.


5

If p is a proposition of the form


x is A
where A is a fuzzy set, for example, big pressure
and q is a proposition of the form
y is B
for example, small volume then we define the fuzzy
implication A B as a fuzzy relation.
It is clear that (A B)(u, v) should be defined
pointwise and likewise, i.e. (A B)(u, v) depends
only on A(u) and B(v).
That is
(A B)(u, v) = I(A(u), B(v)) = A(u) B(v)
In our interpretation A(u) is considered as the truth
value of the proposition
u is big pressure,
6

and B(v) is considered as the truth value of the proposition


v is small volume.
that is
u is big pressure v is small volume A(u) B(v)
Remembering the full interpretation of the material
implication

pq=

1 if (p) (q)
0 otherwise

One possible extension of materioal implication to


implications with intermediate truth values can be


A(u) B(v) =

1 if A(u) B(v)
0 otherwise

4 is big pressure 1 is small volume =


A(4) B(1) = 0.75 1 = 1
However, it is easy to see that this fuzzy implication
operator (called Standard Strict) sometimes is not
appropriate for real-life applications. Namely, let
A(u) = 0.8 and B(v) = 0.8. Then we have
A(u) B(v) = 0.8 0.8 = 1
Suppose there is a small error of measurement in
B(v), and instead of 0.8 we have 0.7999. Then
A(u) B(v) = 0.8 0.7999 = 0
This example shows that small changes in the input can cause a big deviation in the output, i.e. our
8

system is very sensitive to rounding errors of digital


computation and small errors of measurement.
A smoother extension of material implication operator can be derived from the equation
X Y = sup{Z|X Z Y }
That is
A(u) B(v) = sup{z| min{A(u), z} B(v)}
so,


A(u) B(v) =

1
if A(u) B(v)
B(v) otherwise

This operator is called Godel implication. Other


possibility is to extend the original definition,

p q = p q
9

using the definition of negation and union


A(u) B(v) = max{1 A(u), B(v)}
This operator is called Kleene-Dienes implication.
In many practical applications they use Mamdanis
implication operator to model causal relationship
between fuzzy variables.
This operator simply takes the minimum of truth
values of fuzzy predicates

A(u) B(v) = min{A(u), B(v)}


It is easy to see this is not a correct extension of
material implications, because 0 0 yields zero.
However, in knowledge-based systems, we are usually not interested in rules, where the antecedent
part is false.
10

x y = xy
x y = min{1, 1 x + y}
x y = min{x, y}

1 if x y
xy=
0 otherwise

1 if x y
xy=
y otherwise

1 if x y
xy=
y/x otherwise
x y = max{1 x, y}
x y = 1 x + xy

Larsen
ukasiewicz
Mamdani
Standard Strict
Godel
Gaines
Kleene-Dienes
Kleene-Dienes-uk.
Modifiers

Definition 1. Let A be a fuzzy set in X. Then we can


define the fuzzy sets very A and more or less A
by

2
(very A)(x) = A(x) , (more or less A)(x) = A(x)
11

The use of fuzzy sets provides a basis for a systematic way for the manipulation of vague and imprecise concepts.
In particular, we can employ fuzzy sets to represent
linguistic variables.

old
very old

30

60

A linguistic variable can be regarded either as a variable whose value is a fuzzy number or as a variable
whose values are defined in linguistic terms.

12

more or less old

old

30

60

Definition 2. Linguistic Variables:


A linguistic variable is characterized by a quintuple
(x, T (x), U, G, M )
in which
x is the name of variable;
T (x) is the term set of x, that is, the set of names
of linguistic values of x with each value being a
fuzzy number defined on U ;
13

G is a syntactic rule for generating the names of


values of x;
and M is a semantic rule for associating with
each value its meaning.
For example, if speed is interpreted as a linguistic
variable, then its term set T (speed) could be
T = {slow, moderate, fast, very slow, more or less
fast, . . . }
where each term in T (speed) is characterized by a
fuzzy set in a universe of discourse U = [0, 100].
We might interpret slow as a speed below about
40 mph, moderate as a speed close to 55 mph,
and fast as a speed above about 70mph.
These terms can be characterized as fuzzy sets whose
membership functions are shown in the figure be14

low.
slow

medium

fast

55

40

speed

70

Values of linguistic variable speed.


In many practical applications we normalize the domain of inputs and use the following type of fuzzy
partition

NB

NM

NS

ZE

PS

PM

PB

-1

A possible fuzzy partition of [-1, 1].


15

Here we used the abbreviations


NB Negative Big, [NM] Negative Medium
NS Negative Small, [ZE] Zero,
PS Positive Small, [PM] Positive Medium,
PB Positive Big.
The linguistic variable Truth.
Truth = {Absolutely false, Very false, False, Fairly
true, True, Very true, Absolutely true }
One may define the membership function of linguistic terms of truth as
T rue(u) = u
for each u [0, 1].
F alse(u) = 1 u
16

for each u [0, 1].

Absolutely f alse(u) =

Absolutely true(u) =

1 if u = 0
0 otherwise

1 if u = 1
0 otherwise

TRUTH
1

Absol ut ely
f alse

True
False

Absol ut ely
true

The world Fairly is interpreted as more or less.

F airly true(u) = u
17

for each u [0, 1].


V ery true(u) = u2
for each u [0, 1].
TRUTH
Fairly t rue

Very tru e
1

The world Fairly is interpreted as more or less.

F airly f alse(u) = 1 u
for each u [0, 1].
V ery f alse(u) = (1 u)2
for each u [0, 1].
18

TRUTH
Fairly

false

Very f alse
1

Suppose we have the fuzzy statement x is A. Let


be a term of linguistic variable Truth.
Then the statement x is A is is interpreted as x
is A. Where
( A)(u) = (A(u))
for each u [0, 1].
For example, let = true. Then
x is A is true
19

is defined by
x is A = x is A
because
( A)(u) = (A(u)) = A(u)
for each u [0, 1].
It is why everything we write is considered to be
true.
A = "A is true"
1

a-

b-

Let = absolutely true. Then the statement x


is A is Absolutely true is defined by x is A,

20

where


( A)(x) =

1 if A(x) = 1
0 otherwise

A is Absolutely true
1

a-

b-

Let = absolutely false. Then the statement x


is A is Absolutely false is defined by x is A,
where

1 if A(x) = 0
( A)(x) =
0 otherwise

21

A is absolut ely f alse

a-

b -

Let = Fairly true. Then the statement x is A is


Fairly true is defined by x is A, where

( A)(x) = A(x)
"A is fairly true"
1

a-

b-

Let = Very true. Then the statement x is A is


22

Fairly true is defined by x is A, where


( A)(x) = (A(x))2
"A is very true"
1

a-

23

b-

FS IV: The theory of approximate reasoning

In 1979 Zadeh introduced the theory of approximate


reasoning. This theory provides a powerful framework for reasoning in the face of imprecise and uncertain information.
Central to this theory is the representation of propositions as statements assigning fuzzy sets as values
to variables.
Suppose we have two interactive variables x X
and y Y and the causal relationship between x
and y is completely known. Namely, we know that
y is a function of x
y = f (x)
Then we can make inferences easily

premise
y = f (x)
fact
x = x
consequence y = f (x)
This inference rule says that if we have y = f (x), x
X and we observe that x = x then y takes the value
f (x).
y
y=f(x)

y=f(x)

x=x'

Simple crisp inference.


More often than not we do not know the complete
causal link f between x and y, only we now the
values of f (x) for some particular values of x
2

1 : If x = x1 then y = y1
also
2 : If x = x2 then y = y2
also
...
also
n : If x = xn then y = yn
Suppose that we are given an x X and want to
find an y  Y which correponds to x under the
rule-base.

1 :
also
2 :
also

If

x = x1 then y = y1

If

x = x2 then y = y2

...
also
n :
fact:

If

...
x = xn then y = yn
x = x
y = y

consequence:

This problem is frequently quoted as interpolation.


Let x and y be linguistic variables, e.g. x is high
and y is small.
The basic problem of approximate reasoning is to
find the membership function of the consequence C

from the rule-base {1, . . . , n} and the fact A.


1 :
2 :

if x is A1 then y is C1,
if x is A2 then y is C2,

if x is An then y is Cn
n :
fact:
x is A
consequence:
y is C

Zadeh introduced a number of translation rules which


allow us to represent some common linguistic statements in terms of propositions in our language.
In the following we describe some of these translation rules.
Definition 1. Entailment rule:
x is A
AB

Mary is very young


very young young

x is B

Mary is young
5

Definition 2. Conjuction rule:


x is A
x is B
x is A B
pressure is not very high
pressure is not very low
pressure is not very high and not very low
Definition 3. Disjunction rule:
x is A
or x is B
x is A B
pressure is not very high vspace4pt
or pressure is not very low
pressure is not very high or not very low

Definition 4. Projection rule:


(x, y) have relation R
x is X (R)
(x, y) have relation R
y is Y (R)
(x, y) is close to (3, 2)

(x, y) is close to (3, 2)

x is close to 3

y is close to 2

Definition 5. Negation rule:


not (x is A)

not (x is high)

x is A

x is not high

In fuzzy logic and approximate reasoning, the most


important fuzzy implication inference rule is the Generalized Modus Ponens (GMP). The classical Modus
Ponens inference rule says:
7

premise
if p then q
fact
p
consequence
q
This inference rule can be interpreted as: If p is true
and p q is true then q is true.
The fuzzy implication inference is based on the compositional rule of inference for approximate reasoning suggested by Zadeh.
Definition 6. (compositional rule of inference)
premise
if x is A then y is B
fact
x is A
consequence:
y is B 
where the consequence B  is determined as a composition of the fact and the fuzzy implication opera8

tor

B  = A (A B)

that is,
B (v) = sup min{A(u), (A B)(u, v)}, v V.
uU

The consequence B  is nothing else but the shadow


of A B on A.
The Generalized Modus Ponens, which reduces to
calssical modus ponens when A = A and B  = B,
is closely related to the forward data-driven inference which is particularly useful in the Fuzzy Logic
Control.
The classical Modus Tollens inference rule says: If
p q is true and q is false then p is false. The
Generalized Modus Tollens,

premise
if x is A then y is B
fact
y is B 
consequence: x is A
which reduces to Modus Tollens when B = B
and A = A, is closely related to the backward
goal-driven inference which is commonly used in
expert systems, especially in the realm of medical
diagnosis.

10

A(x)
min{A(x), B(y)}

B'(y) = B(y)

B(y)
y
AxB

A A B = B.
Suppose that A, B and A are fuzzy numbers. The
Generalized Modus Ponens should satisfy some rational properties

11

Property 1. Basic property:


if x is A then y is B
x is A
y is B
if pressure is big then volume is small
pressure is big
volume is small
A' = A

B'= B

Basic property.

12

Property 2. Total indeterminance:


if x is A then y is B
x is A
y is unknown
if pres. is big
then volume is small
pres. is not big
volume is unknown

A'

B'

Total indeterminance.

13

Property 3. Subset:
if x is A then y is B
x is A A
y is B
if pressure is big then volume is small
pressure is very big
volume is small

B' = B

A
A'

Subset property.

14

Property 4. Superset:
if x is A then y is B
x is A
y is B  B

A'

B'

Superset property.
Suppose that A, B and A are fuzzy numbers.
We show that the Generalized Modus Ponens with
Mamdanis implication operator does not satisfy all
the four properties listed above.
Example 1. (The GMP with Mamdani implication)
15

if x is A then y is B
x is A
y is B 
where the membership function of the consequence
B  is defined by
B (y) = sup{A(x) A(x) B(y)|x R}, y R.
Basic property. Let A = A and let y R be
arbitrarily fixed. Then we have
B (y) = sup min{A(x), min{A(x), B(y)} =
x

sup min{A(x), B(y)} = min{B(y), sup A(x)} =


x

min{B(y), 1} = B(y).
So the basic property is satisfied.
Total indeterminance. Let A = A = 1 A and
16

let y R be arbitrarily fixed. Then we have


B (y) = sup min{1 A(x), min{A(x), B(y)} =
x

sup min{A(x), 1 A(x), B(y)} =


x

min{B(y), sup min{A(x), 1 A(x)}} =


x

min{B(y), 1/2} = 1/2B(y) < 1


this means that the total indeterminance property is
not satisfied.
Subset. Let A A and let y R be arbitrarily
fixed. Then we have
B (y) = sup min{A(x), min{A(x), B(y)} =
x

sup min{A(x), A(x), B(y)} =


x

min{B(y), sup A(x)} = min{B(y), 1} = B(y)


x

So the subset property is satisfied.

17

Superset. Let y R be arbitrarily fixed. Then we


have
B (y) = sup min{A(x), min{A(x), B(y)} =
x

sup min{A(x), A(x), B(y)} B(y).


x

So the superset property of GMP is not satisfied by


Mamdanis implication operator.
A

B
B'

A(x)
x

The GMP with Mamdanis implication operator.


Example 2. (The GMP with Larsens product implication)
if x is A then y is B
x is A
y is B 
18

where the membership function of the consequence


B  is defined by
B (y) = sup min{A(x), A(x)B(y)|x R}, y R.
Basic property. Let A = A and let y R be
arbitrarily fixed. Then we have
B (y) = sup min{A(x), A(x)B(y)} = B(y).
x

So the basic property is satisfied.


Total indeterminance. Let A = A = 1 A and
let y R be arbitrarily fixed. Then we have
B (y) = sup min{1 A(x), A(x)B(y)}
x

B(y)
<1
=
1 + B(y)
this means that the total indeterminance property is
not satisfied.
Subset. Let A A and let y R be arbitrarily
19

fixed. Then we have


B (y) = sup min{A(x), A(x)B(y)} =
x

sup min{A(x), A(x)B(y)} = B(y)


x

So the subset property is satisfied.


Superset. Let y R be arbitrarily fixed. Then we
have
B (y) = sup min{A(x), A(x)B(y)} B(y).
x

So, the superset property is not satisfied.


A'

B
B'

The GMP with Larsens implication operator.

20

FS VI: Fuzzy reasoning schemes


1: if x is A1 and y is B1 then z is C1
2: if x is A2 and y is B2 then z is C2
............
n: if x is An and y is Bn then z is Cn
x is x0 and y is y0
z is C
The i-th fuzzy rule from this rule-base
i : if x is Ai and y is Bi then z is Ci
is implemented by a fuzzy relation Ri and is
defined as
Ri(u, v, w) = (Ai Bi Ci)(u, w)
= [Ai(u) Bi(v)] Ci(w)
for i = 1, . . . , n.
1

Find C from the input x0 and from the rule


base
 = {1, . . . , n}.
Interpretation of
logical connective and
sentence connective also
implication operator then
compositional operator
We first compose x0 y0 with each Ri producing intermediate result
Ci = x0 y0 Ri
for i = 1, . . . , n. Here Ci is called the output of the i-th rule
Ci (w) = [Ai(x0) Bi(y0)] Ci(w),
for each w.
2

Then combine the Ci component wise into


C by some aggregation operator:
C=

n


Ci = x0 y0 R1 x0 y0 Rn

i=1

C(w) = A1(x0) B1(y0) C1(w)


An(x0) Bn(y0) Cn(w).

input to the system is (x0, y0)


fuzzified input is (
x0, y0)
firing strength of the i-th rule is
Ai(x0) Bi(y0)
the i-th individual rule output is
Ci (w) := [Ai(x0) Bi(y0)] Ci(w)
overall system output is
C = C1 Cn .
overall system output = union of the individual rule outputs
3

We present five well-known inference mechanisms in fuzzy rule-based systems.


For simplicity we assume that we have two
fuzzy IF-THEN rules of the form
1 :
also
2 :

if x is A1 and y is B1 then z is C1

fact :

x is x0 and y is y0

if x is A2 and y is B2 then z is C2

consequence :

z is C

Mamdani. The fuzzy implication is modelled by Mamdanis minimum operator and


the sentence connective also is interpreted
as oring the propositions and defined by max
operator.
The firing levels of the rules, denoted by
i, i = 1, 2, are computed by
1 = A1(x0) B1(y0),
2 = A2(x0) B2(y0)
The individual rule outputs are obtained by
4

C1 (w) = (1 C1(w)),
C2 (w) = (2 C2(w))
Then the overall system output is computed
by oring the individual rule outputs
C(w) = C1 (w) C2 (w)
= (1 C1(w)) (2 C2(w))
Finally, to obtain a deterministic control action, we employ any defuzzification strategy.

A1

B2

A2

xo

C1

B1

C2

yo

w
min

Inference with Mamdanis implication operator.


Tsukamoto. All linguistic terms are supposed to have monotonic membership functions.
The firing levels of the rules, denoted by
i, i = 1, 2, are computed by
1 = A1(x0)B1(y0), 2 = A2(x0)B2(y0)
In this mode of reasoning the individual crisp
control actions z1 and z2 are computed from
6

the equations
1 = C1(z1),

2 = C2(z2)

and the overall crisp control action is expressed as


1z1 + 2z2
z0 =
1 + 2
i.e. z0 is computed by the discrete Centerof-Gravity method.
If we have n rules in our rule-base then the
crisp control action is computed as
n
i=1 i zi
,
z0 = n
i=1 i
where i is the firing level and zi is the (crisp)
output of the i-th rule, i = 1, . . . , n
Example 1. We illustrate Tsukamotos reasoning method by the following simple example

1 :
also
2 :

if x is A1 and y is B1 then z is C1

fact :

x is x0 and y is y0

if x is A2 and y is B2 then z is C2

consequence :

z is C

Then according to the figure we see that


A1(x0) = 0.7, B1(y0) = 0.3
therefore, the firing level of the first rule is
1 = min{A1(x0), B1(y0)}
= min{0.7, 0.3} = 0.3
and from
A2(x0) = 0.6, B2(y0) = 0.8
it follows that the firing level of the second
rule is
2 = min{A2(x0), B2(y0)}
= min{0.6, 0.8} = 0.6,
8

the individual rule outputs z1 = 8 and z2 =


4 are derived from the equations
C1(z1) = 0.3,

C2(z2) = 0.6

and the crisp control action is


z0 = (8 0.3 + 4 0.6)/(0.3 + 0.6) = 6.

C1

B1

A1
0.7

0.3

0.3
u

B2

A2

C2

0.6

0.8

0.6
xo

z1 = 8

yo

min

z2 = 4

Tsukamotos inference mechanism.


Sugeno. Sugeno and Takagi use the follow9

ing architecture
1 :

if x is A1 and y is B1 then z1 = a1x + b1y

also
2 :

if x is A2 and y is B2 then z2 = a2x + b2y

fact : x is x0 and y is y0
cons. :

z0

The firing levels of the rules are computed


by
1 = A1(x0)B1(y0), 2 = A2(x0)B2(y0)
then the individual rule outputs are derived
from the relationships
z1 = a1x0 + b1y0, z2 = a2x0 + b2y0
and the crisp control action is expressed as
1z1 + 2z2
z0 =
1 + 2

10

A2

A1

1
u

a1 x + b 1 y

B2

B1

2
x

min

a2 x + b 2 y

Sugenos inference mechanism.


If we have n rules in our rule-base then the
crisp control action is computed as
n

z
i
i
,
z0 = i=1
n

i=1 i
where i denotes the firing level of the i-th
rule, i = 1, . . . , n
Example 2. We illustrate Sugenos reasoning method by the following simple example
11

1 :

if x is BIG and y is SMALL then

z1 = x + y

also
2 :

if x is MEDIUM and y is BIG then z2 = 2x y

fact :

x0 is 3 and y0 is 2

conseq :

z0

Then according to the figure we see that


BIG(x0) = BIG(3) = 0.8,
SM ALL(y0) = SM ALL(2) = 0.2
therefore, the firing level of the first rule is
1 = min{BIG(x0), SM ALL(y0)}
= min{0.8, 0.2} = 0.2
and from
M EDIU M (x0) = M EDIU M (3) = 0.6,
BIG(y0) = BIG(2) = 0.9
it follows that the firing level of the second
rule is
2 = min{M EDIU M (x0), BIG(y0)}
12

= min{0.6, 0.9} = 0.6.


the individual rule outputs are computed as
z1 = x0 + y0 = 3 + 2 = 5, z2
= 2x0 y0 = 2 3 2 = 4
so the crisp control action is
z0 = (5 0.2 + 4 0.6)/(0.2 + 0.6) = 4.25.
1
0.8
0.2

1= 0.2

x+y=5

0.9
0.6

2=0.6
u

min

2x-y=4

Example of Sugenos inference mechanism.


Larsen. The fuzzy implication is modelled
13

by Larsens prduct operator and the sentence


connective also is interpreted as oring the
propositions and defined by max operator.
Let us denote i the firing level of the i-th
rule, i = 1, 2
1 = A1(x0) B1(y0),
2 = A2(x0) B2(y0).
Then membership function of the inferred
consequence C is pointwise given by
C(w) = (1C1(w)) (2C2(w)).
To obtain a deterministic control action, we
employ any defuzzification strategy.
If we have n rules in our rule-base then the
consequence C is computed as
n

C(w) = (iC1(w))
i=1

where i denotes the firing level of the i-th


rule, i = 1, . . . , n
14

A1

B2

A2

xo

C1

B1

C2

yo

w
min

Inference with Larsens product operation rule.


Simplified fuzzy reasoning
1 :
if x is A1 and y is B1 then z1 = c1
also
if x is A2 and y is B2 then z2 = c2
2 :
fact :
x is x0 and y is y0
consequence :
z0
The firing levels of the rules are computed
by
15

1 = A1(x0) B1(y0),
2 = A2(x0) B2(y0)
then the individual rule outputs are c1 and
c2, and the crisp control action is expressed
as
1c1 + 2c2
1 + 2
If we have n rules in our rule-base then the
crisp control action is computed as
n
ici
,
z0 = i=1
n
i=1 i
where i denotes the firing level of the i-th
rule, i = 1, . . . , n
z0 =

16

L1

H2

L3

1
c1

M1

M2

M3

2
c2

H1

H3

H2

3
min

17

z3

You might also like