Anda di halaman 1dari 73

FUZZY RULE BASE

Operation of Fuzzy System


Crisp Input

Fuzzification Input Membership


Functions
Fuzzy Input

Rule Evaluation Rules / Inferences

Fuzzy Output

Defuzzification Output Membership


Functions
2
Crisp Output
FUZZY RULES AND REASONING
 Rules form the basis for the fuzzy logic to obtain the fuzzy
output

 Rule-based system vs. Expert system


 The rules comprising the rule-based system originates from
sources other than that of human experts

 The rule-based form uses linguistic variables as its


antecedents and consequents

 The antecedents express an inference or the inequality,


which should be satisfied

 The consequents are those, which we can infer, and is the


output if the antecedent inequality is satisfied

 The fuzzy rule-based system uses IF–THEN rule-based


system, given by, IF antecedent, THEN consequent.
CLASSICAL PROPOSITIONS
 A simple proposition P is a linguistic, or declarative, statement
 Contained within a universe of elements, say X, that can be
identified as being a collection of elements in X.
 The truth value of a proposition is the opposite of the truth value
of its negation
 Truth Tables
 Truth tables define logic functions of two propositions.

 The operations over the propositions


 Let X and Y be two propositions, either of which can be true or false, and
can be combined using the following five logical connectives
1. Conjunction (): X AND Y.
2. Disjunction (): X OR Y.
3. Negation (−): NOT X
4. Implication or conditional (): IF X THEN Y.
5. Bidirectional or equivalence (): X IF AND ONLY IF Y. 4
OPERATIONS OVER THE CLASSICAL PROPOSITIONS

5
CLASSICAL PROPOSITIONS

6
CLASSICAL PROPOSITIONS

 Suppose the implication operation involves two


different universes of discourse:
 P is a proposition described by set A, which is defined
on universe X, and
 Q is a proposition described by set B, which is defined
on universe Y.
 Then, the implication P → Q can be represented in set-
theoretic terms by the relation R, where R is defined
as
 R = (A × B) ∪ (A × Y) ≡ IF A, THEN B
 IF x ∈ A where x ∈ X and A ⊂ X THEN y ∈ B where y ∈ Y
and B ⊂ Y
7
CLASSICAL PROPOSITIONS

 Another compound proposition in linguistic rule form


is the expression
 IF A, THEN B, ELSE C
 This compound proposition could be expressed as
 IF A, THEN B and IF A,THEN C.
 In classical logic, this rule has the form
 (P → Q) ∧ (P → S);
 P : x ∈ A, A ⊂ X,
 Q : y ∈ B, B ⊂ Y,
 S : y ∈ C, C ⊂ Y.

 The set-theoretic equivalent of this compound


proposition is given as 8
 IF A, THEN B, ELSE C ≡ (A × B) ∪ (A × C) = R
CLASSICAL PROPOSITIONS

 Tautologies:
 Compound propositions that are always true, irrespective of
the truth values of the individual simple propositions are
called tautologies.
 Tautologies are useful for reasoning, for proving theorems,
and for making deductive inferences.
 For example, if A is the set of all prime numbers on the real
line universe, X,
 (A = 1, A = 2, A = 3, A = 5, . . .)
1 2 3 4

 Then the proposition “A is not divisible by 6” is a tautology.


i

9
CLASSICAL PROPOSITIONS

 Tautologies:
 Some common tautologies are as follows:
 B ∪ B ←→ X

 A ∪ X; A ∪ X ←→ X

 (A ∧ (A → B)) → B (modus ponens)


 (B ∧ (A → B)) →A (modus tollens)

10
CLASSICAL PROPOSITIONS

 Tautologies: modus ponens

11
CLASSICAL PROPOSITIONS
 Tautologies:

12
CLASSICAL PROPOSITIONS

 Contradictions :
 Compound propositions that are always false, regardless of
the truth value of the individual simple propositions

 Some simple contradictions are listed here:


 B ∩ B,

 A ∩ Ø; A ∩ Ø.

 Exclusive or and exclusive nor

13
CLASSICAL PROPOSITIONS

 Deductive inferences:
 Suppose we have a rule of the form IF A, THEN B, where A
is a set defined on universe X and B is a set defined on
universe Y.
 Now suppose a new antecedent, say A', is known.
 A new consequent, say B', can be inferred from the new
antecedent through the following set-theoretic formulation,
again:

14
FUZZY PROPOSITIONS
 The range of truth values of fuzzy propositions is not only {0, 1},
but [0, 1].
 The truth of a fuzzy proposition is a matter of degree.
 Fuzzy propositions are assigned to fuzzy sets.
 The logical connectives of negation, disjunction, conjunction, and
implication are also defined for a fuzzy logic.

15
FUZZY LOGIC

16
FUZZY LOGIC

Example:

17
18
FUZZY LOGIC

 Approximate Reasoning:
 The theoretical foundation for reasoning about imprecise
propositions
 Let

 Now suppose, a new antecedent, say is known. Then


consequent can be found from the composition operation

 This generates a new rule

19
FUZZY LOGIC
Example:

• The fuzzy set describes the associated market size.20


In other words, the consequent is fairly diffuse.
CLASSIFICATION OF FUZZY PROPOSITIONS

 Unconditional and unqualified propositions


 “The temperature is high.”
 Unconditional and qualified propositions
 “The temperature is high is very true.”
 Conditional and unqualified propositions
 “If the temperature is high, then it is hot.”
 Conditional and qualified propositions
 “If the temperature is high, then it is hot is true.”

21
FUZZY RULES

A fuzzy rule is defined as the conditional


statement of the form
If x is A
THEN y is B

where x and y are linguistic variables and A and


B are linguistic values determined by fuzzy sets
on the universes of discourse X and Y.
FUZZY RULES

 The decision-making process is based on rules with sentence


conjunctives AND, OR and ALSO.

 Each rule corresponds to a fuzzy relation.

 Example: If (Distance x to second car is SMALL) OR (Distance y


to obstacle is CLOSE) AND (speed v is HIGH) THEN (perform
LARGE correction to steering angle ) ALSO (make MEDIUM
reduction in speed v).

 Three antecedents (or premises) in this example give rise to two


outputs (consequences).
FUZZY RULE FORMATION
IF height is tall
THEN weight is heavy.

Here the fuzzy classes height and weight have a given range (i.e., the
universe of discourse).

range (height) = [140, 220]


range (weight) = [50, 250]
FORMATION OF FUZZY RULES
Three general forms are adopted for forming fuzzy rules. They are:

 Assignment statements,

 Conditional statements,

 Unconditional statements.
Assignment Statements

>> The assignment statement is found to restrict the value of


a variable to a specific equality.
Conditional Statements

>> In this statements, some specific conditions are


mentioned, if the conditions are satisfied then it enters the
following statements, called as restrictions.
Unconditional Statements

>> There is no specific condition that has to be satisfied in


this form of statements.
DECOMPOSITION OF FUZZY RULES

A compound rule is a collection of several simple rules


combined together.

Any compound rule structure can be decomposed and


reduced to number of simple canonical rules.

There are various methods for decomposition of rules.

 Multiple conjunctive antecedent,

 Multiple disjunctive antecedent,

 Conditional statements (with ELSE and UNLESS).


DECOMPOSITION OF FUZZY RULES

Multiple Conjunctive Antecedants


DECOMPOSITION OF FUZZY RULES

Multiple disjunctive antecedent


DECOMPOSITION OF FUZZY RULES

Conditional Statements ( With Else )


DECOMPOSITION OF FUZZY RULES

Conditional Statements (Nested IF–THEN rules)


DECOMPOSITION OF FUZZY RULES

Conditional Statements ( With Unless)


AGGREGATION OF FUZZY RULES
Aggregation of rules is the process of obtaining the overall consequents
from the individual consequents provided by each rule.

 Conjunctive system of rules.


 Disjunctive system of rules.
AGGREGATION OF FUZZY RULES
Conjunctive system of rules
AGGREGATION OF FUZZY RULES
Disjunctive system of rules
FUZZY RULE - EXAMPLE
Rule 1: If height is short then weight is light.

Rule 2: If height is medium then weight is medium.

Rule 3: If height is tall then weight is heavy.


FUZZY RULE - EXAMPLE
Problem: Given

(a) membership functions for short, medium-height, tall, light,


medium-weight and heavy;
(b) The three fuzzy rules;
(c) the fact that John’s height is 6’1”

estimate John’s weight.


FUZZY RULE - EXAMPLE
Solution:
(1) From John’s height we know that
John is short (degree 0.3)
John is of medium height (degree 0.6).
John is tall (degree 0.2).

(2) Each rule produces a fuzzy set as output by truncating the


consequent membership function at the value of the antecedent
membership.
FUZZY RULE - EXAMPLE
FUZZY RULE - EXAMPLE
FUZZY RULE - EXAMPLE
FUZZY RULE - EXAMPLE
 The cumulative fuzzy output is obtained by OR-ing the output from
each rule.

 Cumulative fuzzy output (weight at 6’1”).


FUZZY RULE - EXAMPLE
1. De-fuzzify to obtain a numerical estimate of the output.

2. Choose the middle of the range where the truth value is


maximum.

3. John’s weight = 80 Kg.


FUZZY RULE – EXAMPLE 2
FUZZY RULE – EXAMPLE 2
FUZZY RULE – EXAMPLE 2
MEMBERSHIP VALUE ASSIGNMENT
 There are possible more than one ways to assign
membership values or function to fuzzy variables

49
METHODS OF MEMBERSHIP VALUE ASSIGNMENT
 Intuition
 Inference

 Rank ordering

 Angular fuzzy sets

 Neural networks

 Genetic algorithms

 Inductive reasoning

 Soft partitioning

50
INTUTITION
 Derived from the capacity of humans to develop
membership functions through their own
intelligence and understanding

 Involves contextual and semantic knowledge about


an issue

 It can also involve linguistic truth values about this


knowledge

51
TYPES OF MEMBERSHIP FUNCTIONS
 The most commonly used in practice are
 Triangles
 Trapezoids
 Bell curves
 Gaussian, and
 Sigmoidal

52
TRIANGULAR MF
 Specified
by three
parameters {a, b, c} as
follows:

53
TRAPEZOIDAL MF
 Specified
by four
parameters {a,b,c,d} as
follows:

54
GAUSSIAN MF
 Specified by two
parameters {m, σ}
m
as follows:

 Where m and σ denote the center and width of the


function, respectively.
55
 A small σ will generate a “thin”MF, while a big σ
will lead to a “flat”MF.
BELL-SHAPED MF
 Specified
by three
a b
parameters {a,b,c} as
follows:

 Where the parameter b is usually positive and we


can adjust c and a to vary the center and width of
56
the function and then use b to control the slopes.
BELL-SHAPED MF

57
SIGMOIDAL MF
 Specified by two
parameters {a, c}
as follows:
a c

Where c is the center of the function and a control the


58
slope.
HEDGES: A MODIFIER TO A FUZZY SET
 Hedge modifies the meaning of the original set to
create a compound fuzzy set
 Example:
 Very (Concentration)
 More or Less (Dilation)

 Hedges are qualifiers of a linguistic variable.


• All purpose: very, quite, extremely
• Probability: likely, unlikely
• Quantifiers: most, several, few
• Possibilities: almost impossible, quite possible
59
LINGUISTIC HEDGES (LINGUISTIC QUANTIFIERS)

 Hedges modify the shape of a fuzzy set.


HEDGES: VERY & MORE OR LESS

61
• Find “Very Small”, “Not Very Small”, and “Intensely Small”

• Let a phrase, or a composite term is :

62
63
INFERENCE
 Use knowledge to perform deductive reasoning

 To deduce or infer a conclusion, given a body of


facts and knowledge

64
INFERENCE : EXAMPLE
 In the identification of a triangle
 Let A, B, C be the inner angles of a triangle
 Where A ≥ B ≥ C
 Let U be the universe of triangles, i.e.,
 U = {(A,B,C) | A ≥ B ≥ C ≥ 0; A+B+C = 180°}
 Let’s define a number of geometric shapes
 I Approximate isosceles triangle
R Approximate right triangle
 IR Approximate isosceles and right triangle
E Approximate equilateral triangle
T Other triangles 65
INFERENCE : EXAMPLE
 We can infer membership values for all of these
triangle types through the method of inference

 Because, we possess knowledge about geometry that


helps us to make the membership assignments

 For Isosceles,
 µi (A,B,C) = 1- 1/60* min(A-B, B-C)
 If A=B OR B=C THEN µi (A,B,C) = 1;
 If A=120°,B=60°, and C =0° THEN µi (A,B,C) = 0.

66
INFERENCE : EXAMPLE
 For right triangle,
 µR (A,B,C) = 1- 1/90* |A-90°|
 If A=90° THEN µR (A,B,C) = 1;
 If A=180° THEN µR (A,B,C) = 0.

 For isosceles and right triangle


 IR = min (I, R)
 µIR (A,B,C) = min[µI (A,B,C), µR (A,B,C)]
= 1 - max[1/60°min(A-B, B-C), 1/90°|A-90°|]

67
INFERENCE : EXAMPLE
 For equilateral triangle
 µE (A,B,C) = 1 - 1/180° * (A-C)
 When A = B = C then µE (A,B,C) = 1,
 A = 180° then µE (A,B,C) = 0

 For all other triangles

= min {1 - µI (A,B,C) , 1 - µR (A,B,C) , 1 - µE (A,B,C)


=1/180° * min{3(A − B), 3(B − C), 2|A − 90°|, A − C}
68
INFERENCE : EXAMPLE
 The membership values for the fuzzy triangle

69
INFERENCE : EXAMPLE
 The membership values for the fuzzy triangle

70
RANK ORDERING
 Assessing preferences by a single individual, a
committee, a poll, and other opinion methods can be
used to assign membership values to a fuzzy variable

 Preference is determined by pair wise comparisons, and


these determine the ordering of the membership

71
RANK ORDERING: EXAMPLE
 Suppose 1000 people respond to a questionnaire about their pair
wise preferences among five colors, X = {red, orange, yellow, green,
blue}.
 Define a fuzzy set as on the universe of colors “best color”
 Following Table is a summary of the opinion survey. In this table,
for example, out of 1000 people 517 preferred the color red to the
color orange, 841 preferred the color orange to the color yellow, and
so on.

72
RANK ORDERING: EXAMPLE
 Membership function for best color

73

Anda mungkin juga menyukai