8/7/2019 fuzzylogic basic
1/35
Fuzzy Logic
Presented by: Mahesh Todkar
8/7/2019 fuzzylogic basic
2/35
Content What is Fuzzy?
Sets Theory
What is Fuzzy Logic?
Why use Fuzzy Logic?
Theory of Fuzzy Sets
Vocabulary Fuzzy if-then Rules
Fuzzy Logic Operations
Fuzzy Inference Systems (FIS) Fuzzy Inference Process
References
8/7/2019 fuzzylogic basic
3/35
What is Fuzzy? Fuzzy means
not clear, distinct or precise;
not crisp (well defined);
blurred (with unclear outline).
8/7/2019 fuzzylogic basic
4/35
Sets TheoryClassical Set: An element either belongs or does not
belong to a sets that have been defined.
Fuzzy Set: An element belongs partially or gradually tothe sets that have been defined.
8/7/2019 fuzzylogic basic
5/35
What is Fuzzy Logic? It has two different meanings as,
In narrow sense: Fuzzy logic is a logical system,
which is an extension of multi-valued logic.
In a wider sense: Fuzzy logic (FL) is almostsynonymous with the theory of fuzzy sets, a theory
which relates to classes of objects with unsharpboundaries in which membership is a matter ofdegree.
Fuzzy logic (FL) should be interpreted in its widersense
8/7/2019 fuzzylogic basic
6/35
What is Fuzzy Logic? A way to represent variation or imprecision in logic
A way to make use of natural language in logic
Approximate reasoning
e n on o uzzy og c:
A form of knowledge representation suitable for
notions that cannot be defined precisely, but whichdepend upon their contexts.
Superset of conventional (Boolean) logic that has beenextended to handle the concept of partial truth - the truthvalues between "completely true & completely false".
8/7/2019 fuzzylogic basic
7/35
Why use Fuzzy Logic? Conceptually easy to understand
Flexible
Tolerant of imprecise data
can mo e non near unc ons o ar rary comp ex y
FL can be built on top of the experience of experts
FL can be blended with conventional control techniques
FL is based on natural language
8/7/2019 fuzzylogic basic
8/35
Theory of Fuzzy SetsClassical Set Fuzzy Set
8/7/2019 fuzzylogic basic
9/35
Theory of Fuzzy Sets Theory which relates to classes of objects with unsharp
boundaries in which membership is matter of degree
Thus every problem can be presented in terms ofFuzzy Sets
A set without crisp
Fuzz set describes va ue conce ts
Fuzzy set admits the possibility of partial membershipin it
Degree of an object belongs to Fuzzy Set is denoted bymembership value between 0 to 1
Membership Function (MF) associated with a givenFuzzy Set maps an input value to its appropriatemembership value
8/7/2019 fuzzylogic basic
10/35
Vocabulary Linguistic Variable:Variable whose values are words
or sentences rather than numbers
It represent qualities spanning a particular spectrum
Example: Speed, Service, Tip, Temperature, etc.
Linguistic Value or Term:Values or Terms used to
describe Linguistic Variable
Example: For Speed (Slowest, Slow, Fast, Fastest), ForService (Poor, Good, Excellent), For Temperature(Freezing, Cool, Warm, Hot), etc.
8/7/2019 fuzzylogic basic
11/35
Vocabulary Universe of Discourse or Universe or Input Space (U):
Set of all possible elements that can come intoconsideration, confer the set U in (1).
It depends on context.
Elements of a fuzz set are taken from a Universe of
Discourse.
An application of the universe is to suppress faultymeasurement data.
Example:
Set of x >> 1 could have as a universe of all real numbers,alternatively all positive integer.
8/7/2019 fuzzylogic basic
12/35
Vocabulary Membership Function (MF) is a curve that defines how
each point in the input space is mapped to a membership
value between 0 and 1. It is denoted by .
Membership value is also called as degree of membership.
Types of Membership Functions:
Piece-wise linear functions
Gaussian distribution function
Sigmoid curve
Quadratic and cubic polynomial curves
Singleton Membership Function
8/7/2019 fuzzylogic basic
13/35
Membership Functions
8/7/2019 fuzzylogic basic
14/35
Syntax of Fuzzy Set
A = {x, A(x) | x X}
Where,
A Fuzzy Set
x Elements of XX Universe of Discourse
A(x) Membership Function of x in A
8/7/2019 fuzzylogic basic
15/35
Fuzzy if-then Rules Statements used to formulate the conditional statements
that comprise fuzzy logic
Example:if x is A then y is B
where,
A & B Linguistic valuesx Element of Fuzzy set X
y Element of Fuzzy set Y
In above example,
Antecedent (or Premise) if part of rule (i.e. x is A)
Consequent (or Conclusion) then part of rule (i.e. y is B)
Antecedent is interpretation & Consequent is assignment
8/7/2019 fuzzylogic basic
16/35
Fuzzy if-then Rules Antecedent is combination of proposals by AND, OR, NOT
operators
Consequent is combination of proposals linked by ANDoperators. OR and NOT operators are not used inconsequents as these are cases of uncertainty.
Example:
If it is early, then John can study.
Universe: U = {4,8,12,16,20,24}; time of day
Input Fuzzy set: early = {(4,0),(8,1),(12,0.9),(16,0.7),(20,0.5),(24,0.2)}
Output Fuzzy set: can study=singleton Fuzzy set (assume) so study =1
i.e. at 20 (8 pm), early (20) = 0.5
8/7/2019 fuzzylogic basic
17/35
Fuzzy if-then Rules Interpreting if-then rule is a threepart process
1) Fuzzify Input: Resolve all fuzzy statements in the
antecedent to a degree of membership between 0 and 1.2)Apply fuzzy operator to multiple part antecedents:
If there are multiple parts to the antecedent, apply fuzzy
number between 0 and 1.
3)Apply implication method: The output fuzzy sets
for each rule are aggregated into a single output fuzzy
set. Then the resulting output fuzzy set is defuzzified, orresolved to a single number.
8/7/2019 fuzzylogic basic
18/35
Fuzzy if-then RulesInterpreting if-then rule is a threepart process:
8/7/2019 fuzzylogic basic
19/35
Fuzzy Logic Operations Fuzzy Logic Operators are used to write logic
combinations between fuzzy notions (i.e. to performcomputations on degree of membership)
Zadeh operators
1) Intersection: The logic operator corresponding tothe intersection of sets is AND.
(A AND B) = MIN((A), (B))
2) Union: The logic operator corresponding to theunion of sets is OR.
(A OR B) = MAX((A), (B))
3) Negation: The logic operator corresponding to thecomplement of a set is the negation.
(NOT A) = 1 - (A)
8/7/2019 fuzzylogic basic
20/35
Fuzzy Logic Operations
8/7/2019 fuzzylogic basic
21/35
Fuzzy Inference Systems (FIS) Fuzzy Inference is the process of formulating the mapping
from a given input to an output using fuzzy logic.
Process of fuzzy inference involves Membership Functions(MF), Logical Operations and If-Then Rules.
FIS having multidisciplinary nature, so cab called as- - , ,
modeling, fuzzy associative memory, fuzzy logiccontrollers, and simply (and ambiguously) fuzzy systems.
Types of FIS:
1) Mamdani-type: Most commonly used. Expects the output MFs tobe fuzzy sets.
2) Sugeno-type: Output MFs are either linear or constant.
8/7/2019 fuzzylogic basic
22/35
Fuzzy Inference ProcessTo describe the fuzzy inference process, lets consider theexample of two-input, one-output, two-rule valve controlproblem.
8/7/2019 fuzzylogic basic
23/35
Fuzzy Inference ProcessStep 1: Fuzzify Input (Fuzzification)
Take the inputs and determine the degree to which theybelong to each of the appropriate fuzzy sets viamembership functions.
Input is always a crisp numerical value limited to the.
Output is a fuzzy degree of membership in thequalifying linguistic set.
Each input is fuzzified over all the qualifyingmembership functions required by the rules.
8/7/2019 fuzzylogic basic
24/35
Fuzzy Inference ProcessStep 1: Fuzzify Input (Fuzzification)
8/7/2019 fuzzylogic basic
25/35
Fuzzy Inference ProcessStep 2 : Apply Fuzzy Operator
If the antecedent of a given rule has more than one
part, the fuzzy operator is applied to obtain onenumber that represents the result of the antecedent
for that rule.
The input to the fuzzy operator is two or moremembership values from fuzzified input variables.
The output is a single truth value.
8/7/2019 fuzzylogic basic
26/35
Fuzzy Inference ProcessStep 2 : Apply Fuzzy Operator
8/7/2019 fuzzylogic basic
27/35
Fuzzy Inference ProcessStep 3: Apply Implication Method
First must determine the rules weight.
Operation in which the result of fuzzy operator is used todetermine the conclusion of the rule is called as
im lication.
The input for the implication process is a single numbergiven by the antecedent.
The output of the implication process is a fuzzy set.
Implication is implemented for each rule.
8/7/2019 fuzzylogic basic
28/35
Fuzzy Inference ProcessStep 3: Apply Implication Method
Antecedent Consequent
8/7/2019 fuzzylogic basic
29/35
Fuzzy Inference ProcessStep 4 : Aggregate All Outputs
Aggregation is the process by which the fuzzy sets that
represent the outputs of each rule are combined into asingle fuzzy set.
A re ation onl occurs once for each out ut variable.
The input of the aggregation process is the list oftruncated output functions returned by the implicationprocess for each rule.
The output of the aggregation process is one fuzzy setfor each output variable.
8/7/2019 fuzzylogic basic
30/35
Fuzzy Inference ProcessStep 4 : Aggregate All Outputs
8/7/2019 fuzzylogic basic
31/35
Fuzzy Inference ProcessStep 5: Defuzzify
Move from the fuzzy world to the real world is
known as defuzzification. The input for the defuzzification process is a fuzzy set.
The output is a single number.
The most popular defuzzification method is thecentroid calculation, which returns the center of areaunder the curve
Other methods are bisector, middle of maximum (the
average of the maximum value of the output set),largest of maximum, and smallest of maximum.
8/7/2019 fuzzylogic basic
32/35
Fuzzy Inference ProcessStep 5: Defuzzify
8/7/2019 fuzzylogic basic
33/35
References Fuzzy Logic Toolbox 2 Users Guide
Tutorial On Fuzzy Logic by Jan Jantzen
Fuzzy Logic by Cahier Technique Schneider
8/7/2019 fuzzylogic basic
34/35
u
8/7/2019 fuzzylogic basic
35/35
y u