Introduction Fuzzy Logic Onelectr

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 118

FUZZY LOGIC AND

ITS
APPLICATIONS
Dr.(Mrs.) Lini Mathew
Professor
NITTTR, Sector 26
Chandigarh
Fuzzy Logic
• Fuzzy means “blurred” or “not clear, distinct, or
precise”
• Fuzzy Logic is a form of knowledge
representation suitable for notions that cannot be
defined precisely, but which depend upon their
contexts.
Fuzzy Logic
• Multi-valued logic that follows intermediate values
to be defined between 0 and 1
• Based on natural language
• Initiated in 1965 by Lofti Zadeh, Professor,
Computer Science, University of California,
Berkeley.
Fuzzy Logic
• Conceptually easy to understand
• Flexible
• Tolerant of imprecise data
• Nonlinear functions of arbitrary complexity
can be modeled
• Built on top of the experience of experts
• Blended with conventional control techniques
Fuzzy Set
• Fuzzy Logic has its roots in the theory of
fuzzy sets.
• A fuzzy set is a set without a crisp, clearly
defined boundary.
• It can contain elements with a partial
membership function
• A classical set has a clearly defined
boundary that wholly includes or excludes
any given element.
Fuzzy Set vs Crisp Set
Crisp Set Fuzzy Set
Fuzzy Set vs Crisp Set
• X is a set of all real numbers from 1 to 10
• Universe of Discourse
• A is a set of real numbers between 5 and 8
• Crisp or Classical Set
• Membership Value 1 or 0
Fuzzy Set vs Crisp Set
• B is a set of young people
• Membership values between 0 and 1 – Fuzzy Set

Age 65 27 17 32 22 25
B 0 0.3 1 0 0.8 0.5
Fuzzy Set

• Seasons varies
more or less
continuously
Membership Functions
• Membership function (MF) is a curve that defines how
each point in the input space is mapped to a membership
value (or degree of membership) between 0 and 1 and is
often given the designation of µ.
• µA(x) is called the membership function (or MF) of x in A.
• The figure above illustrates a linguistic variable seasons
with four associated linguistic terms namely “spring",
"summer", "fall” and “winter". Each of these linguistic
terms is associated with a fuzzy set defined by a
corresponding membership function.
• Thus membership functions are subjective measures for
linguistic terms.
• There are many types of membership functions.
Types of Membership Functions
Membership Functions
• Membership functions may include multiple subsets
each representing a different degree of the linguistic
term or value.
• Multiple overlapping membership functions which
span the entire universe of discourse are useful.
Fuzzy Set Operations
• There are three basic operation on fuzzy sets: negation,
intersection, and union
• Negation
membership_value(not x)= 1- membership_value(x)
where x is the fuzzy set being negated
• Intersection
membership_value(x and y) = minimum{membership_value(x),
membership_value(y)}
where x and y are the fuzzy sets involved in the intersection
• Union
membership_value(x or y) = maximum{membership_value(x),
membership_value(y)}
where x and y are the fuzzy sets involved in the union

• minimum operator for intersection and the


maximum operator for union
Fuzzy Set Operations

• Let A be a fuzzy interval between 5 and 8


• B be a fuzzy number about 4.
Fuzzy Set Operations
Union of A and B Intersection of A and B
A OR B A AND B
Fuzzy Set Operations
• Negation of A • De Morgan’s Laws

AB  AB
AB  AB
Fuzzy Set Operations
1 0.7 0.4 0 0 0
A     
1 10 20 40 80 100
0.3 1.0 1.0 0.5 0.2 0
B     
1 10 20 40 80 100
(i ) A  B
(ii ) A  B
(iii ) A
(iv ) B
(v ) A  B  A  B
(vi ) A  B  A  B
Properties of Fuzzy Sets
CommutativityAB = BA
AB = BA
Associativity A (BC) = (AB)C
A (BC) = (AB)C
Distributivity A(BC) = (AB)(AC)
A (BC) = (AB)(AC)
Idempotence A A = A
AA=A
Identity A  = A
A X = A
A=
AX=X
Crisp Relations
• A crisp relation between two sets X, Y is a
binary relation.
• Binary relations are represented by relation
matrices and also by sagittal diagrams.
• R={(1,a) (2,c) (3,b) (4,c)}
• Sagittal Diagram
• Relation Matrix
a b c
1 1 0 0
2 0 0 1
3 0 1 0
4 0 0 1
Fuzzy Relations
• Relation between two or more fuzzy sets is
obtained by the Cartesian product.
R x, y    AxB x, y   min A x , B y 
0.2 0.5 1
A= + + y1 y2
x1 x 2 x 3
x1 0. 2 0.2
0 . 3 0. 9 x2 0. 3 0. 5
B= +
y1 y2 x3 0. 3 0.9
Fuzzy Relations
• Relationship between the colour of a fruit, x
and the grade of maturity, y.
• x= {green, yellow, red}    
y={verdant, half-mature, mature}
• Considering the relation between the linguistic
terms red and mature, and representing them
by the membership functions, a fruit can be
characterized by the property of red and
mature.    
Fuzzy Relations
• Characteristics of a red and mature fruit
Fuzzy Compositions
y1 y 2 z1 z 2 z 3
R = x1 0 . 7 0 . 5 S = y1 0.9 0.6 0.2
x 2 0 .8 0 .4 y 2 0 .1 0. 7 0. 5

T = R o S - max-min composition
 T (x, z ) = max {min( R (x, y), S (y, z ))}

T = R S - max-product composition
 T (x, z ) = max {( R (x, y) • S (y, z ))}

Chain-strength analogy for max-min composition


Composition of fuzzy relations

24
Composition of fuzzy relations
• Example

S R (1,  )  max[min(0.1, 0.9), min(0.2, 0.2), min(0.0, 0.8), min(1.0, 0.4)]


 max[0.1, 0.2, 0.0, 0.4]  0.4

25
Composition of fuzzy relations
• Example

 S R (1,  )  max[min(0.1, 0.0), min(0.2,1.0), min(0.0, 0.0), min(1.0, 0.2)]


 max[0.0, 0.2, 0.0, 0.2]  0.2

26
Composition of fuzzy relations

27
Fuzzy Relations
• Three variables of interest in power transistors are the
amount of current that can be switched, the voltage that can
be switched, and the cost. The following membership
functions for power transistors were developed from
hypothetical components catalog:
0.4 0.7 1 0.8 0.6
• Average current I = { + + + + }
0.8 0.9 1 1.1 1.2
0.2 0.8 1 0.9 0.7
• Average voltage V ={ + + + + }
30 45 60 75 90

• Power is defined by the algebraic operation P = VI

(a) Let us find the Cartesian Product P = VxI.


Fuzzy Relations
• The Cartesian Product expresses the relationship between
Vi and Ij , where Vi and Ij are individual elements in the
fuzzy set V and I.
• Now let us define a fuzzy set for the cost C in rupees, of a
transistor 0. 4 1 0. 5
C={ + + }
0.5 0.6 0.7

(b)Using a fuzzy Cartesian Product, find T = IxC.

(c) Using max-min composition find E = PoT

(d) Using max-product composition find E = PoT


FUZZY RELATIONS

0.8 0.9 1 .0 1.1 1.2


30 0.2 0.2 0.2 0.2 0.2
45 0.4 0.7 0.8 0.8 0.6
P= 60 0.4 0.7 1 .0 0.8 0.6
75 0.4 0.7 0.9 0.8 0.6
90 0.4 0.7 0 .7 0.7 0.6
FUZZY RELATIONS

0.5 0.6 0.7


0.8 0.4 0.4 0.4
0.9 0.4 0.7 0.5
T = 1 .0 0.4 1.0 0.5
1.1 0.4 0.8 0.5
1 .2 0.4 0.6 0.5
FUZZY RELATIONS

0 .5 0.6 0.7
30 0.2 0.2 0.2
45 0.4 0.8 0.5
E = 60 0.4 1.0 0.5
75 0.4 0.9 0.5
90 0.4 0.7 0.5
Logic and Fuzzy Systems
 Logic is but a small part of the human capacity to
reason. It is the science of reasoning!!
 Logic for humans is a way quantitatively to develop
a reasoning process that can be replicated and
manipulated with mathematical precepts.
 Logic is the study of truth in logical propositions
 In classical logic, this truth is binary – a proposition
is either true or false.
 In fuzzy logic, all truths are partial or approximate.
Logic and Fuzzy Systems

Classical Logic

Speed = 0 Speed = 1

Fuzzy Logic

[0.0 - 0.25] [0.25 – 0.50] [0.50 – 0.75] [0.75 – 1.00]


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, which are strictly true or strictly false.
• A proposition P is a collection of elements.
• A set, where the truth values for all elements in the
set are either all true or all false.
• Example: (i) A is B
Temperature (A) is high (B)
(ii) (A is B) is C
Anju (A) is beautiful (B) is very true (C)
Propositions

• The veracity (truth) of an element in the proposition


P can be assigned a binary truth value, called T(P)
• For binary (Boolean) classical logic, T(P)is assigned
a value of 1 (truth) or 0 (false).
• If U is the universe of all propositions, then T is a
mapping of the elements, u, in these propositions
(sets) to the binary quantities (0, 1), or
T : u ∈ U -→ (0, 1).
Logic and Fuzzy Systems
• Simple propositions on the same universe of discourse
can be combined using five logical connectives to form
logical expressions involving the two simple propositions.
• disjunction (∨)
• conjunction (∧)
• negation (−)
• implication (→)
• equivalence (↔)
• These connectives can be used to form new propositions
from simple propositions.
• Disjunction
P ∨ Q : x ∈ A or x ∈ B; hence, T(P ∨ Q) =max(T(P), T(Q)).

• Conjunction
P ∧ Q : x ∈ A and x ∈ B; hence, T(P ∧ Q) = min(T(P), T(Q)).

• Negation
If T(P) = 1, then T(P̅) = 0; if T(P) = 0, then T(P̅) = 1.

• Implication
(P→ Q) : x ∉ A or x ∈ B; hence, T(P→ Q) = T(P̅ ∪ Q).

• Equivalence
(P ↔ Q) : T(P ↔ Q) = 1, for T(P) = T(Q)
= 0, for T(P) ≠ T(Q)
Ex. Consider the following four propositions:
1. if 1 + 1 = 2, then 4 > 0;
2. if 1 + 1 = 3, then 4 > 0;
3. if 1 + 1 = 3, then 4 < 0;
4. if 1 + 1 = 2, then 4 < 0.
• The first three propositions are all true; the fourth is false.
• In the first two, the conclusion 4 > 0 is true regardless of the
truth of the hypothesis;
• In the third case both propositions are false, but this does not
disprove the implication;
• In the fourth case, a true hypothesis cannot produce a false
conclusion.
The compound proposition P → Q is true in all cases except
where a true antecedent P appears with a false consequent,
Q, that is, a true hypothesis cannot imply a false
conclusion.
IMPLICATION
• The classical form of the implication is true for all propositions of P and Q except for those propositions that are in
both the truth set of P and the false set of Q,

• The logical implication is analogous to the set-theoretic form

• ie.
• Linguistically equivalent to the
statement “P → Q is true” when
either “not A” or “B” is true
LOGICAL CONNETIVES
IMPLICATION
The implication operation involves two different
universes of discourse X and Y.

P is a proposition described by set A, which is


defined on universe X,
Q is a proposition described by set B, which is
defined on universe Y.
The implication operation IF P, THEN Q

P → Q represented as: IF A, THEN B


IMPLICATION

In set-theoretic terms by the relation R, as:

R = (A × B) ∪ (Ā × Y) ≡ IF A, THEN B

IF x ∈ A, where x ∈ X and A ⊂ X
THEN y ∈ B, where y ∈ Y and B ⊂ Y,
IMPLICATION
Another rule form:
IF A, THEN B, ELSE C.
Linguistically, this is
IF A, THEN B and IF Ā,THEN C.

In classical logic, this rule has the form


(P → Q) ∧ (P̅ → S);
P : x ∈ A,A ⊂ X, Q : y ∈ B,B ⊂ Y and
S : y ∈ C, C ⊂ Y.

The set-theoretic equivalent of this is


R = (A × B) ∪ (Ā × C) ≡ IF A, THEN B, ELSE C
FUZZY LOGIC PROPOSITION
• A fuzzy logic proposition, P is a statement involving
some concept without clearly defined boundaries.
• Linguistic statements that tend to express
subjective ideas and that can be interpreted slightly
differently by various individuals typically involve
fuzzy propositions.
• Most natural language is fuzzy, in that it involves
vague and imprecise terms.
• The truth value assigned to P can be any value on
the interval [0, 1].
Fuzzy Logic
• The assignment of the truth value to a
proposition is actually a mapping from the
interval [0, 1] to the universe U of truth values, T
T : u ∈ U → (0, 1).

• Fuzzy propositions are assigned to fuzzy sets.


• Proposition P is assigned to fuzzy set A.
• The truth value of a proposition,
T(P) = µA(x) where 0 ≤ µA ≤ 1
Fuzzy Logic Connectives
• The logical connectives of negation, disjunction,
conjunction, and implication are also defined for a
fuzzy logic.

• Disjunction
P ∨ Q : x is A or B;
T(P ∨ Q) =max(T(P), T(Q)).
• Conjunction
P ∧ Q : x is A and B;
T(P ∧ Q) = min(T(P), T(Q)).
Fuzzy Logic Connectives
• Negation
T(P̅) = 1- T(P)
• Implication
(P → Q) : x is A then x is B;
T (P → Q) = T (P̅ ∪ Q) = max(T(P̅), T(Q)).
• If x is A then y is B ie. R = (A x B) ∪(Ā x Y)
µR(x,y) = max[(µA(x) ∧ µB(y)), (1 - µA(x))]

• If x is A then y is B , else y is C
R = (A x B) ∪(Ā x C)
µR(x,y) = max[(µA(x) ∧ µB(y)), ((1 - µA(x)) ∧ µC(y))]
Fuzzy Inference
Evaluating a new invention to determine its commercial
potential.

Two metrics to be used regarding the innovation of the


idea.
(i) “uniqueness” of the invention, denoted by a universe
of novelty scales, X = {1, 2, 3, 4},
(ii) “market size” of the invention’s commercial market,
denoted on a universe of scaled market sizes, Y = {1,
2, 3, 4, 5, 6}.
(the lowest numbers are the “highest uniqueness” and
the “largest market,” respectively)
Fuzzy Inference
Scores of a new invention,
fuzzy set A = “medium uniqueness,”
fuzzy set B = “medium market size,”
fuzzy set C = “diffuse market size,”

Determine the implications


(i) IF A, THEN B.
(ii) IF A, THEN B, ELSE C
Fuzzy Inference
IF A, THEN B
IF uniqueness is medium THEN market size is
medium

R = (A x B) ∪(Ā x Y)

µR(x,y) = max[(µA(x) ∧ µB(y)), (1 - µA(x))]


Fuzzy Inference

IF A, THEN B R = (A x B) ∪(Ā x Y)
Fuzzy Inference
Fuzzy Inference

IF A, THEN B, ELSE C
IF uniqueness is medium THEN market size is
medium , ELSE market size is diffuse

R = (A x B) ∪(Ā x C)

µR(x,y) = max[(µA(x) ∧ µB(y)), ((1 - µA(x)) ∧ µC(y))]


Fuzzy Inference
Fuzzy Inference
Approximate Reasoning
A rule-based format to represent fuzzy information in
conventional antecedent–consequent form, such as:
Rule 1: IF x is A, THEN y is B
Suppose a new antecedent, A’, is introduced and
consider the following rule:
Rule 2: IF x is A’, THEN y is B’

The consequent in Rule 2, B’ can be derived by means of


fuzzy composition.
B’ =A’ ◦R.
Linguistic Hedges
• Our natural language consists of fundamental
terms characterized as atoms in the literature.
• A collection of these atoms will form the
molecules, or phrases, of our natural language.
The fundamental terms can be called atomic
terms.
• Examples: slow, medium, young, beautiful .
• A collection of atomic terms is called composite
terms.
• Examples: very slow horse, young tree,
medium-weight box,
fairly beautiful painting.
Linguistic Hedges
• In linguistics, fundamental atomic terms are often
modified with adjectives (nouns) or adverbs (verbs)
• Example: very, low, slight , more or less, fairly,
slightly, almost, barely, mostly, roughly,
approximately etc.
• These modifiers are called linguistic hedges,
• ie. the singular meaning of an atomic term is
modified, or hedged, from its original interpretation.
• Linguistic hedges modify the membership function
for a basic atomic term.
Linguistic Hedges
Let the basic linguistic atom be α, and subject it to
some hedges. Define

Concentrations

Dilations
Linguistic Hedges
• Another operation on linguistic fuzzy sets is known as
intensification.
• This operation acts in a combination of concentration
and dilation. It increases the degree of membership of
those elements in the set with original membership
values greater than 0.5, and it decreases the degree of
membership of those elements in the set with original
membership values less than 0.5.
• This also has the effect of making the boundaries of the
membership function steeper.
• Intensification can be expressed by numerous
algorithms proposed by Zadeh is
Linguistic Hedges
Mathematical
Hedge Expression Graphical Representation

A little [A ( x )]1.3

Slightly [A ( x )]1.7

Very [A ( x )]2

Extremely [A ( x )]3


Linguistic Hedges
Mathematical
Hedge Expression Graphical Representation

Very very [A ( x )]4

More or less A ( x )

Somewhat A ( x )

2 [A ( x )]2
if 0  A  0.5
Indeed
1  2 [1  A ( x )]2
if 0.5 < A  1
Linguistic Hedges
• Composite terms can be formed from one or more
combinations of atomic terms, logical connectives, and
linguistic hedges.
• Parentheses may be used to change the precedence order
and ambiguities may be resolved by the use of association-
to-the-right.
• Eg. “plus very minus very small” should be interpreted as
plus (very (minus (very (small)))).

Precedence for linguistic hedges and logical operations


Precedence Operation
First Hedge, not
Second And
Third Or
Linguistic Hedges
Universe of integers, Y = {1, 2, 3, 4, 5}.
Following linguistic terms are defined as a mapping onto Y:

“Very small” = “small”2 =


“Not Very Small” = 1 – “Very Small” =
“Not Very Small and Not Very, Very Large ” =
FUZZY RULE BASED
SYSTEMS
Fuzzy Rule Based Control
• Fuzzy Control is a technique to embody human
like thinking into a control system
• Fuzzy control is designed to emulate human
deductive thinking.
• Fuzzy Control combines the use of fuzzy
linguistic variables with fuzzy logic
• Fuzzy controllers are very simple conceptually.
• They consists of an input stage, a processing
stage and an output stage.
Fuzzy Rule Based Control
• The input stage maps sensors or other inputs
such as switches, thumbwheels and so on, to
the appropriate membership functions and
truth values.
• The processing stage invokes each
appropriate rule and generates a result for
each, then combine the results of the rules.
• The output stage converts the combined result
back into a specific control output value.
Fuzzy Rule Based Control

Using a procedure originated by Ebrahim


Mamdani in the late 70s, three steps are taken
to create a fuzzy controlled machine:
 Fuzzification (Using membership functions to
graphically describe a situation)
 Rule Evaluation (Application of fuzzy rules)
 Defuzzification (Obtaining the crisp results)
Fuzzy Control
 Fuzzification is the process of making a crisp
quantity fuzzy.
 Membership functions characterize the fuzziness in
a fuzzy set.
 Six procedures to build membership functions
 Intuition
 Inference
 Rank Ordering
 Neural Networks
 Genetic Algorithm
 Inductive Reasoning
Fuzzy Control
 Defuzzification is the conversion of a fuzzy quantity to a
precise quantity.
 Output of a fuzzy process can be the logical union of two
or more fuzzy membership functions defined on the
universe of discourse. .
 Methods of defuzzification
 Max-membership principle
 Centroid method
 Weighted average method
 Mean max membership
 Center of sums
 Center of largest area
 First (or last) of maxima
Defuzzification
 Max-membership principle
also known as height method
Limited to peaked output functions
Defuzzification
 Centroid method
The most prevalent and physically appealing of
all the defuzzification methods [Sugeno, 1985;
Lee, 1990]
Often called as Centre of area or Centre of gravity
Defuzzification
 Weighted average method
 Valid for symmetrical output membership
functions
 Formed by weighting each functions in the
output by its respective maximum membership
value
Defuzzification
 Mean max membership (middle of maxima)
Maximum membership is a plateau
Z* = a + b/ 2
Defuzzification
 Center of Sums
Faster than many defuzzification methods that
are presently in use.
This method is not restricted to symmetric
membership functions.
This process involves the algebraic sum of
individual output fuzzy sets, C1 and C2, instead
of their union.
Defuzzification
 Center of Sums
Defuzzification

 Center of Sums
This method is similar to the weighted average
method, except in the center of sums method, the
weights are the areas of the respective membership
functions whereas in the weighted average method,
the weights are individual membership values.
Defuzzification
 Center of Largest Area
If the output fuzzy set has at least two convex subregions,
then the center of gravity of the convex fuzzy subregion
with the largest area is used to obtain the defuzzified value
z∗ of the output.

Cm is the convex subregion that has the largest area


making up Ck
Defuzzification
 Center of Largest Area
This condition applies in the case when the overall output
Ck is nonconvex.
And, in the case when Ck is convex, z∗ is the same
quantity as determined by the centroid method or the
center of largest area method (because then there is only
one convex region.
Defuzzification
 Centroid Method
The membership function of the two types of temperature
sensors, namely, a thermocouple (TC) and a
resistance temperature detector (RTD) is shown. For
the logical union of the membership function find the
defuzzified value of the temperature T* using centroid
method
Defuzzification
Defuzzification
Defuzzification
Defuzzification
Defuzzification
Defuzzification
Defuzzification
Section Area Centroid Area*
Centroid

1 0.5 78.67 39.34

2 0.5 79.33 39.67


3 0.25 79.83 19.96
4 1.0 80.5 80.5
5 0.5 81.33 40.67
Sum = 2.75 220.12
Speed Control

• How fast am I going to drive today?


• It depends on the weather.
• Inputs: (i) Temperature (ii) Cloud Cover
• Output: Driving Speed
SPEED CONTROL - Fuzzification

• Temperature: {Freezing, Cool, Warm, Hot}

Freezing Cool Warm Hot


1

Temperature oC
0
-10 0 10 20 30 40
SPEED CONTROL - Fuzzification

• Cloud Cover : {Sunny, Partly Cloudy, Overcast}

Sunny Partly Cloudy Overcast


1

Cloud Cover %
0
0 20 40 60 80 100
SPEED CONTROL - Fuzzification

• Driving Speed: {Slow, Fast}

Slow Fast
1

Speed kmph
0
0 40 80 120 160
SPEED CONTROL - Rules

Rules
•If it's Sunny and Warm, drive Fast.
•If it's Cloudy and Cool, drive Slow.

How fast will I go if temperature is 18°C and


25% Cloud Cover ?
SPEED CONTROL – Rule Evaluation

Calculate Input Membership Levels


• 18°C  Cool = 0.4, Warm = 0.7
Freezing Cool Warm Hot
1

Temperature oC
0
-10 0 10 20 30 40
SPEED CONTROL – Rule Evaluation

Calculate Input Membership Levels


• 18°C  Cool = 0.4, Warm = 0.7
Freezing Cool Warm Hot
1

Temperature oC
0
-10 0 10 20 30 40
SPEED CONTROL – Rule Evaluation

Calculate Input Membership Levels


25% Cover Sunny = 0.8, Partly Cloudy = 0.2

Sunny Partly Cloudy Overcast


1

Cloud Cover %
0
0 20 40 60 80 100
SPEED CONTROL – Rule Evaluation

Calculate Input Membership Levels

• If it's Sunny and Warm, drive Fast


• Sunny(Cover)Warm(Temp)Fast(Speed)
0.8  0.7 = 0.7
 Fast = 0.7
SPEED CONTROL – Rule Evaluation

Calculate Input Membership Levels


• If it's Cloudy and Cool, drive Slow
Cloudy(Cover)Cool(Temp)Slow(Speed)
0.2  0.4 = 0.2
 Slow = 0.2

• Speed is 20% Slow and 70% Fast


SPEED CONTROL - Defuzzification
Constructing the Output
• Speed is 20% Slow and 70% Fast

Slow Fast
1

Speed kmph
0
0 40 80 120 160
SPEED CONTROL - Defuzzification

Constructing the Output

Speed = weighted average


= (0.2*40+0.7*120)/(0.9)
= 102.2 kmph
The Inverted Pendulum.
Here, the problem is to balance a pole on
a mobile platform that can move in only
two directions, to the left or to the right.
Inputs of the system (i) The angle
between the platform and the pendulum
(ii) The angular velocity of this angle
Output of the system The speed of the
platform.
The Inverted Pendulum
Fuzzification
The different levels of output (high speed, low
speed etc.) of the platform is defined by
specifying the membership functions for the
fuzzy sets, the different angles between the
platform and the pendulum and the angular
velocities of specific angles are also defined
The Inverted Pendulum
Fuzzification

Fuzzification
The Inverted Pendulum
Rule Evaluation
The fuzzy rules are merely a series of if-then statements. These
statements are usually derived by an expert to achieve optimum
results.
Some examples of these rules are:
i) If angle is zero and angular velocity is zero then speed is also
zero.
ii) If angle is zero and angular velocity is negative low then the
speed shall be negative low.
iii) If angle is zero and angular velocity is positive high then the
speed shall be positive high.
iv) If angle is negative high and angular velocity is zero then the
speed shall be negative high.
v) If angle is positive high and angular velocity is zero then the
speed shall be positive high.
vi) If angle is positive low and angular velocity is negative low
then the speed shall be zero.
The Inverted Pendulum

An application ofRule Evaluation


these rules is shown using
specific values for angle and angular velocities.
The Inverted Pendulum

Rule Evaluation
The result patch yielded by the rule "if angle is zero and angular
velocity is zero, the speed is zero", is shaded up to that area
The Inverted Pendulum

Rule Evaluation
The result patch yielded by the rule "if
angle is zero and angular velocity is
negative low, the speed is negative low"

The result patch yielded by the rule "if


angle is positive low and angular velocity
is zero, then speed is positive low"

The result patch yielded by the rule "if


angle is positive low and angular
velocity is negative low, the speed is
zero“.
The Inverted Pendulum
Defuzzification
The four result patches are overlapped and is reduced to:

The result of the fuzzy controller so far is a fuzzy set (of speed). To
choose an appropriate representative value as the final output (crisp
value), defuzzification must be done. The most common
defuzzificztion method used is the center of gravity of the set.
Phone Company

A phone company sells mobile phones. The


membership functions for the linguistic
variables
Salary (x1000 Rs),
Debt (x1000 Rs) and
Risk (%)
Phone Company
Phone Company
Phone Company
Phone Company
Phone Company
Phone Company
Phone Company - Rules
i) If (Salary is poor) and (Debt is small) then
(Risk is median)
ii) If (Salary is poor) and (Debt is large) then
(Risk is high)
iii) If (Salary is good) and (Debt is small) then
(Risk is low)
iv) If (Salary is good) and (Debt is large) then
(Risk is high)
v) If (Salary is excellent) and (Debt is small)
then (Risk is low)
vi) If (Salary is excellent) and (Debt is large)
then (Risk is median)
Phone Company
Phone Company
THANKYOU

You might also like