0% found this document useful (0 votes)
42 views51 pages

Soft Computing Notes PDF

Uploaded by

220170147018
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)
42 views51 pages

Soft Computing Notes PDF

Uploaded by

220170147018
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

Soft Computing (CS361) Syllabus

Course No. Course Name L-T-P Credits Year of Introduction

CS361 SOFT COMPUTING 3-0-0-3 2015


Course Objectives
To introduce the concepts in Soft Computing such as Artificial Neural Networks, Fuzzy logic
based systems, genetic algorithm-based systems and their hybrids.

Syllabus
Introduction to Soft Computing, Artificial Neural Networks, Fuzzy Logic and Fuzzy systems,
Genetic Algorithms, hybrid systems.
Expected Outcome

Student is able to
1 Learn about soft computing techniques and their applications.
. Analyze various neural network architectures.
2 Define the fuzzy systems.
. Understand the genetic algorithm concepts and their applications.
3 Identify and select a suitable Soft Computing technology to solve the problem; construct a
. Solution and implement a Soft Computing solution.
4
Text Books
.
[Link] and [Link], Principles of soft computing-Wiley India.
51
Timothy J. Ross, Fuzzy Logic with engineering applications-Wiley India.
..
2
References
.
1. N. K. Sinha and M. M. Gupta, Soft Computing & Intelligent Systems: Theory &
Applications-Academic Press /Elsevier. 2009.
2. Simon Haykin, Neural Network- A Comprehensive Foundation- Prentice Hall International,
Inc.
3. R. Eberhart and Y. Shi, Computational Intelligence: Concepts to Implementation, Morgan
Kaufman/Elsevier, 2007.
4 Ross T.J. , Fuzzy Logic with Engineering Applications- McGraw Hill.
. Driankov D., Hellendoorn H. and Reinfrank M., An Introduction to Fuzzy Control- Narosa
5 Pub.
.6 Bart Kosko, Neural Network and Fuzzy Systems- Prentice Hall, Inc., Englewood Cliffs
. Goldberg D.E., Genetic Algorithms in Search, Optimization, and Machine Learning
7 AddisonWesley.
.

Department of CSE, ICET 3


Soft Computing (CS361) Syllabus

Course Plan
[Link]
Module Contents Hours
Marks%
Introduction to Soft Computing
Artificial neural networks - biological neurons, Basic models
I of artificial neural networks – Connections, Learning, 08 15%

Activation Functions, McCulloch and Pitts Neuron, Hebb

network.

Perceptron networks – Learning rule – Training and testing


algorithm, Adaptive Linear Neuron, Back propagation
II Network – Architecture, Training algorithm. 08 15%

FIRST INTERNAL EXAM

Fuzzy logic - fuzzy sets - properties - operations on fuzzy


III 07 15%
sets, fuzzy relations - operations on fuzzy relations.

Fuzzy membership functions, fuzzification, Methods of

IV membership value assignments – intuition – inference – 07 15%


rank ordering, Lambda –cuts for fuzzy sets, Defuzzification

methods.
SECOND INTERNAL EXAM
Truth values and Tables in Fuzzy Logic, Fuzzy propositions,

Formation of fuzzy rules - Decomposition of rules –


V 08 20%
Aggregation of rules, Fuzzy Inference Systems - Mamdani

and Sugeno types, Neuro-fuzzy hybrid systems –

characteristics – classification.

Introduction to genetic algorithm, operators in genetic


algorithm - coding - selection - cross over – mutation,
VI 08 20%
Stopping condition for genetic algorithm flow, Genetic

neuro systems, Genetic-Fuzzy rule based system.


hybrid
END SEMESTER EXAMINATION

Department of CSE, ICET 4


Soft Computing (CS361) Module 3

Module – 3

• Fuzzy logic
• Fuzzy sets
o Properties
o Operations on fuzzy sets

• Fuzzy relations
o Operations on fuzzy relations

Department of CSE , ICET


Soft Computing (CS361) Module 3

2.13 Fuzzy logic

Imprecise and vague data Decisions


Fuzzy Logic System

Figure 3.1: A fuzzy logic system accepting imprecise data and providing a decision

In 1965 Lotfi Zadeh, published his famous paper “Fuzzy sets”. This new logic for
representing and manipulating fuzzy terms was called fuzzy logic, and Zadeh
became the Master/Father of fuzzy logic.

Fuzzy logic is the logic underlying approximate, rather than exact, modes of reasoning. It
operates on the concept of membership. The membership was extended to possess various
"degrees of membership" on the real continuous interval [0, l].

In fuzzy systems, values are indicated by a number (called a truth value) ranging from 0 to
where 0.0 represents absolute falseness and 1.0 represents absolute truth.

Figure 3.2: (a) Boolean Logic (b) Multi-valued Logic

2.14 Classical sets(Crisp sets)

A classical set is a collection of objects with certain characteristics. For example, the
user may define a classical set of negative integers, a set of persons with height less
than 6 feet, and a set of students with passing grades. Each individual entity in a set is
called a member or an element of the set.

There are several ways for defining a set. A set may be defined using one of the following:

1. The list of all the members of a set may be given.


Example A= {2,4,6,8,10} (Roaster form)
2. The properties of the set elements may be specified.
Example A = {x|x is prime number < 20} (Set builder form)
3. The formula for the definition of a set may be mentioned. Example
Department of CSE, ICET 50
Soft Computing (CS361) Module 3

xi+1
A={xi= 5 ,i=1 to 10, where xi=1}
4. The set may be defined onthebasisofthe resultsof a logical operation.
Example A = {x|x is an element belonging to P AND Q} There exists a membership
5. function, which may also be used to define a set. The membership is denoted by
the letter 𝜒 and the membership function for a set A is given by (for all values of x).

1, 𝑖𝑓 𝑥∈𝐴
𝜒𝐴(𝑥) = {
0, 𝑖𝑓 𝑥∉𝐴
The set with no elements is defined as an empty set or nullset. It is denoted by symbol Ø.
The set which consist of all possible subsetofa given setAis called power set

𝑃(𝐴)= {𝑥|𝑥 ⊆𝐴}

2.14.1 Properties

1. Commutativity

𝐴∪𝐵=𝐵∪𝐴; 𝐴∩𝐵=𝐵∩𝐴
2. Associativity

𝐴∪(𝐵∪𝐶)=(𝐴∪𝐵)∪𝐶; 𝐴∩(𝐵∩𝐶)=(𝐴∩𝐵)∩𝐶
3. Distributivity

𝐴∪(𝐵∩𝐶)=(𝐴∪𝐵)∩(𝐴∪𝐶)
𝐴∩(𝐵∪𝐶)=(𝐴∩𝐵)∪(𝐴∩𝐶)
4. Idempotency

𝐴∪𝐴=𝐴; 𝐴∩𝐴=𝐴
5. Transitivity

𝐼𝑓 𝐴⊆𝐵 ⊆𝐶,𝑡ℎ𝑒𝑛 𝐴⊆𝐶


6. Identity

𝐴∪∅=𝐴, 𝐴∩∅=∅
𝐴∪𝑋=𝑋, 𝐴∩𝑋=𝐴
7. Involution (double negation)

?̿?̿=𝐴
8. Law of excluded middle
𝐴∪?̅?̅=𝑋

Department of CSE, ICET 51


Soft Computing (CS361) Module 3

9. Law of contradiction
𝐴∩?̅?̅=∅
10. DeMorgans law
|𝐴̅̅̅̅̅∩̅̅̅𝐵̅̅|=?̅?̅∪?̅?̅; |𝐴̅̅̅̅̅∪̅̅̅𝐵̅̅|=?̅?̅∩?̅?̅;

2.14.2 Operations on Classical sets

1. Union

The union between two sets gives all those elements in the universe that belong
to either set A or set B or both sets A and B. The union operation can be termed
as a logical OR operation. The union of two sets A and B is given as

𝐴∪𝐵={𝑥|𝑥 ∈𝐴 𝑜𝑟 𝑥∈𝑏}

The union of sets


A andB is illustrated by the Venn diagramshown below

Figure 3.3: Union of two sets

2. Intersection

The intersection between two sets represents all those elements in the universe
that simultaneously belong to both the sets. The intersection operation can be
termed as a logical AND operation. The intersection of sets A and B is given by

𝐴∩𝐵={𝑥|𝑥 ∈𝐴 𝑎𝑛𝑑 𝑥∈𝑏}

The intersection of sets


A andB is illustrated by the Venn diagram shown below

Figure 3.4: Intersection of two sets

Department of CSE, ICET 52


Soft Computing (CS361) Module 3

3. Complement

The complement of set A is defined as the collection of all elements in universe


X that do not reside in set A, i.e., the entities that do not belong to A. It is
denoted by A and is defined as

?̅?̅={𝑥|𝑥 ∉𝐴,𝑥∈𝑋}

where X is the universal set and A is a given set formed from universe X. The
complement operation of set A is show below

Figure 3.5: Complement of set A

4. Difference (Subtraction)

The difference of set A with respect to ser B is the collection of all elements
in the universe that belong to A but do not belong to B , i . e ., the difference
set consists of all elements that belong to A bur do not belong to B . It is
denoted by A l B or A - B and is given by

𝐴|𝐵 𝑜𝑟 (𝐴−𝐵)= {𝑥|𝑥 ∈𝐴 𝑎𝑛𝑑 𝑥 ∉𝐵}= 𝐴−(𝐴∩𝐵)

The vice versa of it also can be performed

𝐵|𝐴 𝑜𝑟 (𝐵−𝐴)= 𝐵−(𝐵∩𝐴)={𝑥|𝑥 ∈𝐵 𝑎𝑛𝑑 𝑥 ∉𝐴}

The above operations are shown below

(A) (B)
Figure 3.6: (A) DifferenceA|Bor(A-B);(B) Difference B|A or (B-A)

Department of CSE, ICET 53


Soft Computing (CS361) Module 3

2.14.3 Function Mapping of Classical Sets

Mapping is a rule of correspondence between set-theoretic forms and function


theoretic forms. A classical set is represented by its characteristic function 𝜒𝐴(𝑥)
where x is the
element in the universe.
Now consider X and Y as two different universes of discourse. If an element x contained i
X corresponds to an element y in Y. it is called mapping from X to Y, i.e., f: X →Y. On the
basis of this mapping, the characteristics function is defined as

1, 𝑥∈
𝜒𝐴(𝑥) = { 𝐴
0, 𝑥∉
𝐴
where 𝜒𝐴 is the membership in set A for element x in the universe. The membership
concept represents mapping from an element x in universe X to one of the two
elements in universe
Y (either to element 0 or 1).
Let A and B be two sets in universe X. The function-theoretic forms of operations perform
between these two sets are given as follows:

1. Union

𝜒𝐴∪𝐵 (𝑥) = 𝜒 𝐴(𝑥)∨𝜒𝐵(𝑥)=𝑚𝑎𝑥[𝜒𝐴(𝑥),𝜒𝐵(𝑥)]

where∨ indicates max operator.

2. Intersection

𝜒𝐴∩𝐵 (𝑥) = 𝜒 𝐴(𝑥)∧𝜒𝐵(𝑥)=𝑚𝑖𝑛[𝜒𝐴(𝑥),𝜒𝐵(𝑥)]

where∧ indicates min operator.

3. Complement

𝜒?̅?̅(𝑥)=1−𝜒𝐴(𝑥)

2.15 Fuzzy sets

A fuzzy set 𝐴 in the universe of discourse U can be definedas


~

𝐴= {(𝑥, µ (𝑥)) | 𝑥 ∈𝑋}


~ 𝐴
~

Department of CSE, ICET 54


Soft Computing (CS361) Module 3

where µ(𝑥) is the degree of membership of x in 𝐴 and it indicates the degree that x belongs to
𝐴
~ ~
𝐴 . In the fuzzy theory, fuzzy set A of universe X is defined by function µ(𝑥) called the
~ 𝐴
~
membership function of set A.
µ(𝑥): X
𝐴
→ [0, 1], where µ(𝑥) = 1
𝐴
if x is totally in A;
~ ~

µ(𝑥) = 0 if x is not in A;
𝐴
~

0 < µ(𝑥) < 1 if x is partly in A.


𝐴
~

This set allows a continuum of possible choices. For any element x of universe X, membersh
function A(x) equals the degree to which x is an element of set A. This degree, a value
between 0 and 1, represents the degree of membership, also called membership value, of
element x in set A.

Figure 3.7: Boundary region of a fuzzy set

From figure 3.7 it can be noted that "a" is clearly a member of fuzzy set P, "c" is clearly
not a member of fuzzy set P and the membership of "b" is found to be vague. Hence "a"
can take membership value 1, "c" can take membership value 0 and "b" can take
membership value between 0 and 1 [0 to 1], say 0.4, 0.7, etc. This is said to be a
partial membership of fuzzy set P.
There are other ways of representation of fuzzy sets; all representations allow partial
membership to be expressed. When the universe of discourse U is discrete and finite, fu
set 𝐴 is given as follows:
~

𝑛
µ(𝑥)
𝐴 1 µ(𝑥)
𝐴 2 µ(𝑥)
𝐴 3 µ𝐴(𝑥𝑖)
𝐴={~ 1 +~ +~ +⋯}= {∑~ }
~ 𝑥 𝑥2 𝑥3 𝑥𝑖
𝑖=1

Department of CSE, ICET 55


Soft Computing (CS361) Module 3

2.15.1 Properties

Fuzzy sets follow the same properties as crisp sets except for the law of excluded middle
and law of contradiction.

That is, for fuzzy set 𝐴


~

𝐴∪𝐴=𝑈; 𝐴∩𝐴=∅
~ ~ ~ ~

1. Commutativity

𝐴∪𝐵=𝐵∪𝐴; 𝐴∩𝐵=𝐵∩𝐴
~ ~ ~ ~ ~ ~ ~ ~
2. Associativity

𝐴∪(𝐵∪𝐶)=(𝐴∪𝐵)∪𝐶
~ ~ ~ ~ ~ ~

𝐴∩(𝐵∩𝐶)=(𝐴∩𝐵)∩𝐶
~ ~ ~ ~ ~ ~
3. Distributivity

𝐴∪(𝐵∩𝐶)=(𝐴∪𝐵)∩(𝐴∪𝐶)
~ ~ ~ ~ ~ ~ ~

𝐴∩(𝐵∪𝐶)=(𝐴∩𝐵)∪(𝐴∩𝐶)
~ ~ ~ ~ ~ ~ ~
4. Idempotency

𝐴∪𝐴=𝐴; 𝐴∩𝐴=𝐴
~ ~ ~ ~ ~ ~

5. Transitivity

𝐼𝑓 𝐴⊆𝐵⊆𝐶,𝑡ℎ𝑒𝑛 𝐴⊆𝐶
~ ~ ~ ~ ~
6. Identity

𝐴∪∅=𝐴 𝑎𝑛𝑑 𝐴∪𝑈=𝑈


~ ~ ~
𝐴∩∅=∅ 𝑎𝑛𝑑 𝐴∩𝑈=𝐴
~ ~ ~
7. Involution (double negation)

𝐴=𝐴
~ ~
8. DeMorgans law

|𝐴∩̅̅̅𝐵|=𝐴∪𝐵; |𝐴∪̅̅̅𝐵|=𝐴∩𝐵;
~ ~ ~ ~ ~ ~ ~ ~

Department of CSE, ICET 56


Soft Computing (CS361) Module 3

2.15.2 Operations on fuzzy sets

1. Union

𝐴 and 𝐵, denoted by 𝐴
The union of fuzzy sets
~ ~ ~
∪𝐵is defined as
~

𝜇𝐴∪𝐵 (𝑥) = 𝑚𝑎𝑥[µ 𝐴(𝑥),µ𝐵(𝑥)]=µ𝐴(𝑥)∨µ𝐵(𝑥) 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑥∈𝑈


~ ~ ~ ~ ~ ~

where∨ indicates max operator. The Venn diagram for union operation of fuzzy set
𝐴and𝐵 is shown below figure.
~ ~

Figure 3.8: Union of fuzzy sets𝐴 and 𝐵


~ ~
2. Intersection

𝐴 and 𝐵, denoted by 𝐴
The union of fuzzy sets
~ ~ ~
∩𝐵, is defined as
~

𝜇𝐴∩𝐵(𝑥)=𝑚𝑖𝑛[µ𝐴(𝑥),µ𝐵(𝑥)]=µ𝐴(𝑥)∧µ𝐵(𝑥) 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑥∈𝑈


~ ~ ~ ~ ~ ~

where∧ indicates min operator. The Venn diagram for intersection operation of fuzzy
sets 𝐴and 𝐵is shown below figure.
~ ~

𝐴and 𝐵
Figure 3.9: Intersection of fuzzy sets
~
~

Department of CSE, ICET 57


Soft Computing (CS361) Module 3

3. Complement

Whenµ𝐴(𝑥) ∈[0,1] , the complement𝐴of, denoted as is


?̅?̅defined by,
~ ~

𝜇𝐴̅(𝑥)=1−µ𝐴(𝑥) 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑥∈𝑈


~ ~

𝐴 is
The Venn diagram for complement operation of fuzzy shown below figure.
set
~

Figure 3.10: Complement of fuzzy set


𝐴
~

4. More Operations on Fuzzy Sets


a. Algebraic sum

The algebraic sum (𝐴+𝐵 ) of fuzzy sets, fuzzy sets 𝐴𝑎𝑛𝑑 𝐵isdefined as
~ ~ ~ ~

𝜇𝐴+𝐵(𝑥)=µ𝐴(𝑥)+µ𝐵(𝑥)− µ𝐴(𝑥).µ𝐵(𝑥)
~ ~ ~ ~ ~ ~

b. Algebraic product

The algebraic product


(𝐴.𝐵 ) of fuzzy sets, fuzzy sets
𝐴 𝑎𝑛𝑑 𝐵 is defined as
~ ~ ~ ~

𝜇𝐴.𝐵 (𝑥)= µ 𝐴(𝑥).µ𝐵(𝑥)


~ ~
~~
c. Bounded sum
The bounded sum
(𝐴
~
⊕𝐵 ) of fuzzy sets, fuzzy sets 𝐴 𝑎𝑛𝑑 𝐵
~ ~ ~
is defined as

𝜇𝐴⊕𝐵(𝑥)=min {1,µ𝐴(𝑥)+µ𝐵(𝑥)}
~ ~ ~ ~

d. Bounded difference

The bounded difference(𝐴


~
⊙𝐵 ) of fuzzy sets, fuzzy sets 𝐴 𝑎𝑛𝑑 𝐵is defined as
~ ~ ~

𝜇𝐴⊙𝐵(𝑥)=max {0,µ𝐴(𝑥)−µ𝐵(𝑥)}
~ ~ ~ ~

Department of CSE, ICET 58


Soft Computing (CS361) Module 3

2.16 Classical relations

A classical binary relation represents the presence or absence of a connection or interact


between the elements of two sets.

• Cartesian Product of Relation

An ordered r-tuple is an ordered sequence of r-elements expressed in the form


(a1, a2, a3, ... , ar). An unordered tuple is a collection of r-elements without any
restrictions in order. For r = 2, the r-tuple is called an ordered pair. For crisp sets A1,
A2, ... , Ar, the set of all r-tuples (a1, a2, a3, ... , ar), where a1 ∈ A1, a2 ∈ A2 ... , ar
∈ Ar is called me Cartesian product of A1,A2 .. ,Ar and is denoted by A1 x A2 x ... x
Ar.
Consider two universes X and Y; their Cartesian product XxY is given by

𝑋×𝑌={(𝑥,𝑦)| 𝑥∈𝑋,𝑦∈𝑌}

Here the Cartesian product forms an ordered pair of every𝑥 ∈𝑋 with every 𝑦∈𝑌.
Every element in X is completely related to every element inY. The characteristic
function, denoted by χ, gives the strength of the relationship betweenordered
pair of elements in each universe. If it takes unity as its value, then complete
relationship is found; if the value is zero, then there is no relationship, i.e.,

1, (𝑥,𝑦)∈𝑋×𝑌
𝜒𝑋×𝑌 (𝑥,𝑦) = { (𝑥,𝑦)∉𝑋×𝑌
0,

When the universes or sets are finite, then the relation is represented by a
matrix called relation matrix. An r-dimensional relation matrix represents an
r-ary relation. Thus, binary relations are represented by two-dimensional
matrices.
Consider the elements defined in the universes X and Y as follows:

X={2,4,6} Y= {p,q,r}

The Cartesian product of these two sets leads to

X × Y= {(p, 2), (p, 4), (p, 6), (q, 2), (q, 4), (q, 6), (r, 2), (r, 4), (r, 6)}

From this set one may select a subset such that

R= {(p, 2), (q, 4), (r, 4), (r, 6)}


Department of CSE, ICET 59
Soft Computing (CS361) Module 3

SubsetR can be represented using a coordinate diagram as shown in below figure

Figure 3.11: Coordinate diagram of a relation

The relation could equivalently be represented using a matrix as follows

R P Q R
2 1 0 0
4 0 1 1
6 0 0 1

The relation between sets X and Y may also be expressed by mapping representations
shown in below figure.

Figure 3.12: Mapping representation of a relation

A binary relation in which each element from set Xisnot mapped to more than one elemen
in second set Y is called a function and is expressedas

𝑅:𝑋→𝑌

The characteristic function is used to assign valuesofrelationship in the mapping of the


Cartesian space X × Y to the binary values (0, 1) andisgiven by

Department of CSE, ICET 60


Soft Computing (CS361) Module 3

1, (𝑥, 𝑦) ∈ 𝑅
𝜒𝑅(𝑥, 𝑦) = {
0, (𝑥, 𝑦) ∉ 𝑅

The figure 3.12 (A) and (B) show the illustration𝑅:𝑋→𝑌


of

(A) (B)

Figure 3.13: Illustration of 𝑹:𝑿→𝒀

The constrained Cartesian product for sets when r = 2 ( i . e ., A × A = A2) is called


identity relation , and the unconstrained Cartesian product for sets when r = 2
is called universal relation .

Consider set A= {2,4,6}.

Then universal relation (UA) and identity relation (IA) are given as follows:

UA = {(2,2),(2,4),(2,6),(4,2),(4,4),(4,6),(2,6),(4,6),(6,6)}

IA = {(2,2),(4,4),(6,6)}

• Cardinality of Classical Relation

Consider n elements of the universe X being related to m elements of universe Y.


When the cardinality of X= 𝑛𝑋 and the cardinality of Y =𝑛𝑌 , then the cardinality of
relation R between
the two universe is
𝑛𝑋×𝑌 =𝑛𝑋×𝑛𝑌

The cardinality of the power set P×(XY) describingthe relation is given by

𝑛𝑃(𝑋 ×𝑌 ) = 2 (𝑛 𝑋 𝑛 𝑌 )

Department of CSE, ICET 61


Soft Computing (CS361) Module 3

2.16.1 Operations on classical relations

Let R and S be two separate relations on the Cartesian universe X ×Y. The null
relation and the complete relation are defined by the relation matrices ØR and ER.
An example of a 3 X 3 form of the ØR and ER matrices is given below:

0 0 0 1 1 1
and
∅𝑅 = [0 0 0] 𝐸𝑅 = [1 1 1]
0 0 0 1 1 1

1. Union

R ∪ S → χR∪S (x, y): χR∪S (x, y) = max[χ R(x,y),χS(x,y)]


2. Intersection

R∩S→χR∩S(x,y):χR∩S(x,y)=min[χR(x,y),χS(x,y)]
3. Complement
R̅̅ →χR̅ ̅(x,y)∶ χR̅ ̅(x,y)=1−χR̅ ̅(x,y)
4. Containment

R⊂S→χR(x,y):χR(x,y)≤χS(x,y)
5. Identity

∅→∅R and X→ER

• Composition of Classical Relations

Let R be a relation that maps elements from universe X to universe an e a relation that ma
elements from universe Y to universe Z

𝑅⊆𝑋×𝑌 𝑎𝑛𝑑 𝑆⊆𝑌×𝑍

The composition operations are of two types:

1. Max-min composition
The max-min composition is defined by the function theoretic expression as

𝑇=𝑅∘𝑆
𝜒𝑇(𝑥,𝑧)= ⋁𝑦∈𝑌[χR(x,y) ∧ χS(y,z)]

2. Max-product composition
The max-product composition is defined by the function theoretic expression as

Department of CSE, ICET 62


Soft Computing (CS361) Module 3

𝑇=𝑅∘𝑆
𝜒𝑇(𝑥,𝑧)= ⋁𝑦∈𝑌[χR(x,y) . χS(y,z)]

2.17 Fuzzy relations

A fuzzy relation is a fuzzy set defined on the Cartesian product of classical sets {XI, X2,
... Xn} where tuples (x1, x2, xn) may have varying degrees of membership µR (x1,x2,
.. , xn) within the
relation.
𝑅(𝑋1,𝑋2,…,𝑋𝑛) = ∫ µ(𝑥1 𝑅 ,𝑥2,… , 𝑥𝑛)|(𝑥1,𝑥2,… , 𝑥𝑛), 𝑥𝑖 ∈ 𝑋𝑖
𝑋1 ,𝑋2 ,…,𝑋𝑛

A fuzzy relation between two sets X and Y is called binary fuzzy relation and is
denoted by R(X,Y). A binary relation R(X,Y) is referred to as bipartite graph when
X ≠Y. The binary relation on a single set X is called directed graph or digraph. This
relation occurs when X=Y and is denoted as R(X,X) or R(X2).

Let

𝑋
~
= {𝑥1 ,𝑥2,…,𝑥𝑛} 𝑎𝑛𝑑 𝑌
~
= {𝑦1 ,𝑦2,…,𝑦𝑛}

Fuzzy relation𝑅(𝑋,𝑌) canbe expressed by an n × m matrix as follows:


~ ~ ~

µ𝑅(𝑥1 ,𝑦1 µ𝑅(𝑥1 ,𝑦2) . . µ𝑅(𝑥1 , 𝑦𝑚 )


µ𝑅(𝑥2 ) µ𝑅(𝑥2 ,𝑦2) . . µ𝑅(𝑥2 , 𝑦𝑚 )
𝑅(𝑋,𝑌)= ,𝑦1 . . .
~ ~ ~
) . . .
[µ𝑅(𝑥𝑛,𝑦1) µ𝑅(𝑥𝑛,𝑦2) µ𝑅(𝑥𝑛, 𝑦𝑚 )]

2.17.1 Operations on fuzzy relations

1. Union

µ𝑅∪𝑆 (x, y) = max [µ 𝑅(x,y),µ𝑆(x,y)]


~ ~ ~ ~

2. Intersection

µ𝑅∩𝑆 (x, y) = min [µ 𝑅(x,y),µ𝑆(x,y)]


~ ~ ~ ~

Department of CSE, ICET 63


Soft Computing (CS361) Module 3

3. Complement

µ𝑅̅(x,y)=1− µ𝑅(x,y)
~ ~

4. Containment

𝑅⊂𝑆→µ𝑅(x,y)≤µ𝑆(x,y)
~ ~ ~ ~
5. Inverse
The inverse of a fuzzy relation R on X × Y is denoted by R-1. It is a relation on Y
× X
defined by 𝑅−1(𝑦,𝑥)=𝑅(𝑥,𝑦) for all pairs(𝑦,𝑥) ∈𝑌×𝑋.
6. Projection
For a fuzzy relation R(X,Y), let [𝑅 ↓𝑌] denote the projection of R onto Y[𝑅↓𝑌]
. Then

is a fuzzy relation in Y whose membershipfunction isdefined by

(𝑥,𝑦)=𝑚𝑎𝑥𝜇𝑅(𝑥,𝑦)
𝜇[𝑅↓𝑌] 𝑥 ~

• Fuzzy Composition

Let 𝐴 be a fuzzy set on universe X and 𝐵 be a fuzzy set on universe Y. The Cartesian
~ ~
product over 𝐴 and 𝐵 results in fuzzy relation 𝑅 and is contained within the entire
~ ~ ~
(complete) Cartesian space, i.e.,

𝐴×𝐵 = 𝑅
~ ~ ~

where

𝑅⊂𝑋×𝑌
~

The membership function of fuzzy relation is givenby

µ𝑅 (x,y)=µ 𝐴×𝐵 (x, y) = min [µ 𝐴(x),µ𝐵(y)]


~ ~ ~ ~ ~

There are two types of fuzzy composition techniques:

1. Fuzzy max-min composition

There also exists fuzzy min-max composition method, but the most
commonly used technique is fuzzy max-min composition. Let 𝑅 be fuzzy
~
relation
space 𝑋×𝑌on Cartesian
, and 𝑆 be fuzzy relation on Cartesian space𝑌×𝑍.
~

Department of CSE, ICET 64


Soft Computing (CS361) Module 3

The max-min composition of R(X,Y) and S(Y,Z), denoted by𝑅(𝑋,𝑌) ° 𝑆(𝑌,𝑍) is


defined by T(X,Z) as

µ𝑇(x,z)= µ𝑅°𝑆(x,z)=max{min[µ𝑅(x,y),µ𝑆(y,z)]}
~ ~~ y∈Y ~ ~

= ⋁𝑦∈𝑌[µ𝑅(x,y) ∧ µ𝑆(y,z)] ∀𝑥∈𝑋,𝑧∈𝑍


~
~

The min-max composition of R(X,Y) and S(Y,Z), denoted by


𝑅(𝑋,𝑌)°𝑆(𝑌,𝑍) is defined
by T(X,Z) as

µ𝑇(x,z)= µ𝑅°𝑆(x,z)=min{max[µ𝑅(x,y),µ𝑆(y,z)]}
~ ~~ y∈Y ~ ~

= ⋀𝑦∈𝑌[µ𝑅(x,y) ∨ µ𝑆(y,z)] ∀𝑥∈𝑋,𝑧∈𝑍


~ ~

From the above definition it can be noted that


̅̅𝑅̅̅̅(𝑋̅̅̅,̅̅̅𝑌̅̅̅)̅°̅̅𝑆̅̅̅(̅̅̅𝑌̅̅̅,𝑍̅̅̅)̅= 𝑅̅̅̅̅̅(𝑋̅̅̅̅,̅̅𝑌̅̅̅)̅°𝑆̅̅̅(̅̅𝑌̅̅̅,̅̅̅𝑍̅)̅

2. Fuzzy max-product composition


The max-product composition of R(X,Y) and S(Y,Z), denoted by𝑅(𝑋,𝑌)°𝑆(𝑌,𝑍) is
defined by T(X,Z) as

µ𝑇(x,z)= µ𝑅 ~. ~𝑆(x,z)=min[µR(x,y).µ𝑆(y,z)]
~ y∈Y ~ ~

= ⋁𝑦∈𝑌[µ𝑅(x,y).µ𝑆(y,z)]
~ ~

The properties of fuzzy composition can be givenasfollows:

𝑅 ° 𝑆≠ 𝑆 ° 𝑅
~ ~ ~ ~
−1
(𝑅 ° 𝑆) = 𝑆−1 ° 𝑅−1
~ ~ ~ ~

(𝑅 ° 𝑆)° 𝑀=𝑅° (𝑆 ° 𝑀)
~ ~ ~ ~ ~ ~

2.18 Advantages of Fuzzy logic

6. Mimicks human control logic.


7. Uses imprecise language.
8. Inherently robust.

Department of CSE, ICET 65


Soft Computing (CS361) Module 3

9. Fails safely.
10. Modified and tweaked easily.

2.19 Disadvantages of Fuzzy logic

3. Operator's experience required.


4. System complexity.

2.20 Applications of Fuzzy logic

8. Automobile and other vehicle subsystems, such as automatic transmissions, ABS and crui
control (e.g. Tokyo monorail).
9. Air conditioners. 10. Auto focus on cameras. 11. Digital image processing, such
as edge detection. 12. Rice cookers. 13. Dishwashers. 14. Elevators. 15. Washing
machines and other home appliances. 16. Video game artificial intelligence. 17.
Language filters on message boards and chat rooms for filtering out offensive
text. 18. Pattern recognition in Remote Sensing. 19. Fuzzy logic has also been
incorporated into some microcontrollers and microprocessors. 20. Bus Time
Tables. 21. Predicting genetic traits. (Genetic traits are a fuzzy situation for more
than one reason). 22. Temperature control (heating/cooling). 23. Medical
diagnoses. 24. Predicting travel time. 25. Antilock Braking System.

Department of CSE, ICET 66


4.1 Fuzzy membership functions

Membership function defines the fuzziness in a fuzzy set irrespective of the elements
in the set, which are discrete or continuous. A fuzzy set 𝐴 in the universe of discourse X
~
can
as a be
setdefined
of ordered pairs:

𝐴= {(𝑥,µ𝐴(𝑥)) | 𝑥 ∈𝑋}
~ ~

where µ𝐴(.) is called membership function


𝐴 .ofThe membership function µ𝐴(.) maps X to the
∶𝑋→𝑀. The membership value ranges in the interval [0, 1]
~ ~ ~

membership space M, ie., µ𝐴


~

the range of the membership function is a subset of the non-negative real numbers whose
supremum is finite.

The three main basic features involved in characterizing membership function are the follow

1. Core
The core of a membership function for some fuzzy set 𝐴 is defined as that region of
~
universe that is characterized by complete membership in the set 𝐴 . The core has elemen
~
of the universe such that

µ𝐴(𝑥)=1
~

The core of a fuzzy set may be an empty set.

2. Support
The support of a membership function for a fuzzy set 𝐴 is defined as that region of
~
universe that is characterized by a non zero membership in the set 𝐴 .
~

µ𝐴(𝑥)>0
~

µ𝐴(𝑥) = 1 is referred to as a fuzzy


A fuzzy set whose support is a single element in X with
~
singleton.

Department of CSE, ICET 68


3. Boundary
The support of a membership functions as the region of universe containing
elements that have a non zero but not complete membership. The boundary
comprises those elements of x of the universe such that

0<𝜇𝐴(𝑥)<1

The boundary elements are those which possess partial membership in the𝐴fuzzy
. set
~

Figure 4.1: Features of membership functions

A fuzzy set whose membership function has at least one element x in the universe
whose membership value is unity is called normal fuzzy set. The element for which the
membership is equal to 1 is called prototypical element. A fuzzy set where no
membership function has its value equal to 1 is called subnormal fuzzy set.

Figure 4.2: (A) Normal fuzzy set and (B) subnormal fuzzy set

A convex fuzzy set has a membership function whose membership values are strictly
monotonically increasing or strictly monotonically decreasing or strictly monotonically
Department of CSE, ICET 69
increasing than strictly monotonically decreasing with increasing elements in the
universe. A fuzzy set possessing characteristics opposite to that of convex fuzzy set
is called non convex fuzzy set.

Figure 4.3: (A) Convex normal fuzzy set and (B) Nonconvex normal fuzzy set

The convex normal fuzzy set can be defined in the following way. For elements x1, x2 and x3
a fuzzy set 𝐴 , if the following relation between x1, x2 and x3 holds. i.e.,
~

µ𝐴(𝑥2)≥min[µ𝐴(𝑥1),µ𝐴(𝑥3)]
~ ~ ~

The element in the universe for which a particular fuzzy set 𝐴 has its value equal to 0.5 is
~
called crossover point of a membership function. The membership value of a crossover poin
a fuzzy set is equal to 0.5, ie., µ𝐴(𝑥)=0.5. There can be more than one crossover point in a
~

fuzzy set. The maximum value of the membership function in a fuzzy set 𝐴 is called as th
~
height of the fuzzy set. For a normal fuzzy set, the height is equal to 1, because the maximu
value of the membership function allowed is 1. Thus, if the height of a fuzzy set is less than
then the fuzzy set is called subnormal fuzzy set.

Figure 4.4: Crossover point of a fuzzy set

Department of CSE, ICET 70


4.2 Fuzzification

It is the process of transforming crisp set to a fuzzy set or a fuzzy set to a fuzzifier set. For a

fuzzy set 𝐴= {(𝑥,µ𝐴(𝑥)) | 𝑥


~ ~
∈𝑋}, a common fuzzification algorithm is performed by
keeping 𝜇𝑖 constant and 𝑥𝑖 being transformed to a fuzzy set 𝑄(𝑥𝑖) depicting the expression
about 𝑥𝑖 . The fuzzy set 𝑄(𝑥𝑖)is referred to as the kernel of fuzzification. The fuzzified set 𝐴
~
can be expressed as

𝐴
~
= 𝜇1𝑄(𝑥1) + 𝜇2𝑄(𝑥2) + ⋯ + 𝜇𝑛 𝑄(𝑥𝑛)

where the symbol ~ means fuzzified. This process of fuzzification iscalled support fuzzificatio
(s-fuzzification). There is another method of fuzzification calledgrade fuzzification (g-
fuzzification) where xi is kept constant and µi is expressed as a fuzzy set. Thus, using the
methods, fuzzification is carried out.

4.3 Methods of membership value assignments

4.3.1 Intuition

Intuition method is based upon the common intelligence of [Link] is the


capacity of the human to develop membership functions on the basis of their
own intelligence and understanding capacity. There should be an in-depth
knowledge of the application to which membership value assignment as to be
made.
Figure 4.5 shows various shapes of weights of people measured in kilogram in the univer
Each curve is a membership function corresponding to various fuzzy (linguistic) variable
such as very lighter, light, normal, heavy and very heavy. The curves are based on cont
functions and the human developing them. For example, if the weights are referred to ra
of thin persons we get one set of curves, and if they are referred to range of normal weigh
persons we get another set and so on.

Department of CSE, ICET 71


Figure 4.5: Membership functionfor the fuzzy variable “weight”

4.3.2 Inference

The inference method uses knowledge to perform deductive reasoning.


Deduction achieves conclusion by means inference. There are various methods
for performing deductive reasoning. Here the knowledge of geometrical shapes
and geometry is used for defining membership values. The membership
functions may be defined by various shapes: triangular, trapezoidal, bell-
shaped, Gaussian and so on. The inference method here is discussed via
triangular shape.
Consider a triangle, where X,Y and Z are angles such that X ≥ Y ≥ Z ≥ 0, and let U be th
universe of triangles i.e.,

𝑈={(𝑋,𝑌,𝑍)| 𝑋≥𝑌≥𝑍≥0;𝑋+𝑌+𝑍=180}

There are various types of triangles available.

𝐼 = isosceles triangle (approximate)


~

𝐸 = equilateral triangle (approximate)


~

𝑅 = right-angle triangle (approximate)


~

𝐼𝑅 = isosceles and right-angle triangle (approximate)


~

𝑇= other triangles
~

Department of CSE, ICET 72


The membership values of approximate isosceles triangle is obtained using the follow
definition, where
𝑋≥𝑌≥𝑍≥0;𝑋+𝑌+𝑍=180 ○:
1
µ𝐼(𝑋,𝑌,𝑍)=1− 𝑚𝑖𝑛(𝑋−𝑌,𝑌−𝑍)
~ 60○
The membership value of approximate right-angle triangle is given by

1 ○
µ(𝑅𝑋,𝑌,𝑍)=1−
~
90○|𝑋−90|

Membership value of appropriate isosceles right angled triangle is obtained by


taking the logical intersection of the approximate isosceles and approximate
right-angle triangle membership function i.e.,

𝐼𝑅=𝐼∩𝑅
~ ~ ~

and it is given by

µ𝐼𝑅(𝑋,𝑌,𝑍)=𝑚𝑖𝑛[µ𝐼(𝑋,𝑌,𝑍),µ𝑅(𝑋,𝑌,𝑍)]
~ ~ ~

µ𝐼𝑅(𝑋, 𝑌, 𝑍) = 𝑚𝑖𝑛 [µ𝐼(𝑋, 𝑌, 𝑍),µ𝑅(𝑋, 𝑌, 𝑍)]


~ ~ ~
1 1
= 1 − 𝑚𝑎𝑥 [ 𝑚𝑖𝑛(𝑋 − 𝑌, 𝑌 − 𝑍), |𝑋 − 90○|]
60○ 90○

The membership function for a fuzzy equilateral triangle is given by

1
µ𝐸(𝑋,𝑌,𝑍)=1−
~ 180○|𝑋−𝑍|

𝑇, is the
The membership function of other triangles, denoted by complement of the logical
~
union of 𝐼,𝑅 𝑎𝑛𝑑 𝐸, i.e.
~ ~ ~

𝑇=𝐼∪𝑅∪𝐸
~ ~ ~ ~

By using De Morgans law, we get

𝑇=𝐼̅∩𝑅̅∩𝐸̅
~ ~ ~ ~

The membership value can be obtained using theequation

Department of CSE, ICET 73


µ𝑇(𝑋,𝑌,𝑍) = 𝑚𝑖𝑛 {1 − µ𝐼(𝑋,𝑌,𝑍), 1 − µ𝐸(𝑋, 𝑌, 𝑍), 1 − µ𝑅(𝑋, 𝑌, 𝑍)}
~ ~ ~ ~
1
= 𝑚𝑖𝑛{3(𝑋 − 𝑌),3(𝑌 − 𝑍), 2|𝑋 − 90○|,𝑋 − 𝑍}
180○

4.3.3 Rank ordering

The formation of government is based on the polling concept; to identify a best stude
ranking may be performed; to buy a car, one can ask for several opinions and so on.

4.4 Lambda –cuts for fuzzy sets

Consider a fuzzy set 𝐴 . The set 𝐴𝜆(0< 𝜆<1), called the lambda (𝜆 ) -cut (or alpha[𝛼] -cut)
~
set, is a crisp set of the fuzzy set and is defined as follows:

𝐴𝜆={(𝑥,𝜇𝐴(𝑥)≥𝜆)} 𝜆∈[0,1]
~

The set 𝐴𝜆 is called weak lambda-cut set if it consists of all theelements of a fuzzy set
whose membership function have values greater than or equal to thespecified
[Link]
called The setlambda
𝐴𝜆 is cutif it consistofall elements ofa fuzzy setwhose membership functions
have values strictlygreater thanaspecified value.A strong
𝜆 – cutsetis givenby

𝐴𝜆={(𝑥,𝜇𝐴(𝑥)>𝜆)} 𝜆∈[0,1]
~

The propertiesof
𝜆 cutareasfollows

1. (𝐴∪ 𝐵)= 𝐴λ∪𝐵λ


~ ~ λ

2. (𝐴∩ 𝐵)= 𝐴λ∩𝐵λ


~ ~ λ

3. (𝐴)≠(𝐴̅̅̅λ̅) 𝑒𝑥𝑐𝑒𝑝𝑡 𝑤ℎ𝑒𝑛 λ=0.5


~ λ
4. Forany 𝜆≤ β,where0 ≤β≤1,itistruethat
𝐴β⊆ 𝐴λ,𝑤ℎ𝑒𝑟𝑒 𝐴0=𝑋

Department of CSE, ICET 74


Figure 4.6: Two different𝜆 -cut sets for a continuous-valued fuzzy set

4.5 Defuzzification methods

Defuzzification is the process of conversion of a fuzzy quantity into a precise


quantity. The output of a fuzzy set process may be union of two or more fuzzy
membership functions defined on the universe of discourse of the output variable.

Figure 4.7: (A) First part of fuzzy output, (B) second part of fuzzy output (C) union of parts (A)and (B)

Department of CSE, ICET 75


Defuzzification methods include the following:

1. Max membership principle


2. Centroid method
3. Weighted average method
4. Mean-max membership
5. Center of sums
6. Center of largest area
7. First of maxima, last of maxima

4.5.1 Max-Membership Principle

This method is also known as height method and is limited to peak output functions. Th
method is given by the algebraic expression

𝜇𝑐(𝑥)≥𝜇𝑐(𝑥)
∗ 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑥∈𝑋
~ ~

The method is illustrated in below figure

Figure 4.8: Max-membership defuzzification method

4.5.2 Centroid method

This method is also known as center of mass, center of area or center of gravity method. I
the most commonly used defuzzification method. The defuzzified output x* is defined as

∫ 𝜇𝑐(𝑥). 𝑥𝑑𝑥
𝑥∗= ~

∫ 𝜇𝑐(𝑥)𝑑𝑥
~

Department of CSE, ICET 76


where the symbol ∫ denotes an algebraic integration. This method is illustrated in be
figure

Figure 4.9: Centroid defuzzification method

4.5.3 Weighted average method

This method is valid for symmetrical output membership functions only. Each members
is weighted by its maximum membership value. The output is given by,

∑ 𝜇𝑐~ (?̅?̅𝑖 ). ?̅?̅𝑖


𝑥∗=
∑ 𝜇𝑐(?̅?̅𝑖)
~

where ∑ denotes algebraic sum and ?̅?̅𝑖 is the maximum of the i th membership
function. The method is illustrated in figure 4.10, where two fuzzzy sets are
considered. From the figure
the defuzzified output is given by
0.5𝑎 + 0.8𝑏
𝑥∗=
0.5 + 0.8

Figure 4.10: Weighted average defuzzification method (two symmetrical functions)

Department of CSE, ICET 77


4.5.4 Mean-max membership

This method is also known as the middle of the maxima. This is closely related to
method, except that the locations of the maximum membership can be
nonunique. The output here is given by


∑𝑛
𝑖=1?̅?̅𝑖
𝑥 =
𝑛
The method is illustrated in figure 4.11, where two fuzzzy sets are considered. From th
figure the defuzzified output is given by

𝑎+𝑏
𝑥∗= 2

Figure 4.11: Mean-max defuzzification method

4.5.5 Center of sums

This method employs sum of the individual fuzzy subsets instead of their union.
The calculations here are very fast, bur the main drawback is that intersecting areas
are added twice. The defuzzified value x* is given by

∫ 𝑥 ∑ 𝑛𝑖=1 𝜇𝑐(𝑥)𝑑𝑥
~
𝑥∗ =
∫ 𝑥𝑥 ∑ 𝑛 𝜇 𝑐(𝑥)𝑑𝑥
𝑖=1 ~

Figure 4.12 illustrates the center of sums method. In center of sums method, the
weights are the areas of the respective membership functions, whereas in the
weighted average method the weights are individual membership values.

Department of CSE, ICET 78


Figure 4.12: (A) First and (B) second membership functions, (C) defuzzification

4.5.6 Center of largest area

This method is adopted when the output consist of atleast two convex fuzzy
subsets which are not overlapping. The output is biased towards a side of one
membership function. When the output of fuzzy set has atleast two convex
regions, then the center of gravity of the convex fuzzy sub region having the
largest area is to obtain the defuzzified value x*.
∫ 𝜇𝑐𝑖(𝑥). 𝑥𝑑𝑥
𝑥∗= ~

∫ 𝜇𝑐𝑖(𝑥)𝑑𝑥
~

where 𝑐𝑖 is the convex subregion that has the largest area making up𝑐𝑖 . Figure 4.13
~ ~
illustrates the center of largest area.

Department of CSE, ICET 79


Figure 4.13: Center of largest area method

4.5.7 First of maxima, last of maxima

This method uses the overall output or union of all individual output fuzzy set 𝑐𝑖 for
~
determining the smallest value of the domain with maximized membership in 𝑐𝑗· The ste
~
used for obtaining x* are:

1. Initially, the maximum height in the union is found:

ℎ𝑔𝑡 (𝑐𝑖) = sup 𝜇𝑐~𝑖 (𝑥)


~ 𝑥∈𝑋
where sup is the supremum that is the least upper bound.

2. Then the first of maxima is found:

𝑥∗ = inf [𝑥 ∈ 𝑋|𝜇𝑐~𝑖 (𝑥)=ℎ𝑔𝑡(𝑐𝑖)]


𝑥∈𝑋 ~
where inf is the infimum that is the greatest lower bound.

3. After this the last maxima is found:

𝑥∗ = 𝑠𝑢𝑝 [𝑥 ∈ 𝑋|𝜇𝑐 𝑖 (𝑥)=ℎ𝑔𝑡(𝑐𝑖)]


𝑥∈𝑋 ~ ~

Department of CSE, ICET 80


Figure 4.14: First of maxima (last of maxima) method

Department of CSE, ICET 81


Soft Computing (CS361) Module 5

Module – 5

• Truth values and Tables in Fuzzy Logic


• Fuzzy propositions
• Formation of fuzzy rules
• Decomposition of rules
• Aggregation of rules
• Fuzzy Inference Systems
o Mamdani types
Sugeno
o types
• Neuro-fuzzy hybrid systems
• Characteristics
• Classification

Department of CSE ,ICET


5.1 Truth values and Tables in Fuzzy Logic

Fuzzy logic uses linguistic variables. The values of a linguistic variable are words or
sentences in a natural or artificial language. For example, height is a linguistic
variable if it takes values such as tall, medium, short and so on. Consider the
statement “John is tall” implies that the linguistic variable John takes the linguistic
value tall. The linguistic variable provides approximate characterization of a complex
problem. The name of the variable, the universe of discourse and a fuzzy subset of
universe of discourse characterize a fuzzy variable. The range of possible values of a
linguistic variable represents the universe of discourse of that variable. For example,
the universe of discourse of the linguistic variable speed might have the range
between 0 and 220 km/h and may include such fuzzy subsets as very slow, slow,
medium, fast, and very fast.
A linguistic variable is a variable of a higher order than a fuzzy variable and its values are
taken to be fuzzy variables. A linguistic variable is characterized by

1. name of the variable (x);


2. term set of the variable t (x);
3. syntactic rule for generating the values of x;
4. semantic rule for associating each value of x with its meaning.

A linguistic variable carries with it the concept of fuzzy set qualifiers, called hedges. Hedges
are terms that modify the shape of fuzzy sets. In the fuzzy set "very tall", the word "very" is a
linguistic hedge. A few popular linguistic hedges include: very, highly, slightly, moderatel
plus, minus, fairly, rather.

Department of CSE, ICET 83


Table 5.1: Table showing the mathematical and graphical representation of Hedges

If it is not take the complement of membership value. For example not very short then ta
the complement of very short.

Truth tables define logic functions of two propositions. Let X and Y be two propositions
either of which can be true or false. The basic logic operations performed over the
propositions are the following:

1. Conjunction (∧): X AND Y.


2. Disjunction (∨): XOR Y.
3. Implication or conditional (=>): IF X THEN Y.
4. Bidirectional or equivalence (<=> ): X IF AND ONLY IF Y.

On the basis of these operations on propositions, inference rules can be formulated. Few
inference rules are as follows:

[𝑋 ∧ (𝑋 =>𝑌)] => 𝑌
[?̅?̅∧(𝑋=>𝑌)]=>?̅?̅
[(𝑋 =>𝑌) ∧ (𝑌 =>𝑍)] => (𝑋 =>𝑍)

The above rules produce certain propositions that are always true irrespective of the tr
values of propositions X and Y. Such propositions are called tautologies.

The truth values of propositions in fuzzy logic are allowed to range over the unit interval [
1]. The truth value of the proposition '' Z is A," or simply the truth value of A, denoted by

Department of CSE, ICET 84


tv(A) is defined by a point in [0, 1] (called the numerical truth value} or a fuzzy set in [0
(called the linguistic truth value).

𝑡𝑣(𝑋 𝐴𝑁𝐷 𝑌)=𝑡𝑣(𝑋)∧𝑡𝑣(𝑌)=𝑚𝑖𝑛{𝑡𝑣(𝑋),𝑡𝑣(𝑌)} (𝐼𝑛𝑡𝑒𝑟𝑠𝑒𝑐𝑡𝑖𝑜𝑛)


𝑡𝑣(𝑋 𝑂𝑅 𝑌)=𝑡𝑣(𝑋)∨𝑡𝑣(𝑌)=𝑚𝑎𝑥{𝑡𝑣(𝑋),𝑡𝑣(𝑌)} (𝑈𝑛𝑖𝑜𝑛)
𝑡𝑣(𝑁𝑂𝑇 𝑋)=1−𝑡𝑣(𝑋) (𝐶𝑜𝑚𝑝𝑙𝑒𝑚𝑒𝑛𝑡)
𝑡𝑣(𝑋=>𝑌)=𝑡𝑣(𝑋)=>𝑡𝑣(𝑌)=𝑚𝑎𝑥{1−𝑡𝑣(𝑋),𝑚𝑖𝑛[𝑡𝑣(𝑋),𝑡𝑣(𝑌)]}

5.2 Fuzzy propositions

1. Fuzzy predicates
In fuzzy logic thepredicates can be fuzzy, for example, tall, short, quick. Hence,
we have proposition like "Peter is tall." It is obvious that most of the predicates in
natural language are fuzzy rather than crisp.

2. Fuzzy-predicate modifiers
In fuzzy logic, there existsa wide range of predicate modifiers that act as
hedges, for example, very, fairly, moderately, rather, slightly. These
predicate modifiers are necessary for generating the values of a linguistic
variable. An example can be the proposition "Climate is moderately cool,"
where "moderately" is the fuzzy predicate modifier.
[Link] quantifiers: The fuzzy quantifiers such as most, several, many, frequently are use
in fuzzy logic. Employing these we can have proposition like "Many people are educated
A fuzzy quantifier can be interpreted as a fuzzy number or a fuzzy proposition.

4. Fuzzy qualifiers: There are four modes of qualification in fuzzy logic, which are as
follows:

• Fuzzy truth qualification

It is expressed as "x is τ," in which τ is a fuzzy truth value. A fuzzy truth value claims
the degree of truth of a fuzzy proposition. Consider the example,

(Paul is Young) is NOT VERY True.

Here the qualified proposition is (Paul is Young) and the qualifying fuzzy truth value is
"NOT Very True."

Department of CSE, ICET 85


• Fuzzy probability qualification

It is denoted as "x is 𝜆," where 𝜆 is fuzzy probability. In conventional logic,


probability is either numerical or an interval. In fuzzy logic, fuzzy probability is
expressed by terms such as likely, very likely, unlikely, around and so on.
Consider the example,
(Paul is Young) is Likely.

Here qualifying fuzzy probability is "Likely." These probabilities may be interpreted as


fuzzy numbers, which may be manipulated using fuzzy arithmetic.

• Fuzzy possibility qualification

It is expressed as "x is π," where π is a fuzzy possibility and can be of the


following forms: possible, quire possible, almost impossible. These values
can be interpreted as labels of fuzzy subsets of the real line. Consider the
example,
(Paul is Young) is Almost Impossible.

Here the qualifying fuzzy possibility is "Almost Impossible."

• Fuzzy usuality qualification


It is expressed as "usually (X)=usually (X is F)," in which the subject X is a
variable raking values in a universe ofdiscourse U and the predicate F is a
fuzzy subset of U and interpreted as a usual value ofXdenoted by U(X) = F. The
propositions that are usually true or the events that have highprobability of
occurrence are related by the concept of usuality qualification.

5.3 Formation of fuzzy rules

The general way of representing human knowledge is by forming natural language express
given by

IF antecedant THEN consequent.

The above expression is referred to as the IF- THEN rule based form. There are three gene
forms that exist for any linguistic variable. They are: (a) assignment statements; (b) conditio
statements; (c) unconditional statements.

Department of CSE, ICET 86


1. Assignment statementsThey
: are of the form
y =small
Orange color = orange
a=s
Paul is not tall and not very short
Climate = autumn
Outside temperature = normal
These statements utilize "=" for assignment.

2. Conditional statements
The following are some examples.
IF y is very cool THEN stop.
IF A is high THEN B is low ELSE B is not low.
IF temperature is high THEN climate is hot.
The conditional statements use the "[Link]" rule-based form.

3. Unconditional statements
They can be ofthe form

Goto sum.
Stop.
Divide by a.
Turn the pressure low.

5.4 Decomposition of rules (Compound Rules)

A compound rule is a collection of many simple rules combined together. Any


compound rule structure may be decomposed and reduced to a number of simple
canonical rule forms. The rules are generally based on natural language
representations.
1. Multiple conjunctive antecedents

𝐼𝐹 𝑥 𝑖𝑠 𝐴1, 𝐴2,…, 𝐴𝑛 𝑇𝐻𝐸𝑁 𝑦 𝑖𝑠 𝐵𝑚


~
~ ~ ~
𝐴𝑚defined as
Assume a new fuzzy subset
~

𝐴𝑚= 𝐴1∩ 𝐴2∩…∩ 𝐴𝑛


~ ~ ~ ~
and expressed by means of membership function
Department of CSE, ICET 87
𝜇 ~𝐴𝑚 (𝑥) = 𝑚𝑖𝑛[𝜇 𝐴1
~
(𝑥),𝜇 ~𝐴 2 (𝑥),…,𝜇 ~𝐴 𝑛 (𝑥)]
In view of the fuzzy intersection operation, thecompound rule mayberewritten as
𝑚
𝐼𝐹 𝐴𝑚 𝑇𝐻𝐸𝑁 𝐵
~ ~

2. Multiple disjunctiveantecedents

𝐼𝐹 𝑥 𝑖𝑠 𝐴1 𝑂𝑅 𝑥 𝑖𝑠 𝐴2,…𝑂𝑅 𝑥 𝑖𝑠 𝐴 𝑛 𝑇𝐻𝐸𝑁 𝑦 𝑖𝑠 𝐵𝑚
~
~ ~ ~
This can be written as

𝐼𝐹 𝑥 𝑖𝑠 𝐴𝑛
~
𝑇𝐻𝐸𝑁 𝑦 𝑖𝑠 𝐵𝑚
~

where the fuzzy set


𝐴𝑚 is defined as
~
𝑛
𝐴𝑚 = 𝐴1∪ 𝐴2∪ 𝐴3∪…∪ 𝐴
~ ~ ~ ~ ~
The membership function is given by

𝜇 ~𝐴 𝑚 (𝑥) = 𝑚𝑎𝑥[𝜇 𝐴1
~
(𝑥),𝜇 ~𝐴 2 (𝑥),…,𝜇 ~𝐴 𝑛 (𝑥)]
which is based on fuzzy union operation.

3. Conditional statements (with ELSE and UNLESS)


Statements of the kind

𝐼𝐹 𝐴1 𝑇𝐻𝐸𝑁( 𝐵1𝐸𝐿𝑆𝐸 𝐵2)


~ ~ ~
can be decomposed into twosimplecanonicalruleforms, connected by "OR":

𝐼𝐹 𝐴1 𝑇𝐻𝐸𝑁 𝐵1
~ ~
𝑂𝑅
𝐼𝐹 𝑁𝑂𝑇 𝐴1
~
𝑇𝐻𝐸𝑁 ~𝐵2
𝐼𝐹 𝐴1 (𝑇𝐻𝐸𝑁 𝐵1) 𝑈𝑁𝐿𝐸𝑆𝑆 𝐴2
~ ~ ~
can be decomposed as

𝐼𝐹 𝐴1 𝑇𝐻𝐸𝑁𝐵1
~ ~
𝑂𝑅
𝐼𝐹 𝐴2 𝑇𝐻𝐸𝑁𝑁𝑂𝑇𝐵 1
~ ~

𝐼𝐹 𝐴1 𝑇𝐻𝐸𝑁(𝐵1) 𝐸𝐿𝑆𝐸 𝐼𝐹 𝐴 2 𝑇𝐻𝐸𝑁(𝐵2)


~ ~ ~ ~
can be decomposed into the form
𝐼𝐹 𝐴1 𝑇𝐻𝐸𝑁 𝐵1
~ ~
𝑂𝑅
𝐼𝐹 𝑁𝑂𝑇 𝐴1 𝐴𝑁𝐷 𝐼𝐹 𝐴2 𝑇𝐻𝐸𝑁 𝐵2
~ ~ ~

Department of CSE, ICET 88


4. Nested-IF-THEN rules

The rule can be of the form


IF" A1 THENIFA2THENB
[ ( 1)]" can be of the form
~ ~ ~

𝐼𝐹 𝐴1 𝐴𝑁𝐷 𝐴2 𝑇𝐻𝐸𝑁 𝐵1
~ ~ ~
Thus, based on all the above mentioned methods compound rules can be decomposed
series of canonical simple rules.

5.5 Aggregation of rules

Aggregation of rules is the process of obtaining the overall consequents from the
individual consequents provided by each rule. The following two methods are
used for aggregation of fuzzy rules:

1. Conjunctive system of rules


For a system of rules to bejointly satisfied, the rules are connected by "and"
connectives. Here, the aggregated output,y, is determined by the fuzzy
intersection of all individual rule consequents yi where i = 1 ton, as

𝑦=𝑦1 𝑎𝑛𝑑 𝑦2 𝑎𝑛𝑑 …𝑎𝑛𝑑 𝑦𝑛


or
𝑛
𝑦=𝑦1 ∩ 𝑦2 ∩ … ∩ 𝑦

This aggregated output can be defined by the membershipfunction

𝜇𝑦(𝑦) = 𝑚𝑖𝑛[𝜇 𝑦1 (𝑦),𝜇 𝑦2 (𝑦),…,𝜇 𝑦𝑛 (𝑦)] 𝑓𝑜𝑟 𝑦𝜖 𝑌

2. Disjunctive system of rules


In this case, the satisfactionof at least one rule is required. The rules are
connected by "or" connectives. Here, the fuzzy union of all individual rule
contributions determines the aggregated output, as

𝑦=𝑦1 𝑜𝑟 𝑦2 𝑜𝑟 …𝑜𝑟 𝑦𝑛
or

𝑦=𝑦1 ∪ 𝑦2 ∪ …∪ 𝑦𝑛

Again it can be defined by the membership function

𝜇𝑦(𝑦) = 𝑚𝑎𝑥[𝜇 𝑦1 (𝑦),𝜇 𝑦2 (𝑦),…,𝜇 𝑦𝑛 (𝑦)] 𝑓𝑜𝑟 𝑦𝜖 𝑌

Department of CSE, ICET 89


5.6 Fuzzy Inference Systems

Fuzzy rule based systems, fuzzy models, and fuzzy expert systems are generally
known as systems. The key unit of a fuzzy logic system is FIS. The primary work of
this system is decision making. FIS uses "IF ... THEN" rules along with connectors
"OR" or "AND" for making necessary decision rules. The input to FlS may be fuzzy or
crisp, but the output from FIS is always a fuzzy set.

Construction and Working Principle of FIS:

Figure 5.1: Block diagram of FIS

1. A rule base that contains numerous fuzzy IF-THEN rules.


2. A database that defines the membership functions of fuzzy sets used in fuzzy rules.
3. Decision-making unit that performs operation on the rules.
4. Fuzzification interface unit that converts the crisp quantities into fuzzy quantities.
5. Defuzzification interface that converts the fuzzy quantities into crisp quantities.

Initially, in the fuzzification unit, the crisp input is convened into a fuzzy input. Various
fuzzification methods are employed for this. After this process, rule base is formed. Datab
and rule base are collectively called the knowledge base. Finally, defuzzification process is
carried out to produce crisp output. Mainly, the fuzzy rules are formed in the rule base a
suitable decisions are made in the decision-making unit.

Department of CSE, ICET 90


5.6.1 Methods of FIS

There are two important types of FIS. They are


1. Mamdani FIS(1975);
2. Sugeno FIS(1985);

[Link] Mamdani types

Ebsahim Mamdani proposed this system in the year 1975 to control a steam
engine and boiler combination by synthesizing a set of fuzzy rules obtained
from people working on the system. In this case, the output membership
functions are expected to be fuzzy sets. After aggregation process, each
output variable is a fuzzy set, hence defuzzification is important at the output
stage. The steps include:
Step 1: Determine a set of fuzzy rules.
Step 2: Make the inputs fuzzy using input membership functions.
Step 3: Combine the inputs according to the fuzzy rules for establishing a rule strength.
Step 4: Determine the consequent of the rule by combining the rule strength and the out
membership function.
Step 5: Combine all the consequents to get an output distribution.
Step 6: Finally, a defuzzified output distribution is obtained.

The fuzzy rules are formed using "IF-THEN" statements and "AND/OR'' connectives. The
consequence of the rule can be obtained in two steps:
1. By computing the rule strength completely using the fuzzified inputs from the fuzzy
combination.
2. By clipping the output membership function at the rule strength

The outputs of all the fuzzy rules are combined to obtain one fuzzy output distribution. Fro
FIS, it is desired to get only one crisp output. This crisp output may be obtained from
defuzzification process. The common techniques of defuzzification used are center of m
and mean of maximum.

Department of CSE, ICET 91


Figure 5.2: A two-input, two-rule Mamdani FIS with a fuzzy input

[Link] Sugeno types Takagi-Sugeno Fuzzy Model (TS Method)

Sugeno fuzzy method was proposed by Takagi, Sugeno and Kang in the year 1985. Th
format of the fuzzy rule of a Sugeno fuzzy model is given by

IF x is A and y is B THEN z = f(x,y)

where AB are fuzzy sets in the antecedents and z = f (x,y) is a crisp function.

The main steps of the fuzzy inference process namely,

1. Fuzzifying the inputs.


2. Applying the fuzzy operator.

Department of CSE, ICET 92


Figure 5.3: Sugeno rule

Sugeno's method can act as an interpolating supervisor for multiple linear


controllers, which are to be applied, because of the linear dependence of each rule
on the input variables of a system. A Sugeno model is suited for smooth
interpolation of linear gains that would be applied across the input space and for
modeling nonlinear systems by interpolating between multiple linear models. The
Sugeno system uses adaptive techniques for constructing fuzzy models. The
adaptive techniques are used to customize the membership functions.
[Link] Comparison between Mamdani and Sugeno model

The main difference between Mamdani and Sugeno methods lies in the output
membership functions. The Sugeno output membership functions are either
linear or constant. The difference also lies in the consequents of their fuzzy rules
as a result their aggregation and defuzzification procedures differ suitably. A
large number of fuzzy rules must be employed in Sugeno method for
approximating periodic or highly oscillatory functions. The configuration of
Sugeno fuzzy systems can be reduced and it becomes smaller than that of
Mamdani fuzzy systems if nontriangular or nontrapezoidal fuzzy input sets are
used. Sugeno controllers have more adjustable parameters in the rule
consequent and the number of parameters grows exponentially with the increase
of the number of input variables. There exist several mathematical results for
Sugeno fuzzy controllers than for Mamdani controllers. Formation of Mamdani
Department of CSE, ICET 93
FIS is easier than Sugeno FIS.
• The main advantage of Mamdani method are:
1. It has widespread acceptance.
2. It is well-suitable for human input.
3. It is intuitive.
• The advantages of Sugeno method include:
1. It is computationally efficient.
2. It is compact and works well with linear technique, optimization technique and
adaptive technique.
3. Itis best suited for analysis.
4. Ithas a guaranteed continuity of the output surface.

5.7 Neuro-fuzzy hybrid systems

It is a learning mechanism that utilizes the training and learning algorithms from
neural networks to find parameters of a fuzzy system (i.e., fuzzy sets, fuzzy rules,
fuzzy numbers, and so on). The neuro-fuzzy is divided into two areas:

1. Linguistic fuzzy modeling focused on interpretability (Mamdani model).


2. Precise fuzzy modeling focused on accuracy [mainly the Takagi-Sugeno-Kang (TSK)
model].

5.7.1 Comparison of Fuzzy Systems with Neural Networks:

When neural networks are concerned, if one problem is expressed by sufficient


number of observed examples then only it can be used. These observations are
used to train the black box. Though no prior knowledge about the problem is
needed extracting comprehensible rules from a neural network's structure is
very difficult.
A fuzzy system, on the other hand, does not need learning examples as prior knowled
rather linguistic rules are required. Moreover, linguistic description of the input and ou
variables should be given. If the knowledge is incomplete, wrong or contradictory, then
fuzzy system must be tuned. This is a time consuming process.

Department of CSE, ICET 94


Neural processing Fuzzy processing
Mathematical model not necessary Mathematical model not necessary
Learning can be done from search A priori knowledge is needed
There are several learning algorithmsLearning is not possible
Simple interpretation and
Black-box behavior
implementation

Table 5.2: Comparison of neural and fuzzy processing

5.7.2 Characteristics

An NFS approximates an n-dimensional unknown function, partly represented by train


examples. Thus fuzzy rules can be interpreted as vague prototypes of the training data

Figure 5.4: Architecture of neuro-fuzzy hybrid system

It can be represented by a three-layer feed forward neural network model. It


can also be observed that the first layer corresponds m the input variables·,
and the second and third layers correspond to the fuzzy rules and output
variables, respectively. The fu7zy sets are converted to (fuzzy) connection
weights. NFS can also be considered as a system of fuzzy rules wherein the
system can be initialized in the form of fuzzy rules based on the prior
knowledge available. Some researchers use five layers- the fuzzy sets being
encoded in the units of the second and the fourth layer, respectively
5.7.3 Classification
NFSs can be classified into the following two systems:

1. Cooperative NFSs.

Department of CSE, ICET 95


2. General neuro-fuzzy hybrid systems.

[Link] Cooperative Neural Fuzzy Systems

In this type of system, both artificial neural network (ANN) and fuzzy system work
independently from each other. Four different kinds of cooperative fuzzy neural
networks are shown in figure 5.5.

The FNN in figure 5.5(A) learns fuzzy set from the given training data. This is done,
usually, by fining membership functions with a neural network; the fuzzy sets then
being determined offline. This is followed by their utilization m form the fuzzy
system by fuzzy rules that are given, and not learned. The NFS in figure 5.5 (B)
determines, by a neural network, the fuzzy rules from the training data. Here
again, the neural networks learn offline before the fuzzy system is initialized. The
rule learning happens usually by clustering on self-organizing feature maps. There
is also the possibility of applying fuzzy clustering methods to obtain rules.

For the neuro-fuzzy model shown in figure 5.5 (C), the parameters of membership
function are learnt online, while the fuzzy system is applied. This means that,
initially, fuzzy rules and membership functions must be defined beforehand.
Also, in order to improve and guide the learning step, the error has to be
measured. The model shown in figure 5.5 (D) determines the rule weights for all
fuzzy rules by a neural network. A rule is determined by its rule weight-
interpreted as the influence of a rule. They are then multiplied with the rule
output.

Department of CSE, ICET 96


Figure 5.5: Cooperative neural fuzzy systems

[Link] General Neuro-Fuzzy Hybrid Systems (General NFHS


)

The architecture of general NFHS gives it an advantage because there is no communicati


between fuzzy system and neural network. Figure 5.6 illustrates an NFHS. In this figure t
rule base of a fuzzy system is assumed to be a neural network; the fuzzy sets are regarded
weights and the rules and the input and output variables as neurons. The choice m includ
discard neurons can be made in the learning step. Also, the fuzzy knowledge base is
represented by the neurons of the neural network; this overcomes the major drawbac
both underlying systems.

Membership functions expressing the linguistic terms of the inference rules should
be formulated for building a fuzzy controller. However, in fuzzy systems, no formal
approach exists to define these functions. Any shape, such as Gaussian or
triangular
Department or bell shaped or
of CSE, ICET 97
trapezoidal, can be considered as a membership function with an arbitrary set of
parameters. Thus for fuzzy systems, the optimization of these functions in terms
of generalizing the data is very important; this problem can be solved by using
neural networks. Using learning rules, the neural network must optimize the
parameters by fixing a distinct shape of the membership functions; for example,
triangular. But regardless of the shape of the membership functions, training data
should also be available.
The neuro fuzzy hybrid systems can also be modeled in another method. In this
case, the training data is grouped into several clusters and each cluster is
designed to represent a particular rule. These rules are defined by the crisp data
points and are not defined linguistically. The testing can be carried out by
presenting a random testing sample to the trained neural network.

Figure 5.6: A general neuro-fuzzy hybrid system

Department of CSE, ICET 98

You might also like