Unit-4 Soft Computing
Unit-4 Soft Computing
LECTURE NOTES ON
(AKTU)
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
UNIT – 4
(FUZZY LOGIC-
II)
Membership Function
The membership function is a graph that defines how each point in the input space is mapped to
membership value between 0 and 1. It allows you to quantify linguistic terms and represent a fuzzy
set graphically. A membership function for a fuzzy set A on the universe of discourse X is defined
as μA:X → [0,1]
It quantifies the degree of membership of the element in X to the fuzzy set A.
x-axis represents the universe of discourse.
y-axis represents the degrees of membership in the [0, 1] interval.
There can be multiple membership functions applicable to fuzzify a numerical value. Simple
membership functions are used as the complex functions do not add precision in the output. The
membership functions for LP, MP, S, MN, and LN are:
The triangular membership function shapes are most common among various other membership
function shapes. Here, the input to 5-level fuzzifier varies from -10 volts to +10 volts. Hence the
corresponding output also changes.
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
Logic is the science of reasoning. Symbolic or mathematical logic has turned out to be a powerful
computational paradigm. Not only does symbolic logic help in the description of events in the real world but
has also turned out to be an effective tool for inferring or deducing information from a given set of facts. Just
as mathematical sets have been classified into crisp sets and fuzzy sets , logic can also be broadly viewed as
crisp logic and fuzzy logic. Just as crisp sets survive on a 2-state membership (0/1) and fuzzy sets on a
multistate membership [0 - 1 ], crisp logic is built on a 2-state truth value (True/False) and fuzzy logic on a
multistate truth value (True/False/very True/partly False and so on.)
We now briefly discuss crisp logic as a prelude to fuzzy logic.
CRISP LOGIC
Consider the statements "Water boils at 90°C" and "Sky is blue". An agreement or disagreement with these
statements is indicated by a "True" or "False" value accorded to the statements. While the first statement takes
on a value false, the second takes on a value true.
Thus, a statement which is either 'True' or 'False' but not both is called a proposition. A proposition is indicated
by upper case letters such as P, Q, R and so on.
A simple proposition is also known as an atom. Propositions alone are insufficient to represent phenomena in
the real world. In order to represent complex information, one has to build a sequence of propositions linked
using connectives or operators. Propositional logic recognizes five major operators as shown in Table.
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
Observe that ^, v, ⇒ and = are 'binary' operators requiring two propositions while ~ is a unary operator
requiring a single proposition. ^ and v operations are referred to as conjunction and and disjunction
respectively. In the case of ⇒ operator, the proposition occurring before the ⇒ symbol is called as the
antecedent and the one occurring after is called as the consequent. The semantics or meaning of the logical
connectives are explained using a truth table. A truth table comprises rows known as interpretations, each of
which evaluates the logical formulafor the given set of truth values.
A logical formula comprising n propositions will have 2n interpretations in its truth table. A formula which has
all its interpretations recording true is known as a tautology and the one which records false for all its
interpretations is known as contradiction.
Example 1
Obtain a truth table for the formula (P v Q) ⇒ (~P). Is it a tautology?
Solution
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
P Q PvQ ~P P v Q ⇒~P
T T T F F
T F T F F
F F F T T
F T T T T
No, it is not a tautology since all interpretations do not record 'True' in its last column.
Example 3
Show that (P ⇒ Q) = (~P v Q)
solution
P Q A= (P ⇒Q) ~P B=( ~PVQ) A=B
T F F F F T
F T T T T T
T T T F T T
F F T T T T
Since the last column yields 'True' for all interpretations, it is a tautology.
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
.Example:
Verify De Morgan's laws.
(a) ~(P v Q) = (~P /\ ~Q)
.(b) ~(P /\ Q) = {~P V ~Q)
Solution
(a)
P Q PvQ A= ~(P v Q) ~P ~Q B=(~P ^ ~Q) A= B
T T T F F F F T
T F T F F T F T
F T T F T F F T
F F F T T T T T
Therefore, ~(P v Q) = ( ~ P I\ ~ Q)
(b)
Example
Simplify ( ~(P ^ Q) ⇒ R) ^ P ^ Q
Solution
Consider ( ~(P ^Q) ⇒ R) ^ P ^ Q
by eliminating '⇒' using (P ⇒ Q) = ( ~ P v Q))
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
= ( ~ ~(P ^ Q) v R) ^P ^Q
= ((P ^Q) v R) ^ P ^Q (by the law of involution)
= (P ^Q) (by the law of absorption)
Q
Here, the formulae above the line are the premises and the one below is the goal which
can be inferred from the premises.
Modus tollens
Given P ⇒ Q and ~Q to be true, ~ P is true.
P⇒Q
. ~Q
~P
Chain rule
Given P ⇒ Q and Q ⇒ R to be true, P ⇒ R is true.
P⇒Q
Q⇒R
P⇒
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
Note that the chain rule is a representation of the transitivity relation with respect to the ⇒ connective.
Example
Given
(i) C V D
(ii) ~H ⇒ (A /\~B)
(iii) (C V D) ⇒~H
(iv) (A /\~B) ⇒ (R v S)
Can (R v S) be inferred from the above?
Solution
(i) and (iii) using the rule of Modus Ponens , ~H can be inferred. from
(i) CvD
(iii) (C v D) ⇒ ~H
~H (v)
From (ii) and (iv) using the chain rule, ~ H ⇒ (R v S) can be inferred.
(ii) ~H ⇒ (A /\ ~B)
(A /\ ~ B) ⇒ ( R v S)
~H ⇒ (R v S) (vi)
From (v) and (vi) using the rule of Modus Ponens (R v S) can be inferred.-
(vi) ~H ⇒ (R v S)
(v) ~H
RvS
Hence, the result:
PREDICATE LOGIC
In propositional logic, events are symbolized as propositions which acquire either „True/False' values.
However, there are situations in the real world, where propositional logic falls short of its expectation. For
example, consider the following statements:
P : All men are mortal.
Q : Socrates is a man.
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
From the given statements it is possible to infer that Socrates is mortal. However, from the propositions P, Q
which symbolize .these statements, nothing can be made out. The reason being, propositional logic lacks the
ability to· symbolize quantification. Thus, in this example, the quantifier All" which represents the entire class
of then encompasses Socrates as well, who is declared to be a man, in proposition Q. Therefore; by _virtue of
the first proposition P, Socrates who is a man also becomes a: mortal, · giving. rise to the deduction · Socrates
is mortal. However, the deduction is not directly perceivable owing to the shortcomings in -propositional logic.
Therefore, propositional logic needs to be augmented with more tools to enhance its logical abilities.
Predicate logic comprises the following apart from the connectives and propositions recognized by
propositional logic.
(i) Constants
(ii) Variables
(ii) Predicates
(iv) Quantifiers
(v) Functions
Constants represent objects that do not change values.
Example Pencil, Ram, Shaft, 100°C.
Variables are symbols which represent values acquired by the objects as qualified by the quantifier with which
they are associated with.
Example x, y, z. \
Predicates are representative of associations between objects that are constants or variables and acquire truth
values 'True' or 'Fals'e'. A predicate carries a name representing the association followed by its arguments
representing the objects it is to associate.
Example
likes (Ram, tea) (Ram likes tea)
plays (Sita, x) (Sita plays anything)
Here, likes and plays are predicate names and Ram, tea and Sita, x are the associated objects . Also the
predicates acquire truth values. · If Ram disliked tea, likes (Ram, tea) acquires the value false and if Sita
played any sport, plays (Sita, x) would acquire the value true provided x is suitably qualified by a quantifier.
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
Quantifiers are symbols which indicate the two types of quantification, namely, All (∀) and Some (∃). '∀' is
termed universal quantifier and '∃' is termed existential quantifier.
Example Let,
man (x) : x is a
man. mortal (x) : x is
mortal
mushroom (x) : x is a . mushroom.
poisonous (x) : x is poisonous.
Example
plus (2, 3) (2 plus 3 which is 5)
mother (Krishna) (Krishna's mother)
Observe that plus ( ) and mother ( ) indirectly describe "5" and "Krishna's mother"
respectively.
Example 7.7
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
For a formula in propositional logic, depending on the truth values acquired by the propositions, the truth table
interprets the formula. But in the case of predicate logic, depending on the truth values acquired by the
predicates, the nature. of the quantifiers, and the values taken by the constants and functions over a domain D,
the formula is interpreted.
Example
Interpret the formulae
(i) ∀ x p(x)
(ii) ∃x p(x)
where the domain D = { I, 2} and
p(l) p(2)
True False
Solution
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
(i) ∀ x p(x) is true only if p(x) is true for all values of x in the domain D, otherwise it is false
Here, for x =1 and x = 2 the two possible values for x chosen from D, namely p(l)=true and p(2)= false
respectively, yields (i) to be false since p(x) is not true for x = 2. Hence ∀ x p(x) is false.
(ii) ∃x p(x) is true only if there is at least one value of x for which p(x) is true. Here, for x = 1, p(x) is
true resulting in (ii) to be true. Hence, 3x p(x) is true.
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
– Output Vector : Y = [y1 , y2, . . . ym ] T comes out from the defuzzification block, which transforms an
output fuzzy set back to a crisp value.
– Fuzzification : a process of transforming crisp values into grades of membership for linguistic terms,
"far", "near", "small" of fuzzy sets.
− Fuzzy Rule base : a collection of propositions containing linguistic variables; the rules are expressed in
the form: If (x is A ) AND (y is B ).......THEN (z is C)
where x, y and z represent variables (e.g. distance, size) and A, B and Z are linguistic variables (e.g. `far',
`near', `small').
– Membership function : provides a measure of the degree of similarity of elements in the universe
of discourse to fuzzy set.
– Fuzzy Inferencing : combines the facts obtained from the Fuzzification with the rule base and conducts the
Fuzzy reasoning process.
– Defuzzyfication: Translate results back to the real world values.
FUZZY LOGIC
In crisp logic, the truth values acquired by propositions or predicates are 2-valued, namely True, False which
may be treated numerically equivalent to (0, 1). However, in fuzzy logic, truth values are multi valued such as
absolutely true, partly true, absolutely false, very true, and so on and are numerically equivalent to (0--1).
Fuzzy propositions
A fuzzy proposition is a statement which acquires a fuzzy truth value. Thus, given P‟ to be a fuzzy proposition,
T(P‟) represents the truth value (0--1) attached to P‟. In its simplest form fuzzy propositions are associated
with fuzzy sets. The fuzzy membership value associated with the fuzzy set A‟ for P ‟ is treated as the fuzzy
truth value T(P‟).
i.e. T(P‟) = μA‟(x) where 0≤μA‟(x) ≤1
Example
P‟ : Ram is honest.
T( P‟ ) = 0.8, if P‟ is partly true. T(
P‟ ) = 1, if P‟ is absolutely true.
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
Fuzzy connectives
Fuzzy logic similar to crisp logic supports the following connectives:
. (i) Negation :~
(ii) Disjunction :v
(iii) Conjunction :/\
(iv) Implication :⇒
Following Table illustrates the definition of the connectives. Here P‟, Q‟ are fuzzy propositions and T(P‟), T(Q‟),
_are their truth values.
P‟ and Q‟ related by the ' ⇒' operator are known as antecedent and consequent respectively. Also, just as in
crisp logic, here to ⇒ represents the IF –THEN statement as
IF x is A‟ THEN y is B‟, and is equivalent to
R‟ =(A‟x.B‟) U (~A‟ x Y‟)
Also, for the compound implication IF x is A‟ THEN y is B‟ ELSE y is C‟ the relation R‟ is equivalent to R‟
= (A‟ X B‟)U(~A‟ X C‟)
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
Example
Let X = { a, b, c, d} Y = { 1, 2, 3, 4}
and A‟ = { (a, 0)(b, 0.8)(c, 0.6)(d, 1)}
B‟= { (1, 0.2)(2, 1)(3, o.8)(4, 0)}
C‟ = {(1, 0)(2, 0.4)(3, 1)(4, 0.8)}
Determine the implication relations
(i) IF x is A‟ THEN y is B‟ .
(ii) · IF x is A‟ THEN y is B‟ ELSE y is C‟ .
Solution
To determine (i) compute
R‟ = (A‟ x B‟) U (~A‟ x Y‟) where
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
1 2 3 4
a 1 1 1 1
b 0.2 0.2 0.2 0.2
~A‟xY‟ = C 0.4 0.4 0.4 0.4
d 0 0 0 0
Here, Y the universe of discourse could be viewed as {(1, 1) (2, 1) (3, 1) (4, 1)} a fuzzy set all of whose
elements x have μ(x) = 1.
Therefore,
1 2 3 4
A 1 1 1 1
b 0.2 0.8 0.8 0.2
R‟ = C 0.4 0.6 0.6 0.4
d 0.2 0.1 0.8 0
which represents IF x is A‟ THEN y is B‟ .
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
1 2 3 4
a 0 0.4 1 0.8
b 0 0.2 0.2 0.2
~A‟xC‟ = c 0 0.4 0.4 0.4
d 0 0 0 0
Therefore,
1 2 3 4
a 0 0.4 1 0.8
b 0.2 0.8 0.8 0.2
R‟ = c 0.2 0.6 0.6 0.4
d 0.2 1 0.8 0
Fuzzy Inference
Fuzzy inference also referred to as approximate reasoning refers to computational procedures used for
evaluating linguistic descriptions. The two important inferring procedures are
(i) Generalized Modus Ponens (GMP)
(ii) Generalized Modus Tollens· (GMT)
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
Conclusion y is B‟
Here, A‟, B‟, A' and B' are fuzzy terms. Every· fuzzy linguistic statement above the line is analytically known
and what is below is analytically unknown.
To compute the membership function of B' the max-min composition of fuzzy set A' with
R‟ (x, y) which is known as implication relation (IF-THEN relation) is used. That is,
B‟ = A‟ o R‟(x,y)
In terms of membership function,
x is A'
The membership of A' is computed on similar lines as
A‟ = B‟ o R‟(x,y)
In terms of membership function,
Example: Apply the fuzzy Modus Ponens rule to deduce Rotation is quite slow given
(i) If the temperature is high then the rotation is slow.
(ii) The temperature is very high.
Let H’ (High), VH’ (Very High), S‟ (Slow) and QS’ (Quite Slow) indicate the associated fuzzy sets as follows:
For X = { 30, 40, 50, 60, 70, 80, 90, I 00}, the set of temperatures and Y = { 10, 20, 30, 40, 50, 60},
the set of rotations per minute,
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
10 20 30 40 50 60
· 30 1 1 1 1 1 1
40 1 1 1 1 1 1
50 1 1 1 1 1 1
~H‟x S‟ = 60 1 1 1 1 1 1
70 0 0 0 0 0 0
80 0 0 0 0 0 0
90 0.7 0.7 0.7 0.7 0.7 0.7
100 1 1 1 1 1 1
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
10 20 30 40 50 60
30 1 1 1 1 1 1
40 1 1 1 1 1 1
50 1 I 1 1 1 1
R’(x,y) = 60 1 1 1 1 1 1
70 0 0 0.8 1 0.6 0
80 0 0 0.8 1 0.6 0
90 0.7 0.7 0.7 0.7 0.7 0.7
100 1 1 1 1 1 1
= [1 1 1 1 1 1]
Fuzzy linguistic descriptions are formal representations of systems made through fuzzy IF-THEN rules. They
encode knowledge about a system in statements of the form-
IF (a set of conditions) are satisfied THEN (a set of consequents) can be inferred.
Fuzzy IF-THEN rules are coded in the form-
IF (xI is A’I ,x2 is A’2 , ... ,x11 isA‟11 ) THEN (y1 is B’1,y2 is B’2 , ... ,y11 is B’11 )·
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
where linguistic variables xi, yi take the values of fuzzy sets Ai and Bi respectively.
Example
If there is ”heavy” rain and “strong” winds
then there must be “severe” flood warning.
Here, heavy, strong, and severe are fuzzy sets qualifying the variables rain, wind, and flood
warning respectively.
A collection of rules referring to a particular system is known as a fuzzy rule base. If the
conclusion C to be drawn from a rule base R is the conjunction of all the individual consequents
Ci of each rule, then
C = C1 ∩ C2 ∩ ... ∩ Cn where
μc(Y) = min (μc1 (y), μc2 (y), ... , μcn (y)), ∀y ∈ Y
here Y is the universe of discourse.
on the other hand, if the conclusion C to be drawn from a rule base R is the disjunction of
the individual consequents of each rule, then
C = C1 u C2 u C3 ... u Cn where
μc(Y) = max (μc1 (y), μc2 (y), ... , μcn (y)), ∀y ∈ Y
FUZZIFICATION:
Fuzzification is the process of making a crisp quantity fuzzy. We do this by simply recognizing that many
of the quantities that we consider to be crisp and deterministic are actually not deterministic at all. They carry
considerable uncertainty happens. if the form of uncertainly happens to atise because of imprecision,
ambiguity, or vagueness, then the variable is probably fuzzy and can be represented by a membership crisp
function.
The fuzzification is a process of transforming crisp values into grades of membership for linguistic terms
of fuzzy sets. The purpose is to allow a fuzzy condition in a rule to be interpreted.
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
Fig: Characterizing two grades, low and medium speed fuzzy set
DEFUZZIFICATION
In many situations, for a system whose output is fuzzy, it is easier to take a crisp decision if the output is
represented as a single scalar quantity. This conversion of a fuzzy set to single crisp value is called
defuzzification and is the reverse process of fuzzification. The typical Defuzzification methods are:
centroid method
centre of sums
mean of maxima.
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
Centroid method
Also known as the centre of gravity or the centre of area method, it obtains the centre of area (x*)
occupied by the fuzzy set. It is given by the expression.
Here n is the number of fuzzy sets and N the number of fuzzy variables. COS is actually the most commonly
· used defuzzification method. It can be implemented easily and leads to rather fast inference cycles.
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
One simple way of defuzzifying the output is to take the crisp value with the highest degree of membership. In
cases with more than one element having the maximum value, the mean value of the maxima is taken. The
equation of the defuzzified value x* is given by
In such a case, the mean of maxima is the arithmetic average of mean values of all intervals contained in M
including zero length intervals.
The height of a fuzzy set A, i.e. h(A) is the largest membership grade obtained by any element in that set.
Example
A’1, A’2, and A‟3 are three fuzzy sets as shown in Fig.1 (a), (b), and (c). Fig.: 2 illustrates the aggregate of the
fuzzy sets.
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
Centroid method
To compute x*, the centroid, we view the aggregated fuzzy sets as shown in Fig. 2 and 3.
Note that in Fig. 3 the aggregated output has been divided into areas for better understanding.
Fig. 3 Aggregated fuzzy set of A‟1, A‟2, and A‟3 viewed as area segments.
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
In above Table Area (A) shows the area of the segments of the aggregated fuzzy set and x shows the
corresponding centroid. Now,
x* = 18.353/3.715
= 4.9
=5
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
Here, the areas covered by the fuzzy sets A‟1, A’2, A‟3 (Refer Figs. l(a), (b), and (c)) are given by
½ X 0.3 X (3 + 5) , ½ x 0.5 x (4 + 2) and ½ x 1 x (3 + 1) respectively.
Industry applications
Here, we will discuss the fields where the concepts of Fuzzy Logic are extensively applied.
Aerospace
In aerospace, fuzzy logic is used in the following areas −
Altitude control of spacecraft
Satellite altitude control
Flow and mixture regulation in aircraft deicing vehicles
Automotive
In automotive, fuzzy logic is used in the following areas −
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
Business
In business, fuzzy logic is used in the following areas −
Decision-making support systems
Personnel evaluation in a large company
Defense
In defense, fuzzy logic is used in the following areas −
Underwater target recognition
Automatic target recognition of thermal infrared images
Naval decision support aids
Control of a hypervelocity interceptor
Fuzzy set modeling of NATO decision making
Electronics
In electronics, fuzzy logic is used in the following areas −
Control of automatic exposure in video cameras
Humidity in a clean room
Air conditioning systems
Washing machine timing
Microwave ovens
Vacuum cleaners
Finance
In the finance field, fuzzy logic is used in the following areas −
Banknote transfer control
Fund management
Stock market predictions
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
Industrial Sector
In industrial, fuzzy logic is used in following areas −
Cement kiln controls heat exchanger control
Activated sludge wastewater treatment process control
Water purification plant control
Quantitative pattern analysis for industrial quality assurance
Control of constraint satisfaction problems in structural design
Control of water purification plants
Manufacturing
In the manufacturing industry, fuzzy logic is used in following areas −
Optimization of cheese production
Optimization of milk production
Marine
In the marine field, fuzzy logic is used in the following areas −
Autopilot for ships
Optimal route selection
Control of autonomous underwater vehicles
Ship steering
Medical
In the medical field, fuzzy logic is used in the following areas −
Medical diagnostic support system
Control of arterial pressure during anesthesia
Multivariable control of anesthesia
Modeling of neuropathological findings in Alzheimer's patients
Radiology diagnoses
Fuzzy inference diagnosis of diabetes and prostate cancer
Securities
In securities, fuzzy logic is used in following areas −
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
Transportation
In transportation, fuzzy logic is used in the following areas −
Automatic underground train operation
Train schedule control
Railway acceleration
Braking and stopping
Psychology
In Psychology, fuzzy logic is used in following areas −
Fuzzy logic based analysis of human behavior
Criminal investigation and prevention based on fuzzy logic reasoning
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
knowledge
Probability is a mathematical model of
Fuzzy logic takes truth degrees as a mathematical basis
ignorance
Fuzzy logic is not always accurate. So the results are perceived based on assumptions and may not be
widely accepted
It cannot recognize machine learning as-well-as neural network type patterns
Validation and Verification of a fuzzy knowledge-based system needs extensive testing with
hardware
Setting exact, fuzzy rules and, membership functions is a difficult task
At times, the fuzzy logic is confused with probability theory
Fuzzy Controller
Tthere are two examples of Fuzzy contoller, namely
(i) Greg Viot 's (Greg Viol, 1993) Fuzzy Cruise Control System
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
Key
NL - Negative Large
ZE - Zero
PL - Positive Large
NM - Negative Medium
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
PM - Positive Medium
NS - Negative Small
PS - Positive Small
the fuzzy sets which characterize the inputs and output are as given in Fig. 7 .6.
Fuzzification of inputs
For the fuzzification 'of inputs, that is, to compute the membership for the antecedents, the formula
illustrated in Fig.: is used.
Degree of membership
• Compute Delta 1 = x - point 1
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
Delta 2 = Point 2 - x
• If (Delta 1 ≤ 0) or (Delta 2 ≤
0) then Degree of membership =
0 else Degree of membership
Delta 1 • Slope 1
=min Delta 2 • Slope 2
Max
Here, x which is the system input has its membership function values computed for all fuzzy sets. For example,
the system input speed difference deals with 7 fuzzy sets,. namely NL, NM, ZE, PS, PM, and PL. For a
measured value of the speed difference x', the membership function of x' in each of the seven sets is computed
using the formula shown in above Fig. . Let μ'1, μ'2,,, ..., μ'7 be the seven membership values. Then, all these
values are recorded for the input x' in an appropriate data structure.
Similarly, for each of the other system inputs (acceleration in this case), the fuzzy membership function values
are recorded.
Example
Let the measured normalized speed difference be 100 and the normalized acceleration be 70, then the fuzzified
inputs after computation of the fuzzy membership values are shown in Fig.
Fig. A Fuzzy membership values for speed difference = 100 and acceleration = 70.
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
The computations of the fuzzy membership values for the given inputs have been shown in Fig. given below
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
Similarly for acceleration (x = 70), the qualifying fuzzy sets are as shown in below Fig. The fuzzy membership
function of x = 70 for NM is μNM(x) = 0.7813 and for NS is μNS(x) = 0.2188.
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
Defuzzification
The centre Qf gravity method is applied to defuzzify the output. Initially the- centroids are compμted for each
of the competing output membership functions. Then, the new output membership areas are determined by
shortening the height of the membership value on the Y axis as dictated by the rule strength value. Finally, the
Centre of Gravity (CG) is computed using the weighted average of the X-axis centroid points with the newly
computed output areas, the latter serving as weights.
Example
Below Figure illustrates the computation of CG for the two competing outputs of rules 7 and 8 with
strength of 0.1563 each
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])
lOMoARcPSD|50004020
A person now notices the difference in temperature (∆ T °C) between the room temperature ( T °C) as
measured by the thermometer and the desired temperature (TO °C) at which the room is desired to be kept (set-
point). The problem now is to determine to what extent the dial should be turned so that the appropriate supply
of air (hot/worm/cool/cold) will nullify the change in temperature.
Downloaded
Downloaded by by Deepa Solanki
Deepansh Sharma([email protected])
([email protected])