0% found this document useful (0 votes)
19 views

Module 5

Fuzzy logic

Uploaded by

Ishant Bansal
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)
19 views

Module 5

Fuzzy logic

Uploaded by

Ishant Bansal
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/ 93

SOFT COMPUTING (SWE1015)

Module 5: FUZZY LOGIC AND APPROXIMATE


REASONING

Dr Chiranji Lal Chowdhary


VIT Vellore
SYLLABUS

• Fuzzy truth values


• Fuzzy propositions
• Fuzzy rules:
• Formation of rules
• Decomposition of rules
• Aggregation of rules
• Fuzzy reasoning
• FIS
• Fuzzy Decision Making
LOGIC
 It is an analytical theory of art of reasoning
• Goal is to systematize and codify principles of valid reasoning

 Father of Logic: Greek philosopher , Aristotle(384-322 B.C.)

 The modern symbolic logic started with the book “Begriff ss


chrift (1879)”
 by Gottlob Frege (1848 – 1925)(Father of Modern Logic)
 who developed a system of logic for use in his study of the
foundations of arithmetic
LOGICAL CONNECTIVES
 Consider the proposition p and q whose truth values belong to
the truth value set {0, 1}. The meaning of the logical
connectives is given by definitions and expressed by equations
in which p and q stand for the truth values of the propositions
p and q.

 Negation we have ~ p = 1− p
 Conjunction we have p  q = min( p, q)
 Disjunction we have p  q = max( p, q)
 Implication we have p → q = min(1,1 + q − p)
 Equivalence we have p  q = 1− | p − q |
SOME IMPORTANT PROPERTIES

• CONTRADICTION: p p

• TAUTOLOGY: p p

• MODUS PONENS: p  ( p → q) → q

• MODUS TOLENS: q  ( p → q) → p
FUZZY LOGIC
• Founder is L.A.Zadeh (started in 1973)
• Introduced the idea of Linguistic variables and compositional
rules of inference

• Fuzzy logic as the name suggests, is the logic underlying


models of reasoning which are approximate rather than exact

• Fuzzy logic provides an effective conceptual framework for


dealing with the problem of knowledge representation in an
environment of uncertainty and imprecision
FUZZY LOGIC BASIC (CONTD….)
• A precise definition telling us what fuzzy logic is does not exist

• Although there is not a unique system of knowledge called


fuzzy logic its meaning can be explained

• There is a correspondence (isomorphism) between classical


sets and classical logic

• Fuzzy sets are a generalization of classical sets and infinite-


valued logic is a generalization of classical logic.
• There is a correspondence (isomorphism) between these two
areas.
FUZZY LOGIC BASICS (CONTD…..)
 Fuzzy logic uses as a major tool fuzzy set theory

 Basic mathematical ideas for fuzzy logic evolve from infinite-


valued logic, thus there is a link between the two logics

 Fuzzy logic can be considered as an extension of infinite-


valued logic in the sense of incorporating fuzzy sets and fuzzy
relations into the system of infinite –valued logic.

 FUZZY LOGIC FOCUSES ON LINGUISTIC VARIABLES IN NATURAL


LANGUAGES AND AIMS TO PROVIDE FOUNDATIONS FOR
APPROXIMATE REASONING WITH IMPRECISE PROPOSITIONS
Evolvement of Fuzzy Logic

Classical
Infinite-
Logic valued
Logic

Fuzzy
Logic

Fuzzy Sets
Classical
Sets

Fuzzy Numbers
DOMAIN OF FUZZY LOGIC
• Fuzzy logic deals with:

1.Linguistic variables
2.Linguistic modifiers
3.Propositional fuzzy logic
4.Inferential rules
5.Approximate reasoning
LINGUISTIC VARIABLES
• Linguistic Variables: Those variables whose values are words
or sentences in natural or artificial languages
• Example: The word ‘Age’ used in natural language
• Age is a linguistic variable taking values very young, young,
middle age, old and very old, called the terms of the linguistic
variable age.
• The terms are fuzzy sets
• Each term is defined by a membership function.
• Consider the universal set U = [0, 100]
MEMBERSHIP FUNCTIONS OF TERMS FOR
LINGUISTIC VARIABLE “OLD”

very young ( x) = 1 for 0  x  5,


= (30 − x) / 25 for 5  x  30.

 young ( x) = ( x − 5) 25 for 5  x  30,


= (50 − x) 2 0 for 30  x  50

middle age ( x) = ( x − 30) 20 for 30  x  50,


= (70 − x) 2 0 for 50  x  70.
MEMBERSHIP FUNCTIONS OF TERMS FOR
LINGUISTIC VARIABLE “OLD” CONTD…
• Continuing

old ( x) = ( x − 50) 20 for 50  x  70,


= (90 − x) 20 for 70  x  90.

very old ( x) = ( x − 70) 20 for 70  x  90,


=1 for 90  x  100.
Terms of the linguistic variable age

 AGE

M
e Very Young Young middle age old Very old
m
b
e
r
s
h
i
p
X
0 5 30 50 70 90 100

Age in years→
LINGUISTIC MODIFIERS
 Let x U and A is a fuzzy set with membership function  A ( x)
 We denote by m a linguistic modifier, for instance very, not
fairly etc.
 Then by mA we mean a modified fuzzy set by m whose
membership function mA ( x) is a composition of a suitable
function f(x) and  A ( x)
expressed as mA ( x) = f (  A ( x)).
 Examples:
 Not: f(x) = 1 – x, notA ( x) = 1 −  A ( x),
 Very: f(x)= ( x)2 veryA ( x) = [  A ( x)]2
 Fairly: f(x)= ( x)1/ 2  fairlyA ( x) = [  A ( x)]1/ 2

TRUTH (Baldwin, 1979)
• The most important linguistic variable
• It is described by a fuzzy set with membership function
• Truth and its terms have been defined differently in fuzzy
logic. The simplest definition is
true ( x) = x, x  [0,1]

• The modifiers applied to


true = {( x, true ( x)) x  [0,1], true ( x) = x, x  [0,1]}.
not true ( x) =  false ( x) = 1 − x
very true ( x) = [ true ( x)]2 = x 2 .
 fairly true ( x) = [ true ( x)]1/ 2 = x1/ 2 .
APPROXIMATE REASONING
 Approximate reasoning uses fuzzy sets and fuzzy logic to
model human reasoning.
 It lacks the precision of the exact reasoning in classical logic
but it is more effective dealing with complex and ill-defined
systems.
 It is an active area of research with some topics still under
discussion and debate:
1.Qualification & Quantification rules
2.Compositional rules for inference
3.Truth modifications
EXAMPLE
 Classical Modus ponens: p  ( p → q) → q
 This is an implication tautology
 In order to assign inference validity to modus ponens we
consider it as a procedure for deriving true propositions
 Such a rule expressed in symbolic form with the scheme called
syllogism
 Premise 1 p
 Premise 2 p→q
 Conclusion q
EXAMPLE (CONTD….)

• More detail form:


Premise 1: x is A
Premise 2: If x is A then y is B
Conclusion: y is B
• (Say) x = Socrates, A= a man, B = mortal
• Premise 1: Socrates is a man
• Premise 2: If Socrates is a man then Socrates is
mortal
• Conclusion: Socrates is mortal
TAUTOLOGY

• A statement is said to be a tautology iff it assumes the truth


value TRUE for all possible assignment of truth values to its
primary components
• Modus Ponens is a Tautology
• We have the following tautological equivalences:
F p p
FpF
T  p T
Tp p
EXAMPLE (CONTD….)

• More detail form:


Premise 1: x is A
Premise 2: If x is A then y is B
Conclusion: y is B
• (Say) x = Socrates, A= a man, B = mortal
• Premise 1: Socrates is a man
• Premise 2: If Socrates is a man then Socrates is
mortal
• Conclusion: Socrates is mortal
GENERALISED MODUS PONENS

 Premise 1: p’ (p’ is approximately equal to p)


 Premise 2: p→q
 Conclusion: q’ (q’ is approximately equal to q)
Equivalently
 Premise 1: x is A’
 Premise 2: If x is A then y is B
 Conclusion: y is B’
 Example
 Premise 1: This car is slightly more fast
 Premise 2: If a car is fast then the car is dangerous
 Conclusion: This car is little more dangerous
RULE BASED SYSTEMS
• Rules: Expressions of the type IF Antecedent THEN
Consequent
• Rule Based System: A system which represents knowledge
using such rules

• Newell and Simon developed one of the most popular rule


based systems in 1972
• Book-> Human Problem Solving: Allen Newell, Herbert
Alexander Simon, Prentice-Hall, 1972 - Education - 920 pages

• In which rules were used to model human problem solving


behaviour
RULE BASED SYSTEMS

• Two major motivations behind the development of rule


based systems:
➢ Creation of programs that act to reproduce human
behaviour
➢ The production of expert systems

• The components of a rule based system:


1. A working memory
2. A rule base
3.An inference engine
WORKING MEMORY (WM)

• It is the storage medium in a rule based system.


• It comprises of a set of facts known about a domain
• Its contents represent the current state of the system
• Its components are called the working memory elements
(WMEs)
• With the help of WM the rules communicate with each other
• The initial WM contains the starting status of a rule based
system
• The rules are fired when the conditions in the antecedent are
satisfied.
• The firing of a rule changes the status of the rule based
system
WORKING MEMORY CONTD…

• This may lead to the change in the working memory by


generating new WMEs and may also generate new rules.

• The firing of a rule may


➢ Generate new elements

➢ Modify existing elements

➢ Delete existing elements


RULE BASE (RB)

• A RB contains several rules of the form given above


• The RB provides the power of reasoning to the system
• The most general structure of a rule may be of the form:
• IF (Condition 1 AND Condition 2 AND… Condition m) THEN
(Action 1 OR Action 2 OR…Action k)
• The reasoning is carried out by firing one or more rules in the
system
• At a time the current state of the working memory may make
several of the rules to be capable of being fired
• A situation when only one such rule can be fired creates no
problem
CONFLICT RESOLUTION STRATEGIES

• When more than one rule can be fired, it leads to a conflict


among the rules
• Conflict resolution policies are used to solve such a situation
• Some of the conflict resolution strategies are:
• Order
• Specificity
• Recency
• Refractoriness
• In order strategy, the first rule in order of presentation is
fired. This strategy is one of the most common ones. In
PROLOG this strategy is followed.
SPECIFICITY

• Among the rules whose antecedents are satisfied, select the


one which has the most specific conditions. For example, if
there are rule sets like
• IF (elephant) THEN add colour (grey)
• IF (elephant) AND (royal) THEN add colour (white)
• IF (elephant) AND (African) THEN add ears (large)
• It is clear that the last two rules are more specific than the
first rule. So, these two rules are given preference over the
first rule.
RECENCY

• Under recency, there are several options

• Sometimes the rule that matches on the most recently


created working memory element is fired

• In the other extreme, the rule which was least recently used
is fired
REFRACTORINESS

• Under refractoriness, the rule which was fired with the same
set of values of the variables is not selected

• The advantage of this approach is that it helps in avoiding the


looping of reasoning, which occurs as a consequence of firing
a rule repeatedly

• IT MAY BE NOTED THT OFTEN A COMBINATION OF THE


ABOVE PRINCIPLES ARE USED TO RESOLVE CONFLICT
INFERENCE ENGINE

• The inference engine is a process


• It uses the rules in a rule based system and the information
stored in a working memory to derive new information
about a given problem
• Given the contents of the working memory, the inference
engine determines a set of rules which can be fired
• These are those rules whose antecedents are satisfied under
the present scenario
• As mentioned above, if the rule set contains only one
element then that rule is fired
INFERENCE ENGINE CONTD…

• If this rule set contains more than one rule, one or more of
the conflict resolution methods are used to determine the
specific rule which can be fired
• If a rule is fired then its consequent is carried out

• This may lead to addition of a working memory element or


modify such a working memory element or add one or more
new rules to the rule base

• After one such firing again matching is carried out to find a


fresh set of rules which can be fired.
• This process is continued until no other rule can be fired
CONVENTIONAL PROGRAMES vs RULE BASED
SYSTEMS
• The following points describe the differences between
conventional programs and a rule based system

• The first major difference is the declarativeness of the rule


based systems, which is not there in conventional systems

• In a rule based system, facts and rules are declared and also
there is an inference mechanism to control the system

• Both the conventional programs and the rule based systems


use procedural interpretation
CONVENTIONAL PROGRAMES vs RULE BASED
SYSTEMS
• However, the use of the procedural interpretation in case of
rule based systems differ in the point that they can modify
the working memory and as a result other rules move to the
active state and can be fired

• This does not happen in a conventional program


• In a rule based system; each rule represents a unique piece
of knowledge
• As a result, the addition of a new rule does not affect the
system
• But in conventional programs the addition of new
procedures will affect the existing procedures.
FUZZY PROPOSITIONS

• We have introduced the concept of fuzzy propositions in


earlier slides

• Types of simple fuzzy propositions:


• Unconditional and unqualified propositions
• Unconditional and qualified propositions
• Conditional and unqualified propositions
• Conditional and qualified propositions
UNCONDITIONAL AND UNQUALIFIED
PROPOSITIONS
• In case there is no condition and only there is a consequent
in the form of If… then….
• So, only there is a fuzzy proposition F in the consequent
• The general format of such a fuzzy proposition ‘p’ is a
sentence given by ‘ X is F’,
• X is a variable that takes values x from some universal set U
• F is a fuzzy set on U that represents a fuzzy predicate
EXAMPLE

• Example: 1. X is tall 2.The city X is expensive 3. X is young

• In the first case, U may be a given set of people


• In the second case U may be a set of cities under
consideration
• In case 3, U can again be a set of people under consideration
• In the first case F denotes the fuzzy set representing the
fuzzy predicate ‘tall’
• In the second case F may denote a fuzzy set representing the
fuzzy predicate ‘expensive’
• In the final case F may be representing the fuzzy predicate
‘young’
EXAMPLE CONTD…

• Given a particular value ‘a’ of X, a membership grade F(a) is


assigned to it by the fuzzy set F and this membership grade is
called the degree of truth T(p) of the fuzzy proposition p = ‘ X
is F’ for X = a
• So, we write T(p) = F(a)
• Example: Height is tall. Here, X: Height and F: tall
• So, the degree of truth T(p) of the proposition depends on
the actual value of the height and on the definition of the
predicate “tall”
• For example, if the height is 150 cms then T(p) = 0.7
• So, the role of function T is to provide us with a bridge
between fuzzy sets and fuzzy propositions
UNCONDITIONAL AND QUALIFIED
PROPOSITIONS
• In this case also there is no condition like the previous case
• Consequent is a qualified fuzzy proposition
• The general format of such a fuzzy proposition ‘p’ is
• A sentence given by ‘X is F is S’ (The qualification of F is ‘is S’)
• where X and F are as in the previous case
• S is a fuzzy truth qualifier
• The propositions of this type can also be represented as
“pro{X is F} is P”
UNCONDITIONAL AND QUALIFIED
PROPOSITIONS
• Pro: probability of
• P is a fuzzy probability qualifier
• Both S and P are represented by fuzzy sets on [0, 1]

• Some examples of a truth-qualified proposition are:


• X is tall is fairly true ( F: tall, S: Fairly true)
• The city X is beautiful is very true (F: beautiful, S: very true)
• Hari is talented is fairly false (F: talented, S: fairly false)
UNCONDITIONAL AND QUALIFIED
PROPOSITIONS
• Example:
• Suppose height of Ram is 165 cms
• He belongs to the set representing the predicate tall with the
membership grade 0.75
• This means, in turn that the degree of truth of our truth-
qualified proposition “Ram is tall is fairly true” is 0.75
• For any particular value ‘a’ of X, the degree of truth T(p) of
any truth-qualified proposition p is given by the equation
• T(p) = S(F(a)) ………. (*)
UNCONDITIONAL AND QUALIFIED
PROPOSITIONS CONTD…
• If we define a new simple predicate G(a) = S(F(a)) for any ‘a’
• ‘a’ being a truth-qualified proposition of the form as in (*)
• IT CAN BE REPRESENTED AS THE UNQUALIFIED
PROPOSITION “X is G”

• In other words, going in the reverse manner


• Unqualified propositions are special truth-qualified
propositions, in which the truth qualifier S is assumed to be
true
CONDITIONAL AND UNQUALIFIED
PROPOSITIONS
• In this case there is a condition unlike the previous two cases
and the consequent is a fuzzy proposition F
• The general format of such a fuzzy proposition ‘p’ is a
sentence given by
• Format:
• If X is E then Y is F
• Here X and Y are variables whose values are in the sets U and
V respectively (Domain of X is U and that of Y is V)
• E and F are fuzzy sets on U and V respectively
CONDITIONAL AND UNQUALIFIED
PROPOSITIONS CONTD…
• These propositions of this form may be viewed as
• Propositions of the form ‘(X, Y) is R’, where R is a fuzzy set on
X Y
• The membership function  R of R is given in terms of the
membership functions  A and  B of A and B respectively
by the formula, R ( x, y) = G(  A ( x),  B ( y))
for each x  X and y  Y
• Here, G denotes a binary operation on [0, 1] representing a
suitable fuzzy implication, say the Lukasiewicz implication
ef132132

CONDITIONAL AND UNQUALIFIED


PROPOSITIONS
• The Lukasiewicz implication is given by
G(e, f) = min (1, 1-e+f).
• Let us define the two fuzzy sets E and F by
• E = {(.5, e1 ), (.8, e2 ), (.3, e3 ), (.1, e4 )} and F = {(.3, f1 ), (.1, f 2 ), (.8, f3 )}
• Then using the formula for R in the previous slide, R is given
by
• {.8 / (e1, f1 ),.6 / (e1, f2 ),1/ (e1, f3 ),.5 / (e2 , f1 ),.7 / (e2 , f2 ),1/ (e2 , f3 ),1/ (e3 , f1 ),.8 / (e3 , f2 ),1/ (e3 , f3 )}
• Fuzzy proposition ‘p’ has the T(p) values given by:
X e1 e1 e1 e2 e2 e2 e3 e3 e3
Y f1 f2 f3 f1 f2 f3 f1 f2 f3
T(p) .8 .6 1 .5 .7 1 1 .8 1
CONDITIONAL AND UNQUALIFIED
PROPOSITIONS CONTD…
• If we define a new simple predicate G(a) = S(F(a)) for any a , a
truth-qualified proposition can be represented as the
unqualified proposition “X is G”

• In other words, going the reverse manner, unqualified


propositions are special truth-qualified propositions, in
which the truth qualifier S is assumed to be true
CONDITIONAL AND QUALIFIED PROPOSITIONS
• In this case there is a condition and the consequent is a
qualified fuzzy proposition
• The general format of such a fuzzy proposition ‘p’ is a
sentence given by
• If X is E then Y is F is S
• Here X and Y are variables whose values are in the sets U
and V respectively
• E and F are fuzzy sets on U and V respectively
• S is a fuzzy truth qualifier
• The propositions of this type can also be represented as
“pro{X is E|Y is F} is P”
• Here ‘pro’ stands for ‘probability of’, P is a fuzzy probability
qualifier and Pro {X is A|Y is B} is a conditional probability
FUZZY RULE BASED SYSTEMS

• There are numerous complex phenomena, which can only be


approximately described
• There are ill-defined phenomena also, which cannot be
analysed through crisp or conventional approaches
• These phenomena can be expressed through variables,
which do not have their values as numbers but words or
sentences in a natural or artificial language
• Examples:
• Tajmahal is beautiful
• Einstein was a highly talented man
• Too much of rain brings in flood in rivers
FUZZY RULE BASED SYSTEMS

• Highlighted words in the above sentences are values of


linguistic variables
• These words can be represented as fuzzy sets and their
values are labels of the corresponding fuzzy set
• Quantified variables using conventional approaches may
provide an accurate value being assigned
• On the other hand, linguistic variables provide less precise
but more realistic means of system analysis
• Thus the applicability of linguistic variables in societal
systems is much more realistic than the quantified variables
FUZZY RULE BASED SYSTEMS

• Traditional approaches to analyse social systems were


dependent upon well-structured mathematical models insist
on precision rather than permitting approximation

• In order to handle the situations in social systems and analyze


them we need to sacrifice exactness and more precisely
numerical values by the way permitting linguistic variables

• This may provide approximate characterization of a social


system but will provide a more realistic analysis and
reasoning process through the use of fuzzy logic in which the
truth values are Linguistic instead of being numeric
FUZZY RULE BASED SYSTEMS

• There are many special linguistic terms like very, more or


less, extremely or fairly, which are used to modify other
linguistic terms. Such terms are called linguistic hedges.
• Hedges are also used to modify fuzzy predicates.
• This in turn helps in modifying fuzzy truth values and also
fuzzy probabilities.
• The fundamental difference between classical propositions
and fuzzy propositions is in the range of their truth values
• While each proposition (crisp) is required to be either true or
false, the truth or falsity of fuzzy propositions is a matter of
degree
FUZZY RULE BASED SYSTEMS

• Degree of truth of each fuzzy proposition is expressed by a


number in the unit interval [0, 1]
• Fuzzy proposition p: x is F
• can be modified to another fuzzy proposition ‘Hp’
• by introducing a linguistic hedge H in it as ‘x is HF’
• The unary operations that represent linguistic hedges are
called modifiers
• Given a fuzzy predicate F on a domain X and any x  X , the
modified fuzzy predicate HF for a linguistic hedge H is given by
• HF(x) = h(F(x)),
• where h is the unary operation corresponding to H
FUZZY RULE BASED SYSTEMS

• A linguistic variable is characterised by a quintuple


• (X, T(X), U, G, M), where

• X: The name of the variable


• T(X): The term-set of X, that is, the collection of its linguistic
values
• U: is the universe of discourse
• G: is a syntactic rule for generating the terms in T(X)
• M(X): is a semantic rule which associates with each term in
T(X) its meaning M(X)
EXAMPLE

• linguistic variable named Height


• Height = tall + very tall + not tall + very very tall + not very tall
+…+short + very short + not short + …+ not very tall and not
very short + … extremely tall + … + more or less tall
• U(Tall) = [0, 200], measured in cm
• A value of height, that is, tall may be viewed as a name of a
fuzzy subset of U which is characterised by its compatibility
function c: U → [0, 1], with c(u) representing the
compatibility of a numerical height u with the label tall
• For example, the compatibilities of the numerical height 190,
150 and 40 with tall might be 1, 0.7 and 0, respectively
FUZZY RULE BASED SYSTEMS

• In the expression for height in the previous slide, among the


terms we have the primary terms, for example, tall and short
• The meanings of these terms are both subjective and
context-dependent and hence must be defined a priori
• We have used the modifier ‘not’, two sentential connectives
‘and’ and ‘or’ and also linguistic hedges like ‘very’, ‘more’,
‘less’, ‘extremely’ and ‘quite’.
• Some of the standard methods to define the compatibility
functions of linguistic variable X modified by using hedges
‘very’ and ‘more or less’ are presented below.
cveryX (u ) = (c X (u )) 2 cmore or less X (u ) = (c X (u ))1/ 2
FUZZY RULE BASED SYSTEMS

cnot X (u) = 1 − cX (u)


cXandY (u ) = cX (u )  cY (u )

cXorY (u ) = cX (u )  cY (u )
• If ctall (70) = 0.2 and cshort (70) = 0.1 then
cverytall (70) = 0.04 cvery short (70) = 0.01
c (70) = 0.96 cnot very short (70) = 0.99
not verytall

cnot verytall and not very short (70) = 0.96


MODIFIERS AND THEIR CHARACTERISTICS

• The types of modifiers are defined as follows:


• For any modifier ‘m’
• ’m’ is said to be strong if m(a) < a, for all a [0,1]
• ‘m’ is said to be weak if m(a) > a, for all a [0,1]
• ‘m’ is called the identity modifier if m(a) = a, for all a [0,1]
• A strong modifier reduces the truth value of the associated
proposition as the predicate to which it is attached gets
stronger
• A weak modifier increases the truth value of the proposition
as the predicate to which it is attached gets weakened
MODIFIERS AND THEIR CHARACTERISTICS

• Example: Let us consider the three sentences


• P: Ram is tall
• Q: Ram is very tall
• R: Ram is fairly tall
• Here, the linguistic variable ‘tall’ is modified by using two
hedges; ‘very’ and ‘fairly’
• We assume that the two hedges ‘very’ and ‘fairly’ are given by
two modifiers m1 and m2 given by m1 (a) = a 2 and
• m2 (a) = a respectively
• m1 is a strong modifier where as m2 is a weak modifier
FORMATION OF FUZZY RULES

• The general way of representing human knowledge is by


forming natural language expressions given by
• IF antecedent TEN consequent
• There are tree general forms that exist for any linguistic
variable
• 1. Assignment statements
• 2. Conditional statements
• 3. Unconditional statements
• ASSIGNMENT STATEMENTS:
• These are
• Y = small
FORMATION OF FUZZY RULES CONTD…

• Orange colour = orange


• a=s
• Climate = autumn
• Outside temperature = normal
• CONDITIONAL STATEMENTS:
• IF y is very cool THEN stop
• IF A is high THEN B is low ELSE B is not low
• IF temperature is high THEN climate is hot
• UNCONDITIONAL STATEMENTS:
• Goto sum
FORMATION OF FUZZY RULES CONTD…

• Stop
• Turn the pressure low
• Generally both unconditional and conditional statements
place some restrictions on the consequent of the rule based
process
• The restriction statements, irrespective of conditional or
unconditional statements are usually connected by linguistic
connectives such as “and”, “or” or “else”.
• The restrictions denoted as R1, R2, … Rn apply to the
consequent of the rules
DECOMPOSITION OF COMPOUND RULES

• A compound rule is a collection of many simple rules


combined together
• Any compound rule structure may be decomposed and
reduced to a number of simple canonical rule forms
• The rules are generally based on natural language
representations
• The methods:
• 1. Multiple conjunctive antecedents
• 2. Multiple disjunctive antecedents
• 3.Conditional statements (with ELSE and UNLESS)
• 4. Nested IF-THEN rules
MULTIPLE CONJUNCTIVE ANTECEDENTS

• IF x is A1, A2, … An THEN y is Bm


• Assume a new fuzzy subset Am is defined as
• 𝐴𝑚 = 𝐴1 ∩ 𝐴2 ∩. . .∩ 𝐴𝑛 and is expressed by their
membership function as
• 𝜇𝐴𝑚 (𝑥) = min[𝜇𝐴1 (𝑥), 𝜇𝐴2 (𝑥), . . . 𝜇𝐴𝑛 (𝑥)൧
• In view of the fuzzy intersection operation, the compound
rule may be rewritten as
• IF Am THEN Bm
MULTIPLE DISJUNCTIVE ANTECEDENTS

• IF x is A1 OR A2… OR An THEN y is Bm
• This can be written as
• IF x is An then y is Bm
• Where the fuzzy set Am is defined as
• 𝐴𝑚 = 𝐴1 ∪ 𝐴2 ∪. . . 𝐴𝑛 is defined by
• 𝜇𝐴𝑚 (𝑥) = max[𝜇𝐴1 (𝑥), 𝜇𝐴2 (𝑥), . . . 𝜇𝐴𝑛 (𝑥)൧
CONDITIONAL STATEMENTS (WITH ELSE and
UNLESS)
• Statements of the kind
• I. IF A1 THEN (B1 ELSE B2)
• Can be decomposed into two simple canonical rule forms,
connected by “OR”
• (IF A1 THEN B1) OR (IF NOT A1 THEN B2

• II. IF A! (THEN B!) UNLESS A2


• Can be decomposed as
• (IF A1 THEN B1) OR IF A1 THEN NOT B1
CONDITIONAL STATEMENTS (WITH ELSE and
UNLESS)
• III. IF A1 THEN B1 ELSE IF A2 THEN B2
• (IF A! THEN B1) OR
• IF NOT A1 AND IF A2 THEN B2
NESTED_IF_THEN RULES

• The Rule
• IF A1 THEN [ IF A2 THEN B1] can be written in the form
• IF A! AND A2 THEN B1
• So, based upon all the rules above compound rules can be
decomposed into series of canonical simple rules
AGGREGATION OF FUZZY RULES

• The rule based system involves more than one rule


• Aggregation of rules is the process of obtaining the overall
consequents from the individual consequents provided by
each rule
• The methods adopted are:
• I. Conjunctive system of rules
• II. Disjunctive system of rules
CONJUNCTIVE SYSTEM OF RULES

• Applicable for a system of rules to be jointly satisfied


• The rules are connected by “and” connectives
• Here the aggregated output ‘y’ is determined by the fuzzy
intersection of all the individual consequents; yi, I = 1, 2, …n
• y = y1 and y2…..and yn
• 𝑦 = 𝑦1 ∩ 𝑦2 . . .∩ 𝑦𝑛
• The aggregated output can be defined by the membership
function
• 𝜇𝑦 (𝑦) = min[𝜇𝑦1 (𝑦), 𝜇𝑦2 (𝑦), . . . 𝜇𝑦𝑛 (𝑦)], ∀𝑦 ∈ 𝑌
CONJUNCTIVE SYSTEM OF RULES

• Applicable when at least one of the rules is required


• The rules are connected by “or” connectives
• Here the aggregated output ‘y’ is determined by the fuzzy
union of all the individual consequents; yi, I = 1, 2, …n
• y = y1 or y2…..or yn
• 𝑦 = 𝑦1 ∪ 𝑦2 ∪. . . 𝑦𝑛
• The membership function of the aggregate output is given by
• 𝜇𝑦 (𝑦) = max[𝜇𝑦1 (𝑦), 𝜇𝑦2 (𝑦), . . . 𝜇𝑦𝑛 (𝑦)൧
FUZZY INFERENCE SYSTEM

• A fuzzy inference system uses “IF…THEN” rules along with


connections “OR” or “AND” for making necessary decision
rules
• The inputs may be crisp or fuzzy
• The output is always a fuzzy set
• Only when FIS is used as a controller its outputs should be
crisp
• This necessitates the inclusion of a defuzzification unit for
converting fuzzy variables into crisp variables along FIS
CONSTRUCTION OF A FIS

• Its functional blocks are:


1. A rule base that contains numerous fuzzy IF-THEN rules
2. A database that defines the membership functions of fuzzy
sets used in fuzzy rules
3. A decision-making unit that performs operation on the rules
4. Fuzzification interface unit that converts the crisp quantities
into fuzzy quantities
5. A defuzzification interface unit that converts the fuzzy
quantities into crisp units
BLOCK DIAGRAM OF FIS
• g

Knowledge Base
Data Base Rule Base

Input
Output
Fuzzification Defuzzification
Interface Unit Interface Unit
Crisp Crisp

Decision
Fuzzy making Unit Fuzzy
WORKING METHODOLOGY

• STEP-1: The crisp inputs are converted into a fuzzy input


through a fuzzy interface unit
• STEP-2: Database and rule base are called together as
knowledge base. It is framed
• STEP-3: Defuzzification process is carried out to produce crisp
output
• STEP-4: The fuzzy rules are formed in the rule base and
suitable decisions are made in the decision making unit
MAMDANI FIS (1975)

• Fuzzy sets are used as rule consequents


• It was first proposed to control a steam engine and a boiler
combination by synthesizing (combine elements of several
sources—to help you make a point) a set of fuzzy rules
obtained from people working on the system
• ALGORITHMIC STEPS:
• STEP-1: Determine a set of fuzzy rules
• STEP-2: Make the inputs fuzzy by using input membership
functions
• STEP-3: Combine the fuzzified inputs according to the fuzzy
rules for establishing a rule strength
MAMDANI FIS CONTD…

• STEP-4: Determine the consequent of the rule by combining


the rule strength and the output membership function
• STEP-5: Combine all the consequents to get an output
distribution
• STEP-6: Finally, a defuzzified output distribution is obtained
DECISION MAKING

• Making decision is undoubtedly one of the most fundamental


activities of human beings

• We all are faced in our daily life with varieties of alternative


actions to take

• The beginnings of decision making, as a subject of study, can


be traced, presumably, to the late 18th century, when various
studies were made in France regarding methods of election
and social choice
DECISION MAKING CONTD…

• Since these initial studies, decision making is based largely on


• Theories and
• Methods developed in this century is enormous

• The subject of decision making is


• The study of how decisions are actually made and
• How they can be made better and more successfully
DECISION MAKING CONTD…

• Much of the focus in developing the field has been


• In the area of management
• In which the decision-making process is of key importance
• Functions such as
• Inventory control
• Investment
• personnel actions
• new product development
• allocation of resources and
• many others
DECISION MAKING CONTD…

• Decision making is an integral part of management planning,


organizing, controlling and motivation processes.

• The selection of one strategy over others depends on some


criteria, like utility, sales, cost, return etc.

• The decision should be made whenever the organisation or


an individual faces a problem of decision making or
dissatisfied with the existing decisions or when alternative
decisions are specified.
DECISION MAKING CONTD…

• Classical decision making generally deals with


• A set of alternative states of nature
• A set of alternative actions that are available to the decision
maker
• A relation indicating the state or outcome to be expected
from each alternative action
• A utility or objective function, which orders the outcomes
according to their desirability
DECISION MAKING CONTD…

• A decision is said to be made under conditions of certainty


when the outcome for each action can be determined and
ordered precisely

• The alternative that leads to the outcome yielding the


highest utility is chosen
• That is, the decision making problem becomes an
optimization problem, the problem of maximizing the utility
function
CLASSES OF DECISION MAKING PROBLEMS

• Several classes of decision-making problems are usually


recognized.
• These classifications depend upon their criteria for doing so
• These are:
• Individual decision making and Multiperson decision making
• This classification depends upon the number of decision
makers
• Whether it is only one person or a group of decision makers
involved in the process
CLASSES OF DECISION MAKING PROBLEMS

• Single criterion decision making and Multicriteria decision


making
• This characterisation depends on
• Whether a simple optimisation of a utility function is done
under constraints or an optimization is done under multiple
objective criteria
• Single stage decision making and multistage decision making
• This classification is decided on whether decision making can
be done at a single stage or can be done iteratively in several
stages
FUZZY DECISION MAKING

• In the conventional approach to decision making, the principal


ingredients of a decision process are
• A set of alternatives
• A set of constraints on the choice between different
alternatives
• A performance function which associates with each
alternative the gain (or loss) resulting from the choice of that
alternative
FUZZY DECISION MAKING

• Much of the decision-making in the real world takes place in


an environment in which
• The goals, the constraints and the consequences of possible
actions are not known precisely
• To deal quantitatively with imprecision, we usually employ the
concepts and techniques of probability theory and
information theory
• In doing so, we are tacitly accepting the premise that
imprecision – whatever its nature- can be equated with
randomness
• However, randomness and fuzziness can be differentiated
• By fuzziness we mean a type of imprecision which is
associated with fuzzy sets
FUZZY DECISION MAKING

• Essentially, randomness has to do with uncertainty


concerning membership or non-membership of an object in
a crisp set
• Whereas fuzziness deals with classes in which there may be
grades of membership of objects in a fuzzy set
• This distinction between the two concepts of randomness and
fuzziness we can say that
• Fuzziness is quite different from probability theory
• The concept of fuzzy decision making was introduced and
studied by Bellman and Zadeh in their seminal paper in 1970
FUZZY DECISION MAKING

• Decision processes in which fuzziness enters in one way or


another can be studied from many points of view
• This leads to the introduction of the three basic concepts
• Fuzzy goal
• Fuzzy constraint
• Fuzzy decision
• Roughly speaking:
• A fuzzy goal is an objective
• which can be characterised as a fuzzy set in an appropriate
space
AN EXAMPLE

• Suppose, we have the set of alternatives X be Z, the set of


integers.
• Then a fuzzy goal G may be expressed in terms of its
membership function defined over X
• It can be like
• The alternate x should be much smaller than 100
• The concept of fuzzy goal provides significant advantages to a
fuzzy decision making frame work than the performance
function used in the case of a normal decision process
FUZZY DECISION MAKING

• A fuzzy decision situation in this model is characterised by


the following components:
• A set of possible actions: A
• A set of goals
• Each goal is expressed in terms of a fuzzy set defined on A
• A set of constraints
• Each of which is also expressed by a fuzzy set defined on A
• Thus, in this process of decision making,
• Relevant goals and constraints are expressed in terms of
fuzzy sets
• A decision is determined by an appropriate aggregation of
these fuzzy sets
FUZZY BAYESIAN DECISION MAKING

• In classical Bayesian decision making method the future states


of the nature are characterised as probability events
• The sum of the probabilities is equal to 1
• Let the set of possible states of nature be 𝛿 = {𝑠1 , 𝑠2 , . . . 𝑠𝑛 ሽ
• Then the vector representation of the probabilities of these
states is
𝑛
• P = 𝑃(𝑠1 ), 𝑃(𝑠2 ), . . . 𝑃(𝑠𝑛 ) , where ෌𝑖=1 𝑃(𝑠𝑖 ) =1
• These probabilities are called prior probabilities
• The decision maker can choose from “m” alternatives
𝐴 = {𝑎1 , 𝑎2 , . . . 𝑎𝑚 ሽ
FUZZY BAYESIAN DECISION MAKING CONTD…

• For a given alternative 𝑎𝑗 , a utility value for a future state of


nature 𝑠𝑖 to occur is taken to be 𝜇𝑗𝑖 .
• The decision maker determines these utility values
• These values express the value or cost of each alternative
state pair for each 𝑎𝑗 , 𝑠𝑖 combination
• The expected utility with the jth alternative is given by
𝑛
• 𝐸𝑋(𝑢𝑗 ) = ෍ 𝑢𝑗𝑖 𝑃(𝑠𝑖 ൯
𝑖=1
• The common decision criterion is the maximum expected
utility among all the alternatives 𝐸𝑋(𝑢∗ ) = max𝐸𝑋(𝑢𝑗 ൯
𝑗
• This leads to the selection of alternative 𝑎𝑘 if 𝑢∗ = 𝐸𝑋(𝑢𝑘 )

You might also like