0% found this document useful (0 votes)
6 views12 pages

Soft Comp

The document provides an overview of soft computing and fuzzy logic, highlighting their importance in handling imprecise data compared to traditional hard computing. It explains the components of fuzzy systems, including fuzzy sets, membership functions, and fuzzy rules, which facilitate decision-making in uncertain environments. Additionally, it discusses the advantages and disadvantages of fuzzy logic systems, along with their various applications across different fields.

Uploaded by

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

Soft Comp

The document provides an overview of soft computing and fuzzy logic, highlighting their importance in handling imprecise data compared to traditional hard computing. It explains the components of fuzzy systems, including fuzzy sets, membership functions, and fuzzy rules, which facilitate decision-making in uncertain environments. Additionally, it discusses the advantages and disadvantages of fuzzy logic systems, along with their various applications across different fields.

Uploaded by

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

CCS364-Soft Computing Notes

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

1. Introduction: Soft Computing and Fuzzy Systems

 When you have crisply defined data that is precise and easy to understand,
applying hard computing to it is perfect.
 Hard computing is based on binary logic, classical sets, crisp (precise) systems
and software, basic numerical analysis, etc.
 But when you try to apply this same approach to real-world problems that
include imprecise data—maybe the dataset is partially true, it has a lot of
approximations, and so on—hard computing fails.
 The best way to tackle this situation is to use the soft computing approach.
 A very basic example is 2+2. In this scenario, you can use hard computing to
arrive at 4. But when you change the equation to 2+x, where x ranges from 0 to
5, soft computing always gives better results.

Soft Computing:
Soft computing tries to imitate the human mind in order to make
decisions. These models have cognitive abilities, which include:
• Ability to think
• Ability to reason
• Ability to organize
• Ability to memorize
• Ability to recognize
• Ability to process

When your data is imprecise (it has partial truths and is full of
approximations), soft computing is the best approach.
The following are features of soft computing-based problem-solving approaches:
• Biologically inspired
• Fault tolerant
• Full of optimizations
• Helps make wiser and more intelligent machines
• Helps in achieving robustness, tractability, and lower costs
• Heavy computation
• Goal driven

Table 1-1. Basic Constituents of Soft Computing

Constituent Benefits

Neural Networks to learn and adapt based on uncertainty in data

Fuzzy Set Theory Knowledge representation

Genetic Algorithms For efficient searching

Traditional AI using mathematical approaches

Fuzzy Systems:
Fuzzy Systems are one of the core parts of soft computing, so you need to
understand them. Fuzzy Systems, along with soft computing, make a very strong
foundation for an inference system, also called an Adaptive Neuro-Fuzzy Inference
System, which is discussed later in this book.
Fuzzy Systems are comprised of Fuzzy Sets and not the normal, classical sets. In
these systems, you try to follow Fuzzy Logic, because traditional logic cannot be
applied to real-world applications. Let’s look at Fuzzy Systems with the help of an
example.
When you drive a car, it’s a combination of pressing the accelerator and the brake.
Whenever you speed up, you press the accelerator, and whenever you want to slow
down, you press the brakes. Suppose you are talking about self-driving cars. In this
scenario, both systems should be managed simultaneously, without any manual
intervention.
If you consider traditional logic, it follows classical sets (called crisp sets). In these
sets, the value is equal to 0 or 1. Suppose the functioning is defined as shown
Table 1-2.
Table 1-2. Applying Brakes
Represented Using Crisp Sets
Function Set Code
press the accelerator 1
release the accelerator 0
press the brakes 1
release the brakes 0

The problem with this encoding is that 1 represents a full pressing and 0 represents
a full release. There is no intermediate response. Suppose a car turns in front of your
car. In this scenario, the 1 code will get activated and full brakes will be applied. If
that car accelerates and is farther away from you, full brakes will be released and the
full accelerator will be pressed (codes 0 and 1 will get activated).
Classical Sets:
 Definition: Collection of objects denoted by curly braces, e.g., {Audi, BMW,
Mercedes, Porsche}. They are also called as Crisp set.
 Visualization: Represented using Venn diagrams to show relationships
between sets.
 Universe of Discourse: Set containing all possible elements within a domain,
e.g., the domain of Machine Learning.
Properties of Classical Sets:
Membership of Elements: Denoted by 𝑋∈𝐴X∈A for an element 𝑋X in set
𝐴A.

 Cardinality: Total number of elements in a set, denoted by 𝑛(𝐴)n(A) or ∣𝐴∣∣A∣.


 Family of Sets: A set containing other sets.
 Null Set: Empty set denoted by ∅∅.
 Singleton Set: Set with one element, e.g., 11.
 Subset: Set where all elements are in another set, denoted by 𝑋⊂𝐴X⊂A.
 Superset: Set containing all elements of another set, denoted by 𝐴⊃𝑋A⊃X.
 Powerset: Set containing all subsets of a set, denoted by 𝑃(𝐴)P(A).
 Countable Set: Set where elements can be labeled with unique natural
numbers.
 Uncountable Set: Set where elements cannot be labeled with unique natural
numbers.

Classical Set Operations:


 Union: Merges elements of two sets into one set, denoted by 𝐴∪𝐵A∪B.
 Intersection: Finds common elements in two sets, denoted by 𝐴∩𝐵A∩B.
 Complement: Contains all elements not in a set, denoted by 𝐴𝑐Ac.

𝐴−𝐵A−B.
 Difference: Contains elements in one set but not in another, denoted by

Here’s the Python implementation:


# Example Sets
A = {0, 2, 4, 6, 8}
B = {1, 2, 3, 4, 5}
# union of above sets
print("Union :", A | B)
# intersection of above sets
print("Intersection :", A & B)
# difference between above sets
print("Difference :", A - B)
Classical Set Properties:
 Law of Commutativity: Order of sets in union/intersection does not affect the
result.
 Law of Associativity: Grouping of sets in union/intersection does not affect
the result.
 Law of Distributivity: Union distributes over intersection, and vice versa.
 Idempotent Law: Union/intersection of a set with itself is the set itself.
 Identity Law: Union with Universe is Universe; intersection with Universe is
the set itself.
 Law of Absorption: Union of a set with its intersection with another set is the
set itself, and vice versa.
 Involution Law: Double complement of a set is the set itself.
 Law of Transitivity: If 𝐴⊂𝐵A⊂B and 𝐵⊂𝐶B⊂C, then 𝐴⊂𝐶A⊂C.
 Law of Excluded Middle: Union of a set with its complement is the Universe.
 Law of Contradiction: Intersection of a set with its complement is the empty
set.
 De Morgan Laws: Complement of union equals intersection of complements,
and vice versa.

2. Fuzzy Logic
The term fuzzy refers to things that 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 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.
In summary, 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.
 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.
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
What is Fuzzy Control?
 It is a technique to embody human-like thinkings into a control
system.
 It may not be designed to give accurate reasoning but it is designed
to give acceptable reasoning.
 It can emulate human deductive thinking, that is, the process people
use to infer conclusions from what they know.
 Any uncertainties can be easily dealt with the help of fuzzy logic.
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.

3. Fuzzy Sets Classical sets involve exactly defined values. This means that
the Universe of Discourse is split into two groups—members and non-
members. Therefore, you cannot say that any member has a partial
membership. For example, if you are pressing brakes or releasing them,
these processes can be represented by 1 or 0. With Fuzzy Sets, on the
other hand, you can have values in between as well. Therefore, you can
say that the Fuzzy Sets have a degree of membership between 0 and 1.
For example, you can have values like {0, 0.3, 0.5, 0.7, 1}. The 1 means a
full brake, 0.7 means a little less brake, 0.5 means half the pressure, 0.3
means very little pressure, and 0 means no pressure. In the real world,
you rarely see classical sets in action. You deal with the values
represented by Fuzzy Sets. There are several properties associated with
Fuzzy Sets. The next sections explain them: • Law of Commutativity • Law
of Associativity • Law of Distributivity • Idempotent Law • Identity Law •
Involution Law • Law of Transitivity • De Morgan laws Chapter 1
Introduction to Fuzzy Set Theory 20 Law of Commutativity The union or
intersection of two sets produces the same the result, regardless of which

will always be the same. (A ∪ B) = (B ∪ A) (A ∩ B) = (B ∩ A) Law


set you list first. That means you can take A first or B first, but the results

of Associativity Say you have three sets. The Law of Associativity says that
union or intersection of the last two sets with the first one. (A ∪ B) ∪ C =
a union or intersection of the first two sets with the third one is equal to a

A ∪ (B ∪ C) (A ∩ B) ∩ C = A ∩ (B ∩ C) Law of Distributivity The Law of


Distributivity says that a union of the first set with an intersection of the
last two sets is equal to a union of the first set with the second, a union of
the first set with the third, and then an intersection of both outputs. This

operations. A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C) A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩
same rule applies when you interchange the union and intersection

C) Chapter 1 Introduction to Fuzzy Set Theory 21 Idempotent Law The

same set is the same set itself. A ∪ A = A A ∩ A = A Identity Law If Φ is an


Idempotent Law states that an intersection or union of a set with the

∪ 𝛷 = A A ∪ E = E A ∩ 𝛷 = 𝛷 A ∩ E = A In other words: • A union of a set


empty set and E is a universe of discourse, the Identity Law states that: A

with an empty set leads to the same set • An intersection of a set with an
empty set leads to an empty set • A union of a set with a Universe of
Discourse leads to a Union of Discourse • An intersection of a set with a
Universe of Discourse leads to the same set Chapter 1 Introduction
to Fuzzy Set Theory 22 Involution Law The Involution Law states that a
double complement of a set leads to the same set: (Ac )c = A Law

is a subset of C, A will be a subset of C. If A ⊆ B, B ⊆ C, then A ⊆ C De


of Transitivity The Law of Transitivity states that if A is a subset of B and B

Morgan Laws If there are two sets and you find the complement of the
union between them, it is equal to the intersection of the complements of
the individual sets. Similarly, if you find the complement of an intersection
between the two sets, it is equal to the union of the complements of the
individual sets. This rule is called De Morgan Laws. A B A B c c c ( ) È = Ç A
B A B c c c ( ) Ç = È Now, before you learn about the operations that can be
applied to Fuzzy Sets, you need to understand the concept of membership
functions. Chapter 1 Introduction to Fuzzy Set Theory 23 Introduction
to Membership Functions In the previous section, you learned that
instead of having crisp values of 0 and 1, each element can be mapped to
a value between 0 and 1. Each value is called the degree of membership
and is represented by a curve, which depicts a function called a
membership function. The value is called the membership value. In
Figure 1-9, you can see the difference between crisp and Fuzzy Sets

You might also like