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

Unit 3rd Fuzzy Logic

Fuzzy logic is a computing approach that deals with degrees of truth rather than binary true or false values, allowing for more nuanced reasoning in uncertain and imprecise situations. It is widely applied in artificial intelligence and various industries, including automotive, aerospace, and medicine, to manage complex decision-making processes. The architecture of fuzzy logic systems includes components like rule base, fuzzification, inference engine, and defuzzification, which work together to handle vagueness and uncertainty in data.

Uploaded by

sujalsujal4777
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)
16 views12 pages

Unit 3rd Fuzzy Logic

Fuzzy logic is a computing approach that deals with degrees of truth rather than binary true or false values, allowing for more nuanced reasoning in uncertain and imprecise situations. It is widely applied in artificial intelligence and various industries, including automotive, aerospace, and medicine, to manage complex decision-making processes. The architecture of fuzzy logic systems includes components like rule base, fuzzification, inference engine, and defuzzification, which work together to handle vagueness and uncertainty in data.

Uploaded by

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

What is fuzzy logic?

Fuzzy logic is an approach to computing based on "degrees of truth" rather than the usual "true or false" (1
or 0) Boolean logic on which the modern computer is based.
The idea of fuzzy logic was first advanced by Lotfi Zadeh of the University of California at Berkeley in the
1960s. Zadeh was working on the problem of computer understanding of natural language. Natural
language -- like most other activities in life and indeed the universe -- is not easily translated into the
absolute terms of 0 and 1. Whether everything is ultimately describable in binary terms is a philosophical
question worth pursuing, but in practice, much data we might want to feed a computer is in some state in
between and so, frequently, are the results of computing. It may help to see fuzzy logic as the way reasoning
really works and binary, or Boolean, logic is simply a special case of it.
Fuzzy logic techniques are efficient in solving complex, ill-defined problems that are characterized
by uncertainty of environment and fuzziness of information. Fuzzy logic allows handling uncertain
and imprecise knowledge and provides a powerful framework for reasoning.
Fuzzy logic in AI
In artificial intelligence (AI) systems, fuzzy logic is used to imitate human reasoning and cognition. Rather
than strictly binary cases of truth, fuzzy logic includes 0 and 1 as extreme cases of truth but with various
intermediate degrees of truth.
As a result, fuzzy logic is well-suited for the following:
 engineering for decisions without clear certainties and uncertainties, or with imprecise data -- such as
with natural language processing technologies; and
 regulating and controlling machine outputs, according to multiple inputs/input variables -- such as with
temperature control systems.

Fuzzy logic applications


Various types of AI systems and technologies use fuzzy logic. This includes vehicle intelligence,
consumer electronics, medicine, software, chemicals and aerospace.
 In automobiles, fuzzy logic is used for gear selection and is based on factors such as engine load, road
conditions and style of driving.
 In dishwashers, fuzzy logic is used to determine the washing strategy and power needed, which is
based on factors such as the number of dishes and the level of food residue on the dishes.
 In copy machines, fuzzy logic is used to adjust drum voltage based on factors such as humidity,
picture density and temperature.
 In aerospace, fuzzy logic is used to manage altitude control for satellites and spacecrafts based on
environmental factors.
 In medicine, fuzzy logic is used for computer-aided diagnoses, based on factors such as symptoms
and medical history.
 In chemical distillation, fuzzy logic is used to control pH and temperature variables.
 In natural language processing, fuzzy logic is used to determine semantic relations between concepts
represented by words and other linguistic variables.
 In environmental control systems, such as air conditioners and heaters, fuzzy logic determines output
based on factors such as current temperature and target temperature.
 In a business rules engine, fuzzy logic may be used to streamline decision-making according to
predetermined criteria.
Fuzzy Logic | Introduction
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.

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.
Uncertainty in Fuzzy Logic Systems
Fuzzy logic systems expert Jerry Mendel categorizes four kinds of uncertainties that can occur in a
rule-based fuzzy logic system, relates these to three general kinds of uncertainty, and explains why
type-2 fuzzy logic is needed to handle them.
"Uncertainty may also reflect incompleteness, imprecision, missing information, or randomness in data and
a process."
Uncertainty: General Discussions
Uncertainty comes in many guises and is independent of the kind of fuzzy logic (FL), or any kind of
methodology, one uses to handle it. One of the best sources for general discussions about uncertainty is the
book Uncertainty-Based Information, by Klir and Wierman1
Regarding the occurrence of uncertainty state:
When dealing with real-world problems, we can rarely avoid uncertainty. At the empirical level,
uncertainty is an inseparable companion of almost any measurement, resulting from a combination of
inevitable measurement errors and resolution limits of measuring instruments. At the cognitive level,
it emerges from the vagueness and ambiguity inherent in natural language. At the social level,
uncertainty has even strategic uses and it is often created and maintained by people for different
purposes (privacy, secrecy, propriety).
Regarding the causes of uncertainty, they state:
Uncertainty involved in any problem-solving situation is a result of some information deficiency.
Information (pertaining to the model within which the situation is conceptualized) may be incomplete,
fragmentary, not fully reliable, vague, contradictory, or deficient in some other way. In general, these
various information deficiencies may result in different types of uncertainty.
Regarding the nature of uncertainty, they state:
Three types of uncertainty are now recognized … fuzziness (or vagueness), which results from the
imprecise boundaries of fuzzy sets; nonspecificity (or imprecision), which is connected with sizes
(cardinalities) of relevant sets of alternatives; and strife (or discord), which expresses conflicts among
the various sets of alternatives.
The word imprecision is frequently used for both fuzziness and nonspecificity.
In a private correspondence with me, Klir said:
When it [imprecision] is used for nonspecificity, it refers to information-based imprecision; here,
uncertainty results from information deficiency. When it is used for fuzziness, it [imprecision] refers
to linguistic imprecision. … This ambiguity can be avoided by distinguishing between information-
based imprecision (equivalent to nonspecificity) and linguistic imprecision (equivalent to fuzziness).

Uncertainty
The world is full of uncertainty. Uncernitiy is due to randomness, imprecision, or other circumstances such
as unambiguity, noises, distractions etc.
Uncertainty could happen in different forms. When it is present with randomness, we call it probability.
When it comes to imprecision, we see that as the possibility theorem. When it comes to ambiguity, we
handle it with Fuzzy logic.
In quantum physics, the outcome of an ideal measurement of a system is not deterministic. It is impossible
to determine the position and speed of the particle precisely. That uncertainty is not what we are talking
about here in Fuzzy.
The probability distribution can explain the uncertainty of a particular experiment. That is the uncertainty
of what we are handling through probability.
Uncertain Knowledge
We can express it with precise predicates when it comes to uncertain knowledge.
E.g., I believe that George is 5.7 feet tall.
‘believe that’ needs to be more precise. We are curious to know if it is true or false.
E.g. It is possible that I will be visiting you at 7 pm.
There has a chance to fail inside the word ‘possible.’ We cannot say exactly.
This kind of expression always carries an amount of uncertainty. If you could explain this uncertainty, that
is the goal of probability and quantum concepts.
Imprecise Knowledge
The knowledge is expressed with imprecise predicates. The variables are assigned imprecise values.
 Geroge is smart in mathematics.
 Geroge is clever in mathematics.
When another one judges George, these statements he does not know which one is better. Therefore the
knowledge differs from time to time. From his point of view, ‘smart’ is not more correct than ‘clever’.
Consequently, we cannot precisely define the knowledge of what that means.
Therefore the knowledge is uncertain due to the uncertainty or the imprecision of expressing that knowledge.
Classical and Fuzzy Sets
In this post, we will discuss classical sets and fuzzy sets, their properties and operations that can
be applied on them.
Set: A set is defined as a collection of objects, which share certain characteristics.
Classical set
1. Classical set is a collection of distinct objects. For example, a set of students passing grades.
2. Each individual entity in a set is called a member or an element of the set.
3. 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.
4. Let A is a given set. The membership function can be use to define a set A is given :

1. Operations on classical sets: For two sets A and B and Universe X:


 Union:

 This operation is also called logical OR.


 Intersection:

 This operation is also called logical AND.


 Complement:

 Difference:

1. Properties of classical sets: For two sets A and B and Universe X:


 Commutativity:

 Associativity:

 Distributivity:

 Idempotency:
 Identity:

 Transitivity:

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].
1. Partial membership exists when member of one fuzzy set can also be a part of other fuzzy sets
in the same universe.
2. The degree of membership or truth is not same as probability, fuzzy truth represents
membership in vaguely defined sets.
3. A fuzzy set A~ in the universe of discourse, U, can be defined as a set of ordered pairs and it
is given by

1. When the universe of discourse, U, is discrete and finite, fuzzy set A~ is given by

1. Fuzzy sets also satisfy every property of classical sets.


2. Common Operations on fuzzy sets: Given two Fuzzy sets A~ and B~
 Union : Fuzzy set C~ is union of Fuzzy sets A~ and B~ :

Intersection: Fuzzy set D~ is intersection of Fuzzy sets A~ and B~ :

 Complement: Fuzzy set E~ is complement of Fuzzy set A~ :

\
Different Types of Membership Functions
 Membership function (MF) - A function that specifies the degree to
which a given input belongs to a set.
 Degree of membership- The output of a membership function, this
value is
always limited to between 0 and 1. Also known as a membership
value or membership grade.
 Membership functions are used in the fuzzification and
defuzzification
steps of a FLS (fuzzy logic system), to map the non-fuzzy input values
to fuzzy linguistic terms and vice versa.

o Membership Functions for T (temperature) = too-cold, cold,


warm, hot, too-hot.
 There are different forms of membership functions such as:
o Triangular.
o Trapezoidal.
o Piecewise linear.
o Gaussian.
o Singleton.
 Fuzzy singleton- A fuzzy set with a membership function that is unity
at a one particular point and zero everywhere else.
 Singleton output function- An output function that is given by a spike
at a
single number rather than a continuous curve. In the Fuzzy Logic
Toolbox it is only supported as part of a zero-order Sugeno model.

Fuzzy Membership Function: Basic


Concepts
 Support: elements having non-zero degree of membership.
 Core: set with elements having degree of 1.
 -Cut: set of elements with degree >= α.
 Height: maximum degree of membership.

Membership Functions in the Fuzzy


Logic Toolbox
 A membership function (MF) is a curve that defines how each point in
the input space is mapped to a membership value (or degree of
membership) between 0 and 1. The input space is sometimes referred
to as the universe of discourse.
 The only condition a membership function must really satisfy is that it
must vary between 0 and 1.
 The Fuzzy Logic Toolbox includes 11 built-in membership function
types. These 11 functions are, in turn, built from several basic
functions:
o Piecewise linear functions.
o Gaussian distribution function.
o Sigmoid curve.
o Quadratic polynomial curves.
o Cubic polynomial curves.
 The simplest membership functions are formed using straight lines.
These straight line membership functions have the advantage of
simplicity.
o Triangular membership function: trimf.
o Trapezoidal membership function: trapmf.
 Two membership functions are built on the Gaussian distribution
curve: a simple Gaussian curve and a two-sided composite of two
different Gaussian curves. The two functions are gaussmf and gauss2mf.
 The generalized bell membership function is specified by three
parameters and has the function name gbellmf.
 Sigmoidal membership function: sigmf.
 Polynomial based curves: Three related membership functions are the
Z, S, and Pi curves, all named because of their shape ( The functions
zmf, smf and pimf).

 Fuzzy Logic Toolbox also allows you to create your own membership
functions.

Example:
x = (0:0.1:10)';
y1 = trapmf (x, [2 3 7 9]);
y2 = trapmf (x, [3 4 6 8]);
y3 = trapmf (x, [4 5 5 7]);
y4 = trapmf (x, [5 6 4
6]); plot (x, [y1 y2 y3
y4]);
Fuzzy logic system
 Fuzzy logic system (FLS) can be defined as the nonlinear mapping of
an input data set to a scalar output data. A FLS consists of four main
parts:
o Fuzzifier (Fuzzification).
o Rules.
o Inference engine.
o Defuzzifier (Defuzzification).
 These components and the general architecture of a FLS are shown in
Figure.
Fuzzy Logic System

 The process of fuzzy logic:


o A crisp set of input data are gathered and converted to a fuzzy set
using fuzzy linguistic variables, fuzzy linguistic terms and
membership functions. This step is known as fuzzification.
o An inference is made based on a set of rules.
o The fuzzy output is mapped to a crisp output using the membership
functions, in the defuzzification step.
 Fuzzification- The process of generating membership values for a
fuzzy variable using membership functions.
 Defuzzification- The process of transforming a fuzzy output of a
fuzzy
inference system into a crisp output.

Fuzzy logic algorithm


1) Initialization process:
o Define the linguistic variables.

o Construct the fuzzy logic membership functions that define the


meaning or values of the input and output terms used in the rules.
o Construct the rule base (Break down the control problem into a
series of IF X AND Y, THEN Z rules based on the fuzzy logic rules).
2) Convert crisp input data to fuzzy values using the
membership functions (fuzzification).
3) Evaluate the rules in the rule base (inference).
4) Combine the results of each rule (inference).
5) Convert the output data to non-fuzzy values (defuzzification).
 Example: Air conditioner system controlled by a FLS (Figure). The
system adjusts the temperature of the room according to the current
temperature of the room and the target value. The fuzzy engine
periodically compares the room temperature and the target temperature,
and produces a command to heat or cool the room.

Simple FLS to Control an Air Conditioner

 Fuzzy Rules: In fuzzy expert systems, linguistic variables are used in


fuzzy rules. For example:
o IF wind is strong THEN sailing is good.
o IF project_duration is long THEN completion_risk is high.
o IF speed is slow THEN stopping_distance is short.
 For Air Conditioner example, the following rules can be used:
1) IF (temperature is cold OR too-cold) AND (target is
warm) THEN command is heat.
2) IF (temperature is hot OR too-hot) AND (target is warm) THEN
command is cool.
3) IF (temperature is warm) AND (target is warm) THEN command is
no- change.
 Defuzzification: The result is a fuzzy value and should be defuzzified
to obtain a crisp output. This is the purpose of the defuzzifier component
of a FLS. Defuzzification is performed according to the membership
function of the output variable.
o This defuzzification is not part of the 'mathematical fuzzy logic' and
various strategies are possible.
o The mostly-used algorithms for defuzzification are listed.
1) Finding the center of gravity.
2) Finding the center of gravity for singletons.
3) Finding the average mean.
4) Finding the left most maximum.
Finding the right most maximum

You might also like