SOFT COMPUTING
UNIT - I INTRODUCTION TO SOFT COMPUTING AND FUZZY LOGIC
Introduction - Fuzzy Logic:
The term fuzzy refers to things that are not clear or are [Link] 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 very valuable flexibility for reasoning. In
this way, we can consider the inaccuracies and uncertainties of any situation.
Fuzzy Logic is a form of many-valued logic in which the truth values of variables
may be any real number between 0 and 1, instead of just the traditional values of
true or false. It is used to deal with imprecise or uncertain information and is a
mathematical method for representing vagueness and uncertainty in decision-
making.
Fuzzy Logic is based on the idea that in many cases, the concept of true or false is
too restrictive, and that there are many shades of gray in between. It allows for
partial truths, where a statement can be partially true or false, rather than fully true
or false.
Fuzzy Logic is used in a wide range of applications, such as control systems,
image processing, natural language processing, medical diagnosis, and artificial
intelligence.
The fundamental concept of Fuzzy Logic is the membership function, which
defines the degree of membership of an input value to a certain set or category.
The membership function is a mapping from an input value to a membership
degree between 0 and 1, where 0 represents non-membership and 1 represents full
membership.
Fuzzy Logic is implemented using Fuzzy Rules, which are if-then statements that
express the relationship between input variables and output variables in a fuzzy
way. The output of a Fuzzy Logic system is a fuzzy set, which is a set of
membership degrees for each possible output value.
Fuzzy Logic is a mathematical method for representing vagueness and uncertainty
in decision-making, it allows for partial truths, and it is used in a wide range of
applications. It is based on the concept of membership function and the
implementation is done using Fuzzy rules.
In the boolean system truth value, 1.0 represents the absolute truth value and 0.0
represents the absolute false value. But in the fuzzy system, there is no logic for the
absolute truth and absolute false value. But in fuzzy logic, there is an intermediate
value too present which is partially true and partially false.
ARCHITECTURE
Its Architecture contains four parts :
RULE BASE: It contains the set of rules and the IF-THEN conditions provided by
the experts to govern the decision-making system, on the basis of linguistic
information. Recent developments in fuzzy theory offer several effective methods
for the design and tuning of fuzzy controllers. Most of these developments reduce
the number of fuzzy rules.
FUZZIFICATION: It is used to convert inputs i.e. crisp numbers into fuzzy sets.
Crisp inputs are basically the exact inputs measured by sensors and passed into the
control system for processing, such as temperature, pressure, rpm’s, etc.
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 −
A˜=μ1Q(x1)+μ2Q(x2)+...+μnQ(xn)
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 Q(xi).
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.
INFERENCE ENGINE: It determines the matching degree of the current fuzzy
input with respect to each rule and decides which rules are to be fired according to
the input field. Next, the fired rules are combined to form the control actions.
DEFUZZIFICATION: It is used to convert the fuzzy sets obtained by the inference
engine into a crisp value. There are several defuzzification methods available and
the best-suited one is used with a specific expert system to reduce the error.
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.
We have already studied that the 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”.
The different methods of Defuzzification are described below −
Max-Membership Method
This method is limited to peak output functions and also known as height method.
Mathematically it can be represented as follows −
μA˜(x∗)>μA˜(x)forallx∈X
Here, x∗ is the defuzzified output.
Centroid Method
This method is also known as the center of area or the center of gravity method.
Mathematically, the defuzzified output x∗ will be represented as −
x∗=∫μA˜(x).xdx∫μA˜(x).dx
Weighted Average Method
In this method, each membership function is weighted by its maximum
membership value. Mathematically, the defuzzified output x∗ will be represented
as −
Mean-Max Membership
This method is also known as the middle of the maxima. Mathematically, the
defuzzified output x∗ will be represented as −
Membership function
Definition:
A graph that defines how each point in the input space is mapped to membership
value between 0 and 1. Input space is often referred to as the universe of discourse
or universal set (u), which contains all the possible elements of concern in each
particular application.
There are largely three types of fuzzifiers:
Singleton fuzzifier
Gaussian fuzzifier
Trapezoidal or triangular fuzzifier
Advantages of Fuzzy Logic System
This system can work with any type of inputs whether it is imprecise, distorted or
noisy input information.
The construction of Fuzzy Logic Systems is easy and understandable.
Fuzzy logic comes with mathematical concepts of set theory and the reasoning of
that is quite simple.
It provides a very efficient solution to complex problems in all fields of life as it
resembles human reasoning and decision-making.
The algorithms can be described with little data, so little memory is required.
Disadvantages of Fuzzy Logic Systems
Many researchers proposed different ways to solve a given problem through fuzzy
logic which leads to ambiguity. There is no systematic approach to solve a given
problem through fuzzy logic.
Proof of its characteristics is difficult or impossible in most cases because every
time we do not get a mathematical description of our approach.
As fuzzy logic works on precise as well as imprecise data so most of the time
accuracy is compromised.
Application
It is used in the aerospace field for altitude control of spacecraft and satellites.
It has been used in the automotive system for speed control, traffic control.
It is used for decision-making support systems and personal evaluation in the large
company business.
It has application in the chemical industry for controlling the pH, drying, chemical
distillation process.
Fuzzy logic is used in Natural language processing and various intensive
applications in Artificial Intelligence.
Fuzzy logic is extensively used in modern control systems such as expert systems.
Fuzzy Logic is used with Neural Networks as it mimics how a person would make
decisions, only much faster. It is done by Aggregation of data and changing it into
more meaningful data by forming partial truths as Fuzzy sets.
Fuzzy Logic | Set 2 (Classical and Fuzzy Sets)
Set:
A set is defined as a collection of objects, which share certain characteristics.
Classical set
Classical set is a collection of distinct objects. For example, a set of students
passing grades.
Each individual entity in a set is called a member or an element of the set.
The classical set is defined in such a way that the universe of discourse is splitted
into two groups members and non-members. Hence, In case classical sets, no
partial membership exists.
Let A is a given set. The membership function can be use to define a set A is
given by:
Operations on classical sets:
For two sets A and B and Universe X:
[Link]:
This operation is also called logical OR.
The union of sets A and B (denoted by A ∪ BA ∪ B) is the set of elements which
are in A, in B, or in both A and B. Hence, A ∪ B = {x|x ∈ A OR x ∈ B}.
Example − If A = {10,11,12,13} and B = {13,14,15}, then A ∪ B =
{10,11,12,13,14,15} – The common element occurs only once.
[Link]:
This operation is also called logical AND.
The intersection of sets A and B (denoted by A ∩ B) is the set of elements which
are in both A and B. Hence, A ∩ B = {x|x ∈ A AND x ∈ B}.
[Link]/Difference:
The set difference of sets A and B (denoted by A–B) is the set of elements which
are only in A but not in B. Hence, A − B = {x|x ∈ A AND x ∉ B}.
Example − If A = {10,11,12,13} and B = {13,14,15}, then (A − B) = {10,11,12}
and (B − A) = {14,15}. Here, we can see (A − B) ≠ (B − A)
Properties of classical sets:
For two sets A and B and Universe X:
[Link]:
Having two sets A and B, this property states −
A∪B=B∪A
A∩B=B∩A
2. Associativity:
Having three sets A, B and C, this property states −
A∪(B∪C)=(A∪B)∪C
A∩(B∩C)=(A∩B)∩C
3. Distributivity:
Having three sets A, B and C, this property states −
A∪(B∩C)=(A∪B)∩(A∪C)
A∩(B∪C)=(A∩B)∪(A∩C)
Idempotency:
For any set A, this property states −
A∪A=A
A∩A=A
[Link]:
For set A and universal set X, this property states −
A∪φ=A
A∩X=A
A∩φ=φ
A∪X=X
[Link]:
Having three sets A, B and C, the property states −
If A⊆B⊆C,
then A⊆C
Fuzzy set:
Fuzzy set is a set having degrees of membership between 1 and 0. Fuzzy sets are
represented with tilde character(~). For example, Number of cars following traffic
signals at a particular time out of all cars present will have membership value
between [0,1].
Partial membership exists when member of one fuzzy set can also be a part of
other fuzzy sets in the same universe.
The degree of membership or truth is not same as probability, fuzzy truth
represents membership in vaguely defined sets.
Fuzzy sets can be considered as an extension and gross oversimplification of
classical sets. It can be best understood in the context of set membership. Basically
it allows partial membership which means that it contain elements that have
varying degrees of membership in the set. From this, we can understand the
difference between classical set and fuzzy set. Classical set contains elements that
satisfy precise properties of membership while fuzzy set contains elements that
satisfy imprecise properties of membership.
Mathematical Concept
A fuzzy set A˜ in the universe of information U can be defined as a set of ordered
pairs and it can be represented mathematically as −
A˜={(y,μA˜(y))|y∈U}
Here μA˜(y) = degree of membership of y in \widetilde{A}, assumes values in the
range from 0 to 1, i.e., μA˜(y)∈[0,1]
Operations on Fuzzy Sets
Having two fuzzy sets A˜ and B˜, the universe of information U and an element 𝑦 of
the universe, the following relations express the union, intersection and complement
operation on fuzzy sets.
Union/Fuzzy ‘OR’
Let us consider the following representation to understand how the Union/Fuzzy
‘OR’ relation works −
μA˜∪B˜(y)=μA˜∨μB˜∀y∈U
Here ∨ represents the ‘max’ operation.
Intersection/Fuzzy ‘AND’
Let us consider the following representation to understand how the
Intersection/Fuzzy ‘AND’ relation works −
μA˜∩B˜(y)=μA˜∧μB˜∀y∈U
Here ∧ represents the ‘min’ operation.
Complement/Fuzzy ‘NOT’
Let us consider the following representation to understand how the
Complement/Fuzzy ‘NOT’ relation works −
μA˜=1−μA˜(y)y∈U
Properties
of Fuzzy Sets
Let us discuss the different properties of fuzzy sets.
Commutative Property
Having two fuzzy sets A˜and B˜, this property states −
A˜∪B˜=B˜∪A˜
A˜∩B˜=B˜∩A˜
Associative Property
Having three fuzzy sets A˜, B˜and C˜, this property states −
(\widetilde{A}\cup \left \widetilde{B}) \cup \widetilde{C} \right = \left
\widetilde{A} \cup (\widetilde{B}\right )\cup \widetilde{C})
(\widetilde{A}\cap \left \widetilde{B}) \cap \widetilde{C} \right = \left
\widetilde{A} \cup (\widetilde{B}\right \cap \widetilde{C})
Distributive Property
Having three fuzzy sets A˜, B˜and C˜, this property states −
A˜∪(B˜∩C˜)=(A˜∪B˜)∩(A˜∪C˜)
A˜∩(B˜∪C˜)=(A˜∩B˜)∪(A˜∩C˜)
Idempotency Property
For any fuzzy set A˜, this property states −
A˜∪A˜=A˜
A˜∩A˜=A˜
Identity Property
For fuzzy set A˜and universal set U, this property states −
A˜∪φ=A˜
A˜∩U=A˜
A˜∩φ=φ
A˜∪U=U
Transitive Property
Having three fuzzy sets A˜, B˜and C˜, this property states −
IfA˜⊆B˜⊆C˜,thenA˜⊆C˜
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.
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 yof 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,
μA˜(y)>0
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,
1>μA˜(y)>0
Connectives
In propositional logic, we use the following five connectives −
OR (∨∨)
AND (∧∧)
Negation/ NOT (¬¬)
Implication / if-then (→→)
If and only if (⇔⇔)
OR (∨∨)
The OR operation of two propositions A and B (written as A∨BA∨B) is true if
at least any of the propositional variable A or B is true.
The truth table is as follows −
AND (∧∧)
The AND operation of two propositions A and B (written as A∧BA∧B) is true if
both the propositional variable A and B is true.
The truth table is as follows −
Negation (¬¬)
The negation of a proposition A (written as ¬A¬A) is false when A is true and
is true when A is false.
The truth table is as follows −
Implication / if-then (→→)
An implication A→BA→B is the proposition “if A, then B”. It is false if A is true
and B is false. The rest cases are true.
The truth table is as follows −
If and only if (⇔⇔)
A⇔BA⇔B is a bi-conditional logical connective which is true when p and q
are same, i.e., both are false or both are true.
The truth table is as follows −