University Institute of Engineering (Uie) Department Cse: Soft Computing
University Institute of Engineering (Uie) Department Cse: Soft Computing
University Institute of Engineering (Uie) Department Cse: Soft Computing
12
ENGINEERING (UIE)
12
DEPARTMENT CSE
Bachelor of Engineering (Computer Science &
12 12 12
Engineering)
12
Soft Computing
Fuzzy Controller
Defuzzification actions
module Input
Output
Fuzzification
module Conditions
4 a defuzzification module.
1 Mamdani approach
O2
O3
D
O1 O4
R S
D
NR FR VF 1.0
VN
1.0
0.0
1.04
0.1 0.8 1.5 2.2
Distance D in mt
LT AL AA AR RT
LT AL AA AR RT
1.0
1.0
0.0 0.0
-90 -45 0 45 90 -90 -45 0 45 90
Angle ɵ in degree
Deviation in degree
•Once the fuzzy sets of all parameters are worked out, our next
step in FLC design is to decide fuzzy rule base of the FLC.
•The rule base for the FLC of mobile robot is shown in the
form of a table below. LT AL AA AR RT
AL AL
VN AA AR
AA AA
NR
AA RT
FR AA AA
AA AA AR
VF AA AA
AA AA AA
AA AA
Note that this rule base defines 20 rules for all possible instances.
These rules are simple rules and take in the following forms.
From the given fuzzy sets and input parameters’ values, we say
that the distance D = 1.04m may be called as either NR (near) or
FR (far).
NR FR AA AR
1.0 1.0
0.0 0.0
0.1 0.8 1.5 2.2 0 45
-45 y
x
1.04 30
δ2
NR FR AA AR
1.0 1.0
0.0 0.0
0.1 0.8 1.5 2.2 45
-45 0
y
x
1.04 30
y
x
1
2
Soft Computing Applications
Rule strength computation
There are many rules in the rule base and all rules may not be
applicable.
For the given x = 1.04 and θ = 30o , only following four rules out of
20 rules are firable.
The strength (also called α values) of the firable rules are calculated
as follows.
α(R1) = min(µNR (x ), µAA(y )) = min(0.6571, 0.3333) = 0.3333
0.6667) = 0.3429
In practice, all rules which are above certain threshold value of rule
strngth are selected for the output computation.
Suppose, s1∗and s2∗are the inputs for fuzzy variables s1 and s2. µA1,
µA2, µB1, µB2, µC1 and µC2 are the membership values for different
fuzzy sets.
C
A2 B2 C 2 Combine output
s1* s2*
Note:
1.0
R1 :
0.3333
0.0
0.8 1.5 0 45 45 90
NR AR AA
1.0
R2 :
0.6571
0.0
0.8 1.5 0 45 -45 0 45
AA AR
1.0
R3 :
0.3333
0.0
0 45 90
0.8 1.5 0 45
1.0 AR AA
R4 :
0.3333
0.0
-45 0 45
0.8 1.5 0 45
D=1.04 Ɵ = 30
AA AR RT
-45 0 45 90
The fuzzy output needs to be defuzzified and its crisp value has to be
determined for the output to take decision.
From the combined fuzzified output for all four fired rules, we get the
crisp value using Center of Sum method as follows.
v = 12.5×71+25×45+25.56×0+25.56×0 = 19.59
12.5+39.79+25+25.56
39.7/0
AA AR RT
1.0
0.5
A3
A2
.6571 0.34 0.3333
A4
A1
-45 0 45 90
25/45 12.5 / 71
25.56 / 0
Consider two inputs I1 and I2. These two inputs have the following
linguistic states :
Note:
I I 2
1 L M H NR FR VF
1.0 1.0
c)For the input set, following four rules can be fired out of all 9 rules.
R1: I1 is L and I2 is FR
R2: I1 is L and I2 is VF
R3: I1 is M and I2 is FR
R4: I1 is M and I2 is VF
d) Now, the weights for each of the above rules can be determined as
follows.
R1: w 1 = µL × µFR = 0.8 × 0.8 = 0.6
R2: w 2 = µL × µVF = 0.8 × 0.2 = 0.16
R3: w 3 = µM × µFR = 0.2 × 0.8 = 0.16
R4: w 4 = µM × µVF = 0.2 × 0.2 = 0.6
e) The functional consequent values for each rules can be calculated
as below.
y 1 = I1 + 2I2 = 6.0 + 2 × 2.2 = 10.4
y 2 = I1 + 3I2 = 6.0 + 3 × 2.2 = 12.6
y 3 = 2I1 + 2I2 = 2 × 6.0 + 2 × 2.2 = 16.4
y 4 = 2I1 + 3I2 = 2 × 6.0 + 3 × 2.2 = 18.6
• Book:
• S.N. Shivanandam, Principle of soft computing,
Wiley. ISBN13: 9788126527410(2011)
• Websites:
• https://www.javatpoint.com/
• https://www.towardsdatascience.com/
34
THANK YOU
For queries
Email: jasneete7747@cumail.in
35