Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

UNIT-1 CCS 364 SOFT COMPUTING

UNIT 1 INTRODUCTION TO SOFT COMPUTING AND FUZZY LOGIC

Introduction – Fuzzy Logic – Fuzzy Sets, Fuzzy Membership Functions, Operations on Fuzzy Sets,
Fuzzy Relations, Operations on Fuzzy Relations, Fuzzy Rules and Fuzzy Reasoning, Fuzzy Inference
Systems

What is computing?

The computing in terms of computer technology is the process of accomplishing the particular task with
the help of a computer or a computing device.
Major types of computing:
There are two major classification of computing
1. Hard Computing
2. Soft computing

Hard Computing:
It is a conventional methodology which relies on principles of accuracy, certainty and inflexibility.
Soft computing:
Soft computing is a modern approach based on the idea of the approximation, uncertainty, and
flexibility.

Hard computing vs soft computing:

Hard Computing Soft Computing


Basic Uses precisely stated Tolerant to imprecision,
analytical model. uncertainty, partial truth and
approximation.
Features Precision and categoricity Approximation and
dispositionality
Nature Deterministic Stochastic
Works on Exact input data Ambiguous and noisy data
Based on Binary logic and crisp system Fuzzy logic and probabilistic
reasoning

 Soft computing was introduced by Lotfi Zadeh in 1992.


 It is an innovative approach to construct Computationally Intelligent Systems. So it is also
referred as Computational Intelligence.

Components of intelligent systems are

 Human-Like: Think and act and possess human-like expertise in a particular domain.
 Adaptable: Adapt themselves and learn to do better in a changing environment.
 Explanations: They explain how they make decisions or take actions.

Dr.V.Kalaivazhi B.E.,M.Tech.,Ph.D Page 1


UNIT-1 CCS 364 SOFT COMPUTING

Definition of Soft Computing:

According to Zadeh Soft Computing is defined as “ An emerging approach to computing which


parallels the remarkable ability of the human mind to reason and learn in an environment of
uncertainty and imprecision.”

It makes use of approximate calculations to provide imprecise but usable solutions to complex
problems.

Why Soft Computing?

Soft Computing is a collection of methodologies precise that aim to exploit the tolerance of imprecision
and uncertainty ( different results) to achieve traceable, robustance ( input, noise) and low solution
cost..

Applications of Soft Computing:

It is applied in various fields like


1. Data Analytics
2. Optimization
3. Fault Diagnosis
4. Pattern Recognition
5. Signal processing …etc

Soft Computing Constituents:

 Neural Networks
 Fuzzy Logic
 Probabilistic Reasoning
 Genetic Algorithms
 Stimulated Annealing
 Conventional AI

From Conventional AI to Computational Intelligence:

 Conventional AI mimics human intelligent behavior by expressing it in symbolic rules.


 Conventional AI basically manipulates the symbols which are stored in structured knowledge
bases.
 They provide good basis for modeling human expertise in some problems where explicit
knowledge is available.
 Most Successful conventional AI product is Expert Systems- Which is a computer program
which uses expert knowledge to attain high levels of performance in a narrow problem area.
 Soft computing constituents like neural networks, fuzzy logic etc now becomes part of Modern
AI.

Dr.V.Kalaivazhi B.E.,M.Tech.,Ph.D Page 2


UNIT-1 CCS 364 SOFT COMPUTING

Introduction:

The classical set theory is built on the fundamental concept of “set” of which an individual
is either a member or not a member. A sharp, crisp, and unambiguous distinction exists between a
member and a nonmember for any well-defined “set” of entities in this theory, and there is a very
precise and clear boundary to indicate if an entity belongs to the set.

Namely, in the classical set theory, it is not allowed that an element is in a set and not in the
set at the same time. Thus, many real-world application problems cannot be described and handled
by the classical set theory, including all those involving elements with only partial membership of a
set. On the contrary, fuzzy set theory accepts partial memberships, and, therefore, in a sense
generalizes the classical set theory to some extent.

Fuzzy logic is an extension of Boolean logic by Lot Zadeh in 1965 based on the mathematical
theory of fuzzy sets, which is a generalization of the classical set theory. By introducing the notion of
degree in the verification of a condition, thus enabling a condition to be in a state other than true or
false, fuzzy logic provides a very valuable flexibility for reasoning, which makes it possible to take
into account inaccuracies and uncertainties. In order to introduce the concept of fuzzy sets, we first
review the elementary set theory of classical mathematics. It will be seen that the fuzzy set theory is
a very natural extension of the classical set theory, and is also a rigorous mathematical notion.

Basic Concepts of Fuzzy Sets:

Fuzzy logic:
Fuzzy logic is defined as a Multivalued Logic with various degrees of values
for its member elements.

Fuzzy logic is based on "degrees of truth" than the (1 or 0) Boolean logic on which the
modern computer is based.

Dr.V.Kalaivazhi B.E.,M.Tech.,Ph.D Page 3


UNIT-1 CCS 364 SOFT COMPUTING

The word fuzzy refers to things which are not clear or are vague. Any event, process, or function
that is changing continuously cannot always be defined as either true or false, which means that
we need to define such activities in a Fuzzy manner.

What is Fuzzy Logic?


The term fuzzy refers to things which are not clear or are vague. In the real world many
times we encounter a situation when we can’t determine whether the state is true or false,
their fuzzy logic provides a very valuable flexibility for reasoning. In this way, we can
consider the inaccuracies and uncertainties of any situation.

In Boolean system truth value, 1.0 represents absolute truth value and 0.0 represents absolute
false value. But in the fuzzy system, there is no logic for absolute truth and absolute false value. But
in fuzzy logic, there is intermediate value too present which is partially true and partially false.

Figure 1 Example
In other words, we can say that fuzzy logic is not logic that is fuzzy, but logic that is
used to describe fuzziness. There can be numerous other examples like this with the help of
which we can understand the concept of fuzzy logic.

Fuzzy Logic was introduced in 1965 by Lofti A. Zadeh in his research paper “Fuzzy
Sets”. He is considered as the father of Fuzzy Logic.

Classical set:

A classical set is defined by crisp boundaries; there is no uncertainty or vaguenessin the


prescription or location of the boundaries of the set.

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 4
UNIT-1 CCS 364 SOFT COMPUTING

Operations on Classical Sets

Let A and B be two subsets on the universe X. Operations are shown below

Union A 𝖴 B = {x|x ∈ A or x ∈ B} …. (1)

Intersection A ∩ B = {x|x ∈ A and x ∈ B} …. (2)

Complement A = {x|x /∈ A, x ∈ X} …. (3)

Difference A|B = {x|x ∈ A and x /∈ B} …. (4)

Properties of Classical (Crisp) Sets

Commutativity A𝖴B=B𝖴A
A ∩ B = B ∩ A. …….. (5)
Associativity A 𝖴 (B 𝖴 C) = (A 𝖴 B) 𝖴 C
A ∩ (B ∩ C) = (A ∩ B) ∩ C …….. (6)
Distributivity A 𝖴 (B ∩ C) = (A 𝖴 B) ∩ (A 𝖴 C)
A ∩ (B 𝖴 C) = (A ∩ B) 𝖴 (A ∩ C) …….. (7)
Idempotency A𝖴A=A
A∩A=A …….. (8)
Identity A𝖴Ø=A
A∩X=A
A ∩ Ø = Ø. …….. (9)

A 𝖴 X = X.

Transitivity If A ⊆ B and B ⊆ C, then A ⊆ C ………(10)

Involution For any set A, this property states – A ¯=A ……..(11)

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 5
UNIT-1 CCS 364 SOFT COMPUTING

Fuzzy sets:

A fuzzy set is a set with a smooth boundary. Fuzzy logic is based on the theory of fuzzy sets,
which is a generalization of the classical set theory. Saying that the theory of fuzzy sets is a
generalization of the classical set theory means that the latter is a special case of fuzzy sets theory.
To make a metaphor in set theory speaking, the classical set theory is a subset of the theory of fuzzy
sets,

Figure 2
"The classical set theory is a subset of the theory of fuzzy sets"

A fuzzy set, is defined as a set containing elements that have varying degrees ofmembership
values in the range of zero to one.
Fuzzy Set Operations

Union …. (15)

Intersection …. (16)

Complement …. (17)
Fuzzy logic is based on fuzzy set theory, which is a generalization of the classical set theory. The
classical sets are also called clear sets, classical logic is also known as Boolean logic or binary.

Figure 3 Membership function characterizing the subset of 'good' quality of service.

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 6
UNIT-1 CCS 364 SOFT COMPUTING

The figure 3 shows the membership function chosen to characterize the subset of 'good' quality of
service. Definition 1. Let X be a set. A fuzzy subset A of X is characterized by a membership function.
fa : X ! [0; 1].
• Input 1: quality of service. Subsets: poor, good and excellent.

• Input 2: quality of food. Subsets: awful and delicious.

Output: tip amount. Subsets: low, medium and high.

The shape of the membership function is chosen arbitrarily by following the advice of the
expert or by statistical studies: sigmoid, hyperbolic, tangent, exponential, Gaussian or any other form
can be used.

A fuzzy set is defined by a functions that maps objects in a domain of concern into their membership
value in a set.

Such a function is called the membership function.

A fuzzy set, then, is a set containing elements that have varying degrees of membership in the
set. This idea is in contrast with classical, or crisp, sets because members of a crisp set would not be
members unless their membership is full, or complete, in that set (i.e., their membership is assigned
a value of 1). Elements in a fuzzy set, because their membership need not becomplete, can also
be members of other fuzzy sets on the same universe.

Classical Set Vs Fuzzy Set:


Classical set:

A classical set is defined by crisp boundaries. there is no uncertainty in theprescription


or location of the boundaries of the set.

Figure 4 Diagrams for (a) crisp set boundary and (b) fuzzy set boundary.

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 7
UNIT-1 CCS 364 SOFT COMPUTING

Universe of discourse: Define a universe of discourse, X, as a collection of objects all having the
same characteristics.

Examples:

The clock speeds of computer CPUs

The operating currents of an electronic motor

The operating temperature of a heat pump (in degrees Celsius)

The total number of elements in a universe X is called its cardinal number, denoted nx, where x is a
label for individual elements in the universe.

Collections of elements within a universe are called sets, and collections of elements within sets are
called subsets. We define the null set, ∅, as the set containing no elements, and the whole set, X, as
the set of all elements in the universe.

Fuzzy Set:

A fuzzy set is prescribed by vague or ambiguous properties; hence its boundaries are
ambiguously specified.

Fuzzy set theory permits the gradual assessment of the membership of elements in a set, described
with the aid of a membership function valued in the real unit [0,1].

Examples:

Words like young, tall,good or high are fuzzy.

There is no single quantitative value which defines the young term. For

some people, age 25 is young, and for others , age 35 is young.The

concept young have no boundary.

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 8
UNIT-1 CCS 364 SOFT COMPUTING

Figure 4
Fuzzy set Theory:

Fuzzy set theory is an extension of classical set theory where elements have varying degrees of
membership. A logic is based on two truth values, TRUE and FALSE.Fuzzy logic uses the whole
interval between 0(TRUE) and 1(FALSE).

Fuzzy logic is derived from fuzzy set theory dealing with reasoning that is approximate rather than
precisely deduced from classical predicate logic.

Fuzzy set theory defines Fuzzy Operators on Fuzzy Sets. Fuzzy logic is capable of handling
inherently imprecise concepts.

Properties of Fuzzy set:

Two special properties of set operations are known as the excluded middle axioms and De
Morgan’s principles. These properties are enumerated here for two sets A and B. The excluded
middle axioms are very important because these are the only set operations described here that are not
valid for both classical sets and fuzzy sets. There are two excluded middle axioms. The first, called
the axiom of the excluded middle, deals with the union of a set A and its complement; the second,
called the axiom of contradiction, represents the intersection of a set A and its complement.

All Properties of classical sets also hold for fuzzy sets, except for the excluded middleand
contradiction axioms.

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 9
UNIT-1 CCS 364 SOFT COMPUTING

Fuzzy sets can overlap. A set and its complement can overlap. The excluded middle
axioms, extended for fuzzy sets, are expressed as

…. (18)

…. (19)

Venn diagrams comparing the excluded middle axioms for classical (crisp) sets and fuzzy
sets are shown in the below diagrams.

(a) Crisp set A and its complement; (b) Fuzzy ; and (c) crisp A ∩ ≠ Ø

Axiom of the excluded middle A 𝖴 A = X.

Axiom of the contradiction A ∩ A = Ø.

Fuzzy Logic Operation on Fuzzy Sets:

Venn diagrams for these operations, extended to consider fuzzy sets, are shown in thediagrams.
The operations given in the equations are known as the standard fuzzy operations.

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 10
UNIT-1 CCS 364 SOFT COMPUTING

All other operations on classical sets also hold for fuzzy sets, except for the excluded middle
axioms. These two axioms do not hold for fuzzy sets since they do not form part of the basic
axiomatic structure of fuzzy sets. Since fuzzy sets can overlap, a set and its complement can also
overlap. The excluded middle axioms, extended for fuzzy sets, are expressed as:

Crisp Vs Fuzzy

Crisp Fuzzy
It has strict boundary T or F Fuzzy boundary with a degree of membership
Some crisp time set can be fuzzy It can't be crisp
True/False {0,1} Membership values on [0,1]
In Crisp logic law of Excluded Middle and Non- In the fuzzy logic law of Excluded Middle and Non-
Contradiction may or may not hold Contradiction hold

Classical Set vs. Fuzzy set Theory

Classical Set Fuzzy Set Theory


Classes of objects with sharp boundaries. Classes of objects do not have sharp boundaries.
A classical set is defined by crisp boundaries, i.e., A fuzzy set always has ambiguous boundaries,
there is clarity about the location of the set i.e., there may be uncertainty about the location of
boundaries. the set boundaries.
Widely used in digital system design Used only in fuzzy controllers.

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 11
UNIT-1 CCS 364 SOFT COMPUTING

Fuzzy Logic - Membership Function


Fuzzy logic is not logic that is fuzzy but logic that is used to describe fuzziness. This fuzziness is
best characterized by its membership function. In other words, we can say that membership
function represents the degree of truth in fuzzy logic.

Following are a few important points relating to the membership function −


 Membership functions were first introduced in 1965 by Lofti A. Zadeh in his first research paper
“fuzzy sets”.
 Membership functions characterize fuzziness (i.e., all the information in fuzzy set), whether the
elements in fuzzy sets are discrete or continuous.
 Membership functions can be defined as a technique to solve practical problems by experience
rather than knowledge.
 Membership functions are represented by graphical forms.
 Rules for defining fuzziness are fuzzy too.
Mathematical Notation
We have already studied that a fuzzy set à in the universe of information U can be defined as a set
of ordered pairs and it can be represented mathematically as −

Here μA˜(∙) = membership function of A˜; this assumes values in the range from 0 to 1, i.e.,
μA˜(∙)∈[0,1]. The membership function μA˜(∙) maps U to the membership space M.
The dot (∙) in the membership function described above, represents the element in a fuzzy set;
whether it is discrete or continuous.

Features of Membership Functions


We will now discuss the different features of Membership Functions.
Core
For any fuzzy set A~, the core of a membership function is that region of universe that is
characterize by full membership in the set. Hence, core consists of all those elements y of
the universe of information such that, μ A~ (y)=1

Support
For any fuzzy set A~, the support of a membership function is the region of universe that is
characterize by a nonzero membership in the set. Hence core consists of all those elements y of the
universe of information such that,

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 12
UNIT-1 CCS 364 SOFT COMPUTING

Boundary
For any fuzzy set A~, the boundary of a membership function is the region of universe that is
characterized by a nonzero but incomplete membership in the set. Hence, core consists of all
those elements y of the universe of information such that,

Fuzzification
It may be defined as the process of transforming a crisp set to a fuzzy set or a fuzzy set to
fuzzier set. Basically, this operation translates accurate crisp input values into linguistic variables.

Following are the two important methods of fuzzification −

Support Fuzzification(s-fuzzification) Method


In this method, the fuzzified set can be expressed with the help of the following relation –

Here the fuzzy set Q(xi) is called as kernel of fuzzification. This method is implemented by

keeping μi constant and xi being transformed to a fuzzy set .

Grade Fuzzification (g-fuzzification) Method


It is quite similar to the above method but the main difference is that it kept xi constant
and μi is expressed as a fuzzy set.

Defuzzification

It may be defined as the process of reducing a fuzzy set into a crisp set or to convert a fuzzy
member into a crisp member.

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 13
UNIT-1 CCS 364 SOFT COMPUTING

Fuzzification process involves conversion from crisp quantities to fuzzy quantities. In a


number of engineering applications, it is necessary to defuzzify the result or rather “fuzzy result” so
that it must be converted to crisp result. Mathematically, the process of Defuzzification is also
called “rounding it off”.

Different Defuzzification Methods


The following are the known methods of defuzzification.
 Center of Sums Method (COS)
 Center of gravity (COG) / Centroid of Area (COA) Method
 Center of Area / Bisector of Area Method (BOA)
 Weighted Average Method
 Maxima Methods
o First of Maxima Method (FOM)
o Last of Maxima Method (LOM)
o Mean of Maxima Method (MOM)

Center of Sums (COS) Method


This is the most commonly used defuzzification technique. In this method, the overlapping area
is counted twice. The defuzzified value is defined as : =

Here, n is the number of fuzzy sets, N is the number of fuzzy variables, is the membership
function for the k-th fuzzy set.

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 14
UNIT-1 CCS 364 SOFT COMPUTING

Center of gravity (COG) / Centroid of Area (COA) Method


This method provides a crisp value based on the center of gravity of the fuzzy set. The total area of
the membership function distribution used to represent the combined control action is divided into
a number of sub-areas. The area and the center of gravity or centroid of each sub-area is calculated
and then the summation of all these sub-areas is taken to find the defuzzified value for a discrete
fuzzy set.

For discrete membership function, the defuzzified value denoted as using COG is defined as:

indicates the sample element, is the membership function, and n represents the number of

elements in the sample.

For continuous membership function, is defined as :

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 15
UNIT-1 CCS 364 SOFT COMPUTING

Center of Area / Bisector of Area Method (BOA)


This method calculates the position under the curve where the areas on both sides are equal. The
BOA generates the action that partitions the area into two regions with the same area.

Weighted Average Method


This method is valid for fuzzy sets with symmetrical output membership functions and produces
results very close to the COA method. This method is less computationally intensive. Each
membership function is weighted by its maximum membership value. The defuzzified value is

defined as :
Here ∑ denotes the algebraic summation and x is the element with maximum membership function.

Let A be a fuzzy set that tells about a student as shown in figure 3 and the elements with
corresponding maximum membership values are also given. A = {(P, 0.6), (F, 0.4),(G, 0.2),(VG,
0.2), (E, 0)}
Here, the linguistic variable P represents a Pass student, F stands for a Fair student, G represents
a Good student, VG represents a Very Good student and E for an Excellent student.

Now the defuzzified value x ∗for set A will be

The defuzzified value for the fuzzy set A with weighted average method represents a Fair student.

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 16
UNIT-1 CCS 364 SOFT COMPUTING

Maxima Methods
This method considers values with maximum membership.
There are different maxima methods with different conflict resolution strategies for multiple maxima.
▪ First of Maxima Method (FOM)
▪ Last of Maxima Method (LOM)
▪ Mean of Maxima Method (MOM)

First of Maxima Method (FOM)


This method determines the smallest value of the domain with maximum membership
value. Example: The defuzzified value x*of the given fuzzy set will be x*=4.

Last of Maxima Method (LOM)


Determine the largest value of the domain with maximum membership value.
In the example given for FOM, the defuzzified value for LOM method will be x*=8

Mean of Maxima Method (MOM)


In this method, the defuzzified value is taken as the element with the highest membership values. When
there aremore than one element having maximum membership values, the mean value of the maxima is
taken.
Let A be a fuzzy set with membership function defined over x  X , where X is a universe of
discourse.The defuzzified value is let say x* of a fuzzy set and is defined as,

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 17
UNIT-1 CCS 364 SOFT COMPUTING

Fuzzy Logic Control Principles:

Control systems abound in our everyday life; perhaps we do not see them as such, because
some of them are larger than what a single individual can deal with, but they are ubiquitous. For
example, economic systems are large, global systems that can be controlled; ecosystems are large,
amorphous, and long-term systems that can be controlled.

The general form of a closed-loop control system is illustrated.

Control systems are sometimes divided into two classes. If the objective of the control
system is to maintain a physical variable at some constant value in the presence of disturbances, the
system is called a regulatory type of control, or a regulator. The second class of control systems is set
point tracking controllers. In this scheme of control, a physical variable is required to follow or track
some desired time function. An example of this type of system is an automatic aircraft landing
system, in which the aircraft follows a “ramp” to the desired touchdown point.

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 18
UNIT-1 CCS 364 SOFT COMPUTING

Assumptions in a Fuzzy Control System Design:

A number of assumptions are implicit in a fuzzy control system design. Six basic assumptions
are commonly made whenever a fuzzy rule based control policy is selected.

The plant is observable and controllable: state, input, and output variables are usually available
for observation and measurement or computation. There exists a body of knowledge comprising a
set of linguistic rules, engineering common sense, intuition, or a set of input– output
measurements data from which rules can be extracted.

A solution exists. The control engineer is looking for a “good enough” solution, not necessarily
the optimum one. The controller will be designed within an acceptable range of precision. The
problems of stability and optimality are not addressed explicitly; such issues are still open problems
in fuzzy controller design.

FUZZY LOGIC CONTROL SYSTEM (FLCS)

Control system is a set of hardware component which regulates or alters or modifies the behaviour
of the system. Fuzzy control system uses approximation so that the nonlinearity, data or knowledge
incompleteness is reduced.
Assumptions in FLC a FLCS Design:

To design a FLCS we must take into consideration the following points:

 The plant is observable and controllable


 There exists a set of knowledge about that process from which the rules can be framed
 There exists a solution
 The control engineer is looking for “Good enough solution” and not an optimum one

 Controller can be designed within an acceptable range of precision

Steps involved in FLCS:

 Identify the variables


 By assigning appropriate membership function convert these parameters in fuzzy subsets.
 Assign fuzzy relationship to input states and fuzzy output states
 Use fuzzy approximate reasoning to infer the outcomes
 Aggregate the outcomes recommended by each rule

 Apply Defuzzification to form a crisp output

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 19
UNIT-1 CCS 364 SOFT COMPUTING

Fuzzy logic Control system Block Diagram

FUZZY RELATIONS
Fuzzy relations is used to map elements of one universe, say X, to those of another
universe, say Y, with the help of Cartesian product .The “strength” of the relation measured witha
membership function having “degrees” of strength of the relation on the unit interval [0,1].
Hence, a fuzzy relation is a mapping from the Cartesian space X × Y to the interval [0,1],
where the strength of the mapping is expressed by the membership function Cardinality of
Fuzzy Relations

Cardinality of fuzzy sets is infinity; the cardinality of a fuzzy relation between two or
more universes is also infinity.
Operations on Fuzzy Relations

Let and be fuzzy relations on the Cartesian space X × Y. Then the followingoperations
apply for the membership values for various set operations

Let R and S be fuzzy relations on the Cartesian space X × Y. Then the following operations
apply for the membership values for various set operations (these are similar to the same operations
on crisp sets

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 20
UNIT-1 CCS 364 SOFT COMPUTING

Properties of Fuzzy Relations:

Just as for crisp relations, the properties of commutativity, associativity, distributivity, involution,
and idempotency all hold for fuzzy relations. Moreover, De Morgan’s principles hold for fuzzy
relations just as they do for crisp (classical) relations, and the null relation, O, and the complete
relation, E, are analogous to the null set and the whole set in set-theoretic form, respectively. Fuzzy
relations are not constrained, as is the case for fuzzy sets in general, by the excluded middle axioms.
Since a fuzzy relation R also a fuzzy set, there is overlap between a relation and its complement;
hence,

The excluded middle axioms for fuzzy relations do not result, in general, in the null relation, O, or
the complete relation, E.

...........(24)

..............(25)
From the above equations, the excluded middle axioms for fuzzy relations do not result,in
general, in the null relation, O, or the complete relation, E.

Fuzzy Cartesian product and Composition

Let be a fuzzy set on universe X and be a fuzzy set on universe Y, then the
Cartesian product between fuzzy sets and will result in fuzzy relation , which is given as

...........(26)

Where the fuzzy relation has membership function

........(27)

The Cartesian product defined by is implemented in the same way as the cross
product of two vectors. Cartesian product is not the same as the arithmetic product. Cartesian product

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 21
UNIT-1 CCS 364 SOFT COMPUTING

employs the idea of pairing of elements among sets. For example, for a fuzzy set
(vector) that has four elements, for a fuzzy set (vector) that has five elements, the

resulting fuzzy relation will be represented by a matrix of size 4 × 5, that is, will have four
rows and five columns.

Fuzzy composition can be defined as of crisp relations. Suppose is a fuzzy relation on the
Cartesian space X × Y, is a fuzzy relation on Y × Z, and is a fuzzy relation on X × Z, then
fuzzy max–min composition is defined in the following manner:

.........(28)

.........(29)

and fuzzy max–product composition is defined in terms of the membership function theoreticnotation
as

.........(30)

It should be noted out that neither crisp nor fuzzy compositions are commutative in general so

Different types of composition are (1) MAX-MIN (2) MAX –PRODUCT (3) MAX-MAX (4) MIN-
MIN (5) MIN-MAX etc., Compositions provides more information which reduces the impreciseness
present in the problem.

Fuzzification:

Process of converting a crisp value into fuzzy .Example if we have a variable


TEMPERATURE = 35 .C then this is converted into MAXTEMP, MINTEMP etc in the range of
Zero to one by assigning membership functions.

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 22
UNIT-1 CCS 364 SOFT COMPUTING

Types of Fuzzification

 Inference
 Intuition
 Rank ordering
 Using GA
 Using ANN
 Inductive reasoning
 Meta rules
 Fuzzy statistics

These are some methods used to generate membership values and there by used toconvert a
crisp value into fuzzy.
FUZZY RULES

In a FLS, a rule base is constructed to control the output variable. A fuzzy rule based system
consists of simple IF-THE with a condition and a conclusion. Sample fuzzy rule for an air
conditioner system is given below.

IF Temp = Too Cold THEN Command is HEAT

Table 1 shows the matrix representation of the fuzzy rules for the above said FLS. Row
contains the values that current room temperature can take, column is the values for target
temperature, and each cell is the resulting command. For instance, if temperature is cold and target is
warm then command is heat.

Table 1: Fuzzy matrix example

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 23
UNIT-1 CCS 364 SOFT COMPUTING

A fuzzy rule is defined as a conditional statement in the form:

IF x is A
THEN y is B

where x and y are linguistic variables; A and B are linguistic values determined by fuzzy sets
on the universe of discourse X and Y, respectively.

In the field of artificial intelligence (machine intelligence), there are various ways to represent
knowledge. Perhaps the most common way to represent human knowledge is to form it into natural
language expressions of the type IF premise (antecedent), THEN conclusion (consequent). The form
is commonly referred to as the IF–THEN rule-based form; this form is generally referred to as the
deductive form.
It typically expresses an inference such that if we know a fact (premise, hypothesis,
antecedent), then we can infer, or derive, another fact called a conclusion (consequent).This form of
knowledge representation, characterized as shallow knowledge, is quite appropriate in the context of
linguistics because it expresses human empirical and heuristic knowledge in our own language of
communication.
It does not, however, capture the deeper forms of knowledge usually associated with
intuition, structure, function, and behavior of the objects around us simply because these latter forms
of knowledge are not readily reduced to linguistic phrases or representations; this deeper form, is
referred to as inductive.
The fuzzy rule-based system is most useful in modeling some complex systems that can be
observed by humans because they make use of linguistic variables as their antecedents and
consequents; as described here these linguistic variables can be naturally represented by fuzzy sets
and logical connectives of these sets.
DEFUZZIFICATION:

Defuzzification is the process of producing a quantifiable value. Fuzzy values can’t be given
to machines since they understand only two valued logic. Hence these linguistic values have to be
converted into machine understandable two valued logic. Those techniques used to convert fuzzy
into classical values are known as Defuzzification methods. It is the process of conversion of a fuzzy
quantity into crisp quantity. Various Defuzzification methods are listed as:

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 24
UNIT-1 CCS 364 SOFT COMPUTING

 Centroid method

 Weighted average method

 Mean-max membership method


 Center of sums method
 Center of largest area method
 First(or last) of maxima method etc

Any of the above method can be used based on the level of intelligent control required.

Fuzzy Logic - Inference System

Fuzzy Inference System is the key unit of a fuzzy logic system having decision making as its
primary work. It uses the “IF…THEN” rules along with connectors “OR” or “AND” for drawing
essential decision rules.

Characteristics of Fuzzy Inference System


Following are some characteristics of FIS −
▪ The output from FIS is always a fuzzy set irrespective of its input which can be fuzzy or crisp.
▪ It is necessary to have fuzzy output when it is used as a controller.
▪ A defuzzification unit would be there with FIS to convert fuzzy variables into crisp variables.

Functional Blocks of FIS


The following five functional blocks will help you understand the construction of FIS −
 Rule Base − It contains fuzzy IF-THEN rules.
 Database − It defines the membership functions of fuzzy sets used in fuzzy rules.
 Decision-making Unit − It performs operation on rules.
 Fuzzification Interface Unit − It converts the crisp quantities into fuzzy quantities.
 Defuzzification Interface Unit − It converts the fuzzy quantities into crisp quantities.
Following is a blockdiagram of fuzzy interference system.

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 25
UNIT-1 CCS 364 SOFT COMPUTING

Working of FIS
The working of the FIS consists of the following steps −
 A fuzzification unit supports the application of numerous fuzzification methods, and converts
the crisp input into fuzzy input.
 A knowledge base - collection of rule base and database is formed upon the conversion of crisp
input intofuzzy input.
 The defuzzification unit fuzzy input is finally converted into crisp output.

Methods of FIS
Let us now discuss the different methods of FIS. Following are the two important methods of
FIS, having different consequent of fuzzy rules −
 Mamdani Fuzzy Inference System
 Takagi-Sugeno Fuzzy Model (TS Method)

Mamdani Fuzzy Inference System


This system was proposed in 1975 by Ebhasim Mamdani. Basically, it was anticipated to control a
steam engine and boiler combination by synthesizing a set of fuzzy rules obtained from people
working on the system.

Steps for Computing the Output


Following steps need to be followed to compute the output from this FIS −
1. determining a set of fuzzy rules
2. fuzzifying the inputs using the input membership functions,
3. combining the fuzzified inputs according to the fuzzy rules to establish a rule strength,
4. finding the consequence of the rule by combining the rule strength and the output membership
function,
5. combining the consequences to get an output distribution, and
6. defuzzifying the output distribution (this step is only if a crisp output (class) is needed).

Following is a block diagram of Mamdani Fuzzy Interface System.

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 26
UNIT-1 CCS 364 SOFT COMPUTING

Takagi-Sugeno Fuzzy Model (TS Method)


This model was proposed by Takagi, Sugeno and Kang in 1985. Format of this rule is given as −
IF x is A and y is B THEN Z = f(x,y)
Here, AB are fuzzy sets in antecedents and z = f(x,y) is a crisp function in the consequent.
Fuzzy Inference Process
The fuzzy inference process under Takagi-Sugeno Fuzzy Model (TS Method) works in the following
way −
 Step 1: Fuzzifying the inputs − Here, the inputs of the system are made fuzzy.
 Step 2: Applying the fuzzy operator − In this step, the fuzzy operators must be applied to get the
output.

Rule Format of the Sugeno Form


The rule format of Sugeno form is given by − if 7 = x and 9 = y then output is z = ax+by+c

Comparison between the two methods


Let us now understand the comparison between the Mamdani System and the Sugeno Model.
 Output Membership Function − The main difference between them is on the basis of output
membership function. The Sugeno output membership functions are either linear or constant.
 Aggregation and Defuzzification Procedure − The difference between them also lies in the
consequence of fuzzy rules and due to the same their aggregation and defuzzification procedure
also differs.
 Mathematical Rules − More mathematical rules exist for the Sugeno rule than the Mamdani rule.
 Adjustable Parameters − The Sugeno controller has more adjustable parameters than the
Mamdani controller.

Fuzzy Logic - Database and Queries


Fuzzy Logic is an approach to computing based on "degrees of truth" rather than the usual "true or
false" logic. It deals with reasoning that is approximate rather than precise to solve problems in a
way that more resembles human logic, hence database querying process by the two valued
realization of Boolean algebra is not adequate.

Fuzzy Scenario of Relations on Databases


The Fuzzy Scenario of Relations on Databases can be understood with the help of the
following example − Example
Suppose we have a database having the records of persons who visited India. In simple database,
we will have the entries made in the following way −
Name Age Citizen Visited Days Year
Country Spent of
Visit
John 35 U.S. India 41 1999
Smith
John 35 U.S. Italy 72 1999
Smith
John 35 U.S. Japan 31 1999
Smith

Now, if anyone queries about the person who visited India and Japan in the year 99 and is the
citizen of US, then the output will show two entries having the name of John Smith. This is simple
query generating simple output.

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 27
UNIT-1 CCS 364 SOFT COMPUTING

But what if we want to know whether the person in the above query is young or not. According to
the above result, the age of the person is 35 years. But can we assume the person to be young or
not? Similarly, same thing can be applied on the other fields like days spent, year of visit, etc.
The solution of the above issues can be found with the help of Fuzzy Value sets as follows −
 FV(Age){ very young, young, somewhat old, old }
 FV(Days Spent){ barely few days, few days, quite a few days, many days }
 FV(Year of Visit){distant past, recent past, recent }
 Now if any query will have the fuzzy value then the result will also be fuzzy in nature.
Fuzzy Query System
A fuzzy query system is an interface to users to get information from the database using (quasi)
natural language sentences. Many fuzzy query implementations have been proposed, resulting in
slightly different languages.
Although there are some variations according to the particularities of different implementations,
the answer to a fuzzy query sentence is generally a list of records, ranked by the degree of
matching.

Fuzzy Logic – Quantification


In modeling natural language statements, quantified statements play an important role. It means
that NL heavily depends on quantifying construction which often includes fuzzy concepts like
“almost all”, “many”, etc. Following are a few examples of quantifying propositions −
 Every student passed the exam. 
 Every sport car is expensive.
 Many students passed the exam.
 Many sports cars are expensive.

In the above examples, the quantifiers “Every” and “Many” are applied to the crisp restrictions
“students” as well as crisp scope “(person who)passed the exam” and “cars” as well as crisp scope
”sports”.

Fuzzy Events, Fuzzy Means and Fuzzy Variances


With the help of an example, we can understand the above concepts. Let us assume that we are a
shareholder of a company named ABC. And at present the company is selling each of its share for
₹40. There are three different companies whose business is similar to ABC but these are offering
their shares at different rates - ₹100 a share, ₹85 a share and ₹60 a share respectively.
Now the probability distribution of this price takeover is as follows –
Price 100 85 60
Probability 0.3 0.5 0.2

Now, from the standard probability theory, the above distribution gives a mean of expected price as
below −
100×0.3+85×0.5+60×0.2=84.5

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 28
UNIT-1 CCS 364 SOFT COMPUTING

And, from the standard probability theory, the above distribution gives a variance of expected price
as below −
(100−84.5)2×0.3+(85−84.5)2×0.5+(60−84.5)2×0.2=124.825

Suppose the degree of membership of 100 in this set is 0.7, that of 85 is 1, and the degree of
membership is 0.5 for the value 60. These can be reflected in the following fuzzy set −

The fuzzy set obtained in this manner is called a fuzzy event.


We want the probability of the fuzzy event for which our calculation gives −
0.7×0.3+1×0.5+0.5×0.2=0.21+0.5+0.1=0.81
Now, we need to calculate the fuzzy mean and the fuzzy variance, the calculation is as follows −
Fuzzy_mean =(1/0.81)×(100×0.7×0.3+85×1×0.5+60×0.5×0.2=85.8
Fuzzy_Variance =7496.91−7361.91=135.27

Dr.V.KalaivazhiB.E.,M.Tech.,Ph.D Page 29

You might also like