0% found this document useful (0 votes)
14 views39 pages

Fuzzy Logic(Principles & Applications)

The document provides an overview of fuzzy logic, including its fundamental concepts, types of algorithms, and applications in various fields such as control systems and artificial intelligence. It explains the principles of fuzzification and defuzzification, the use of fuzzy sets, and the differences between fuzzy and traditional logic. Additionally, it outlines the process of creating fuzzy rules and the advantages of using fuzzy logic for complex system optimization.

Uploaded by

fun73499
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)
14 views39 pages

Fuzzy Logic(Principles & Applications)

The document provides an overview of fuzzy logic, including its fundamental concepts, types of algorithms, and applications in various fields such as control systems and artificial intelligence. It explains the principles of fuzzification and defuzzification, the use of fuzzy sets, and the differences between fuzzy and traditional logic. Additionally, it outlines the process of creating fuzzy rules and the advantages of using fuzzy logic for complex system optimization.

Uploaded by

fun73499
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/ 39

Fuzzy Logic

[Principles & Applications]


Asst.Lect Hussein.s. Radhi
 Fundamental fuzzy concepts
 Fuzzy propositional and predicate logic
 Fuzzification
 Defuzzification
 Fuzzy control systems
 Types of fuzzy algorithms
 Applications of fuzzy logic
 Fuzzy concepts first introduced by Zadeh in
the 1960s and 70s
 Traditional computational logic and set
theory is all about
 true or false
 zero or one
 in or out (in terms of set membership)
 black or white (no grey)
 Not the case with fuzzy logic and fuzzy sets!
Basic Concepts
Approximation (“granulation”)
A color can be described precisely using
RGB values, or it can be approximately
described as “red”, “blue”, etc.

Degree (“graduation”)
Two different colors may both be
described as “red”, but one is considered
to be more red than the other
Fuzzy logic attempts to reflect the
human way of thinking
Fuzzy set
 A set X in which each element y has a grade
of membership μX(y) in the range 0 to 1, i.e.
set membership may be partial e.g. if cold is
a fuzzy set, exact temperature values might
be mapped to the fuzzy set as follows:
 15 degrees → 0.2 (slightly cold)
 10 degrees → 0.5 (quite cold)
 0 degrees → 1 (totally cold)
 Relationships can also be expressed on a
scale of 0 to 1
 e.g. degree of resemblance between two
people

Fuzzy variable
 Variable with (labels of) fuzzy sets as its
values
Linguistic hedge
Term used as a modifier for basic terms in
linguistic values e.g. words such as very, a bit,
rather, somewhat, etc.
 Fuzzy logic can be seen as an extension of
ordinary logic, where the main difference is
that we use fuzzy sets for the membership of
a variable
 We can have fuzzy propositional logic and
fuzzy predicate logic
 Fuzzy logic can have many advantages over
ordinary logic in areas like artificial
intelligence where a simple true/false
statement is insufficient
Propositional logic:
 Propositional logic is a formal system that uses true
statements to form or prove other true statements
 There are two types of sentences: simple sentences and
compound sentences
 Simple sentences are propositional constants;
statements that are either true or false
 Compound sentences are formed from simpler
sentences by using negations ¬, conjunctions ∧,
disjunctions ∨, implications ⇒, reductions ⇐, and
equivalences ⇔
 Predicate logic:
 Onto propositional logic, this adds the ability to
quantify variables, so we can manipulate statements
about all or some things
Fuzzy Propositional Logic
 Like ordinary propositional logic, we introduce
propositional variables, truth-functional
connectives, and a propositional constant 0
 Some of these include:
 Monoidal t-norm-based propositional fuzzy logic
 Basic propositional fuzzy logic
 Łukasiewicz fuzzy logic
 Gödel fuzzy logic
 Product fuzzy logic
 Rational Pavelka logic
 These extend fuzzy propositional
logic by adding universal and
existential quantifiers in a manner
similar to the way that predicate
logic is created from propositional
logic
 As described by Zadeh (1973)…
 NOT X = 1 - μX(y)
e.g. 0.8 cold → (1 – 0.8) = 0.2 NOT cold
 X OR Y (union) = max(μX(y), μY(y))
e.g. 0.8 cold, 0.5 rainy → 0.8 cold OR rainy
 X AND Y (intersection) = min(μX(y), μY(y))
e.g. 0.9 hot, 0.7 humid → 0.7 hot AND
humid
 Zadeh’s definition of AND used the Gödel t-norm, but
other definitions are possible using different t-norms
 Common examples:
 Product t-norm: μX(y) * μY(y) e.g. 0.9 hot, 0.7 humid
→ 0.63 hot AND humid
 Lukasiewicz t-norm: max(μX(y) + μY(y) - 1, 0) e.g.
0.9 hot, 0.7 humid → 0.6 hot AND humid
 Similar possibilities for OR using corresponding t-
conorms:
 Product t-conorm: μX(y) + μY(y) - μX(y) * μY(y) e.g.
0.8 cold, 0.5 rainy → 0.9 cold OR rainy
 Lukasiewicz t-conorm: min(μX(y) + μY(y), 1) e.g. 0.8
cold, 0.5 rainy → 1 cold OR rainy
BLOCK DAIGRAM
*When making inferences, we want to
clump the continuous numerical values
into sets
*Unlike Boolean logic, fuzzy logic uses
fuzzy sets rather than crisp sets to
determine the membership of a variable
*This allows values to have a degree of
membership with a set, which denotes the
extent to which a proposition is true
*The membership function may be
triangular, trapezoidal, Gaussian or any
other shape
 To apply fuzzy inference, we need our input
to be in linguistic values
 These linguistic values are represented by the
degree of membership in the fuzzy sets
 The process of translating the measured
numerical values into fuzzy linguistic values
is called fuzzification
 In other words, fuzzification is where
membership functions are applied, and the
degree of membership is determined
There are largely four types of fuzzifiers:
 singleton fuzzifier,
 Gaussian fuzzifier,
 Trapezoidal or triangular fuzzifier
 Triangular fuzzifier
Defuzzification
.Defuzzification is the process of
producing a quantifiable result in
fuzzy logic
.The fuzzy inference will output a
fuzzy result, described in terms of
degrees of membership of the fuzzy
sets
.Defuzzification interprets the
membership degrees in the fuzzy
sets into a specific action or real-
value
Methods of Defuzzification
*There are many methods for defuzzification
* One of the more common types of
defuzzification technique is the maximum
defuzzification techniques. These select the
output with the highest membership function
They include:
1- First of maximum
2- Middle of maximum
3- Last of maximum
4-Mean of maxima
5- Random choice of maximum
1-The first of
maximum, middle of
maximum, and last of
maximum would be -2,
-5, and -8 respectively
as seen in the diagram
2-The mean would give
the same result as
middle unless there is
more than one plateau
with the maximum
value
 The inference engine in a fuzzy system
consists of linguistic rules
 The linguistic rules consist of two parts:
 an antecedent block (the conditions), which
consists of the linguistic variables
 a consequent block (the output)
 Algorithm that includes at least some fuzzy
instructions, such as conditional or
unconditional action statements
 Fuzzy conditional statement (A → B)
 Conditional statement in which A and/or B are
fuzzy sets e.g. IF temperature is hot THEN fan
speed is high
 Defined in terms of a fuzzy relation between
the respective “universes of discourse” of A and
B (compositional rule of inference) e.g. relation
between temperature groupings and fan
speeds
A- Definitional algorithms
 Define a fuzzy set or calculate grades of membership
of elements, e.g.:
handwritten characters (what could an “M” look like?)
measures of proximity (what counts as close?)

B- Generational algorithms
Generate a fuzzy set e.g. an arbitrary sentence in
some
natural language that needs to be grammatically valid
according to various rules
C-Relational algorithms
Describe a relation between fuzzy variables
Can be used to approximately describe behaviour of a
system
e.g. in our cooling fan example, describing the
relation between the input variable (temperature) and
output variable (fan speed)

D-Decisional algorithms
Approximately describe a strategy for performing
some task, e.g. approaching a set of traffic lights
(should we slow down, stop or proceed at current
speed?)
navigating a robot towards a goal while avoiding
obstacles
Applications of Fuzzy Logic
Control Systems
1-Consumer systems
2-automatic transmissions
3-washing machines
4-camera autofocus
Industrial systems
1-aircraft engines
2-power supply regulation
3-steam turbine start-up
E-Artificial Intelligence

1-Robot motion planning


2-Image segmentation
3-Medical diagnosis
systems
Why use fuzzy logic for control?
Simple systems:
Low development costs
Low maintenance costs
Complex systems:
Reduced run-time
Reduced search space for efficient
optimization
Fuzzy logic:
 Is used to quickly translate from expert
knowledge to code
 Expert knowledge reduces the search space
when optimizing the system
1.Identify performance measure
2.Select input/output variables
3.Determine fuzzy rules
*Talking to an expert
*Data mining
4.Decide on membership functions for the
fuzzy
variables
5.Tune membership functions and/or rules
Control system using HIL, PID and Fuzzy Logic
with Rapid Prototyping
Rules
 1. If (Error is very low) then (Control is Decrease)

 2. If (Error is none) then (Control is none)


 3. If (Error is very high) then (Control is Increase)

 4. If (Error is low) then (Control is Few Decrease)

 5. If (Error is high) then (Control is Few Increase)

You might also like