0% found this document useful (0 votes)
35 views34 pages

Fuzzy Lec2

The document discusses fuzzy logic concepts like fuzzy implications, fuzzy rule-based systems, Takagi-Sugeno fuzzy systems and defuzzification. It provides examples of fuzzy rules and membership functions to illustrate these concepts.

Uploaded by

rishivm2003
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)
35 views34 pages

Fuzzy Lec2

The document discusses fuzzy logic concepts like fuzzy implications, fuzzy rule-based systems, Takagi-Sugeno fuzzy systems and defuzzification. It provides examples of fuzzy rules and membership functions to illustrate these concepts.

Uploaded by

rishivm2003
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/ 34

Connectives

If either the Arsenal or the Liverpool lose and the United win, then the
Chelesa will be out of first place, and I will lose a bet.

Arsenal lose (p), Liverpool lose (c), United win (g), Chelesa will be out
of first place(d), I will lose a bet (b)
Fuzzy rule as a relation
if x is A then y is B
“x is A”, “y is B” – fuzzy predicates A(x), B(y)
if A(x) then B(y) can be represented as a relation
R(x,y): A(x) B(y)
where R(x,y) can be considered a fuzzy set with 2-dimentional
membership function
μR(x,y)=f(μA(x), μ B(y))
where f is fuzzy implication function.
MIN fuzzy implication
Interprets the fuzzy implication as the minimum operation [Mamdani].

PRODUCT fuzzy implication


Interprets the fuzzy implication as the product operation [Larsen].
An adequate architecture for the knowledge-based model of a controller is illustrated
below:
Fuzzification involves the choice of variables, fuzzy input and output variables and
defuzzified output variable(s), definition of membership functions for the input variables
and the description of fuzzy rules. The membership functions defined on the input
variables are applied to their actual values to determine the degree of truth for each rule
premise. The degree of truth for a rule's premise is sometimes referred to as its a
(alpha) value. If a rule's premise has a non-zero degree of truth, that is if the rule
applies at all, then the rule is said to fire.
• The knowledge base contains information about the boundaries,
possible transformations of the domains, and the fuzzy sets with
their corresponding linguistic terms. This information represents the
data base. In addition, the knowledge base contains a rule base
consisting of linguistic control rules.

• The decision logic represents the processing unit. It determines the


corresponding output value from the measured input according to
the knowledge base.

• The defuzzification interface has the task of determining a crisp
output value – taking the information about the control variable
provided by the decision logic into account. Finally, if necessary, it
carries out a transformation of the output value into the appropriate
domain.
Defuzzification
Example
A Company gives loans using the following rules:
IF Salary is Excellent OR Debts are Small THEN Risk is Low
IF Salary is Good AND Debts are Large THEN Risk is Normal
IF Salary is Poor THEN Risk is High
The membership functions for the linguistic variables Salary, Debts, and Risk
are given as in ₨ K are
Jim has applied for a loan: his salary is ₨ 55K and his debts amount to
₨ 50K. Use the rule base to compute the risk associated with Jim
using the mean of maxima in the Defuzzification task.
Poor Good Excellent

10
50 60 90 100 120 Salary
Small Large

10 15 50 60 Debts
Low Medium High

20 40 60 80 Risk
Salary 55, Debt 50
risk medium
salary good
debt large

0.2
50 100 15 60 20 80

55 50

risk high
salary poor

0.1

10 60 60

55
20 60 80 100
Takagi-Sugeno Method

A known disadvantage of the linguistic modules is


that they do not contain in an explicit form the
objective knowledge about the system if such
knowledge cannot be expressed and/or
incorporated into fuzzy set framework.
Typically, such knowledge is available often: for
example in physical systems this kind of knowledge
is available in the form of general conditions
imposed on the system through conservation laws,
including energy mass or momentum balance, or
through limitations imposed on the values of
physical constants.
Takagi, T., & Sugeno, M. (1985). ‘Fuzzy Identification of Systems and its
Applications to Modeling and Control’. IEEE Transactions on Systems, Man
and Cybernetics. Volume No. SMC-15 (No.1) pp 116-132.

Tomohiro Takagi and Michio Sugeno recognised two


important points:
• Complex technological processes may be described in
terms of interacting, yet simpler sub processes. This is
the mathematical equivalent of fitting a piece-wise
linear equation to a complex curve.
• The output variable(s) of a complex physical system,
e.g. complex in the sense it can take a number of input
variables to produce one or more output variable(s),
can be related to the system's input variable in a linear
manner provided the output space can be subdivided
into a number of distinct regions.
Takagi and Sugeno (1985) have argued that in order to
develop a generic and simple mathematical tool for
computing fuzzy implications one needs to look at a
fuzzy partition of fuzzy input space. In each fuzzy
subspace a linear input-output relation is formed.
The output of fuzzy reasoning is given by the values
inferred by some implications that were applied to
an input.
Consider a domain where all fuzzy sets are associated with
linear membership functions.

Let us denote the membership function of a fuzzy set A as


mA(x), x X. All the fuzzy sets are associated with linear
membership functions. Thus, a membership function is
characterised by two parameters giving the greatest grade 1
and the least grade 0.

The truth value of a proposition “x is mA and y is mB” is


expressed as

x is μ A and y is μ B  μ A  μB
Takagi and Sugeno have described a fuzzy implication R is of the format:
R: if (x1 is mA(x1),… xk is mA(xk)) then y = g(x1, …, xk)
Where:

Variable of the consequence whose value is


y inferred

Variables of the premise that appear also in


x1, …, xk the part of the consequence

mA(x1),….. mA(x1) Fuzzy sets with linear membership functions


representing a fuzzy subspace in which the
implication R can be applied for reasoning.

Logical function connects the propositions


f in the premise.

Function that implies the value of y when


g x1,…. xk satisfies the premise.
In the premise if mA(xi) is equal to Xi for some i where Xi is the
universe of discourse of xi, this term is omitted; xi is
unconditioned. The following example will help in clarifying
the argumentation related to 'conditioned' and 'unconditioned'
terms in a given implication:

R: if x1 is small and x2 is big then y = x1 + x2 + 2x3.

The above implication comprises two conditioned premises, x1


and x2, and one unconditioned premise, x3. The implication
suggests that if x1 is small and x2 is big, then the value of y
would depend upon and be equal to the sum of x1, x2, and 2x3,
where x3 is unconditioned in the premise.
Typically, for a Takagi-Sugeno controller, an implication is
written as:

R: if x1 is m1 and … and xk is mk
then y = p0 + p1x1 + … + pkxk.

The assumption here is that only ‘and’ connectives are used in


the antecedants or premises of the rules. And, that the
relationship between the output and inputs is strictly a
LINEAR (weighted average) relationship. (The weights here
are p0, p1….. pk).
Consider a system with n implications (rules); the variable of
consequence, y, will have to be notated for each of these implications,
leading to yi variables of consequence. There are three stages of
computations in Takagi-Sugeno controllers:
FUZZIFICATION: Fuzzify the input. For all input variables compute the
implication for each of the rules;
INFERENCE or CONSEQUENCES: For each implication compute the
consequence for a rule which fires. Compute the output y for the rule by
using the linear relationship between the inputs and the output (y = p0 +
p1x1 + … + pkxk.).
AGGREGATE (& DEFUZZIFICATION): The final output y is inferred
from n-implications and given as an average of all individual implications
yi with weights |y= yi |:
y = (S |y= yi | * yi )/ S |y= yi |
Consider the following fuzzy implications (or rules) R1,R2,
R3 used in the design of a Takagi-Sugeno controller:

R1  If x1 is small1 & x2 is small2 then y(1) =x1+x2


R2 If x1 is big1 then y(2) = 2x1
R3 If x2 is big2 then y(3) =3x2
where y (i) refers to the consequent variable for each rule
labelled Ri and x1 and x2 refer to the input variables that
appear in premise of the rules.
The membership function for small1, small2, big1 and big2 are
given as follows x Small1 Small2 Big1 Big2
0 1 1 0 0
1 0.938 0.875 0 0
2 0.875 0.75 0 0
3 0.813 0.625 0 0.125
4 0.75 0.5 0 0.25
5 0.688 0.375 0 0.375
6 0.625 0.25 0 0.5
7 0.563 0.125 0 0.625
8 0.5 0 0 0.75
9 0.438 0 0 0.875
10 0.375 0 0 1
11 0.313 0 0.1 1
12 0.25 0 0.2 1
13 0.188 0 0.3 1
14 0.125 0 0.4 1
15 0.063 0 0.5 1
16 0 0 0.6 1
17 0 0 0.7 1
18 0 0 0.8 1
19 0 0 0.9 1
20 0 0 1 1
The membership function for small1, small2, big1 and big2 are
given as follows
Takagi-Sugeno Example pp 117

1
0.9
0.8
Membership Function

0.7
Small1
0.6
0.5
Small2
0.4
0.3 Big1
0.2
0.1 Big2
0
0 5 10 15 20
Input x
Let us compute the FINAL OUTPUT y for the following
values:
x1 = 12 & x2 = 5
using Takagi and Sugeno’s formula:
y = (S |y= yi | * yi )/ S |y= yi |
where |y= yi | stands for the truth value of a given proposition.
FUZZUFICATION: We have the following values of the membership
functions for the two values x1 = 12 & x2 = 5:

Small1 Small2 Big1 Big2


x 1= 12 0.25 0 0.2 1
x 2= 5 0.688 0.375 0 0.375
INFERENCE & CONSEQUENCE:
x1 = 12 & x2 = 5

Truth Value
Min (Premise 1 &
Rule Premise 1 Premise 2 Consequenc Premise2)
e

R1 Small1 ( x1 ) = Small2 ( x2 )= y(1)= x1 + x2 Min(0.25,


0.25 0.375 =12+5 0.375)=0.25

R2 Big1 ( x1 ) = y(2)= 2x1 0.2


0.2 = 24

R3 Big2 ( x2 ) = y(3)= 3x2 0.375


0.375 = 15
AGGREGATION (&DEFUZZIFICATION):
x1 = 12 & x2 = 5
y = (S |y= yi | * yi )/ S |y= yi |
Using a Centre of Area computation for y we get:

 y  y (i ) * y ( i )
i 1,3
y 
(i )
 y  y
i 1,3
0.25 *17  0.2 * 24  0.375 *15
y   17.8
0.25  0.2  0.375
In Sugeno’s model, each rule has a crisp output, the
overall input is obtained by a weighted average –
this avoids the time-consuming process of
defuzzification required in a Mamdani model. The
weighted average operator is replaced by a
weighted sum to reduce computation further.

You might also like