0% found this document useful (0 votes)
17 views21 pages

SC Unit-04

Soft computing
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views21 pages

SC Unit-04

Soft computing
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

lOMoARcPSD|37581550

lOMoARcPSD|37581550

Unit-04 (Fuzzy Membership, Rules)


Membership Function
A membership function defines fuzziness in the fuzzy set. It may be discrete or continuous. The
membership function is generally represented graphical form. Standard shapes of membership
functions are maintained over the years. Fuzzy membership functions are determined in practical
problems with opinion of experts.

As we know, a fuzzy set à in the universe of discourse X can be as

𝐴˜ = {(x, µÃ(x)): x Є Ã5

Where, µÃ(x) is called membership function. The membership function, µÃ(x) maps
X on the interval [0 1]

µÃ(x): X [0 1]

The range of the membership function is subset of the non – negative real numbers whose
supremum is finite.

Features of the membership function

Three main basic features of membership function are as shown in figure 1 a

Figure 1 a Feature of membership function


lOMoARcPSD|37581550

1 CORE The core of a membership function for some fuzzy set 𝐴̃ is defined as that region of
the universe that is characterized by complete and full membership in the set𝐴̃. That is, the core
comprises those elements x of the universe X
such that 𝜇Æˇ(x) = 1
2 Support .The support of a membership function for some fuzzy set 𝐴̌ is defined as that
region of the universe that is characterized by nonzero membership in the set𝐴̌. That is, the
support comprises those elements x of the universe X
such that 𝜇Ƙ(x) > 0.
3. Boundary. The boundaries of a membership function for some fuzzy set Aare defined as that
region of the universe containing elements that have a nonzero membership but not complete
membership
0 < 𝜇Ƙ(x) < 0.

4. Normal and Subnormal Fuzzy Sets

A normal fuzzy set is one whose membership function has at least one element x in X the
universe whose membership value is unity. Otherwise it will be subnormal fuzzy set as shown in
figure 1(b) and figure 1(c).

Figure 1(b) Normal Fuzzy set Figure 1(c) Subnormal Fuzzy set

Convex fuzzy set


lOMoARcPSD|37581550

A convex fuzzy set is described by a membership function whose membership values are strictly
monotonically increasing, or strictly monotonically decreasing, or strictly monotonically
increasing then strictly monotonically decreasing with increasing values for elements in the
universe.
(Said another way, if, for any elements x, y, and z in a fuzzy set A, the relation x < y <z implies
that

µA˜ (y) = min⌊µA˜ (x), µA˜ (z)⌋


Otherwise set will be non-convex fuzzy set as shown in figure 1(d) and figure 1(e).

Figure 1 (d) convex fuzzy set Figure 1 (e) Norn – convex fuzzy set

Crossover Point
The crossover points of a membership function are defined as the elements in the universe X for
which a particular fuzzy set 𝐴̃ has values equal to 0.5, i.e., for which
𝜇Ƙ(x) = 0.5.

Height of a Fuzzy Set

The height of a fuzzy set 𝐴̃ is the maximum value of the membership function,

i.e., height (𝐴̃) = max (𝜇𝐴˜ (x))

For subnormal fuzzy set height (𝐴̃) <1


lOMoARcPSD|37581550

Inferences in Fuzzy Logic, Fuzzy IF-THEN Rules


In crisp logic, the truth values acquired by proposition or predicate are 2-valued, namely True,
False which may be treated numerically equivalent to (0, 1). However, in fuzzy logic, the truth
values are multivalued such as absolutely true, very true, partly true, absolutely false and so on
numerically equivalent to (0-1).
Fuzzy Propositions

A fuzzy proposition is a statement which acquires a fuzzy truth value. Thus, given 𝑃˜ to be
fuzzy proposition, T (𝑃˜ ) represents the truth value (0-1) attached to𝑃˜ . In its simplest
form, fuzzy propositions are associated with fuzzy sets. The fuzzy membership value associated
with the fuzzy set à for P is treated as the fuzzy truth value T (𝑃˜ ).

i.e. T (𝑃˜ ) =µÃ (x) where 0≤ µ𝐴̃ (x) ≤1


Example

𝑃˜ : Ram is honest.
T (𝑃˜ ) = 0.8 if P is partly true
T (𝑃˜ ) = 1 if P is absolutely true
Fuzzy Connectives

Fuzzy logic, similar to crisp logic, support following connectives;


(i) Negation ; -
(ii) Disjunction; v
(iii) Conjunction; ^

Let 𝑃 and 𝑄 are two fuzzy propositions with relative truth values are T (P) and T (Q) then
(iv) Implication; =>
˜ ˜
connectives can be defined as

Symbol Connective Usage Definition

- Negation � 1-T(𝑃˜ )

𝑝˜ Ç
˜

𝑄˜
V Disjunction max(T(𝑃˜ ), T(O˜ ))

𝑃˜ V
𝑄˜
^ Conjunction min(T(𝑃˜ ), T(O˜ ))

𝑃˜ =>
𝑄˜
=> Implication Max(1-T(𝑃˜ ), T(O˜ ))
lOMoARcPSD|37581550

𝑃˜ and 𝑄˜ are related by ‘=>’ operator are known as antecedent and consequent
respectively. Also, just as in crisp logic, here too, ‘=>’ represent the IF - THEN statement as
IF x is 𝐴˜ THEN y is𝐵˜ , and is equivalent to

𝑅˜ = (𝐴˜ ×𝐵˜ ) 𝖴 (𝐴˜ ×Y)


̅ ~
The membership function of 𝑅˜ is given by

� = � � �
� � � �
˜ ˜ ˜ ˜

Also for compound implication IF x is A THEN y is B ELSE y is C the relation R is equivalent


to

𝑅˜ = 𝑅˜ = (𝐴˜ ×𝐵˜ ) 𝖴 (𝐴˜ ×𝐶˜ )


̅

µ𝑅˜ (x, y) =max (min (µ𝐴˜ (x), µ𝐵˜ (y)), min (1-
The membership function of R is given by

Example

𝑃˜ : Mary is efficient, T (P˜)) =0.8


O˜ : Ram is efficient, T (O˜ ) =0.65

(i) 𝑃˜ : =Mary is not efficient.


T (𝑃˜ )=1-T (𝑃˜ ) = 1-0.8 =0.2

(ii) 𝑃˜ ⋀ O˜ : Mary is efficient and so is Ram


T (𝑃˜ ⋀ O˜ ) = min (T (𝑃˜ ), T (𝑄˜ )) = min (0.8, 0.65) = 0.65

(iii) 𝑃˜ VO˜ : Either Mary or Ram is efficient


T (𝑃˜ VO˜ ) = max (T (𝑃˜ ), T (O˜ )) = (0.8, 0.65) = 0.8
lOMoARcPSD|37581550

(iv) 𝑃˜ =>O˜ : If Marry is efficient then so Ram is


T (𝑃˜ =>O˜ ) =max ((1-T (𝑃˜ ), T ( O˜ )) =max (0.2, 0.65) =0.65
Example (To understand IF-THEN rule)

Let X= {a, b, c, d}, Y= {1, 2, 3, 4}


and 𝐴˜ = {(a, 0) (b, 0.8) (c, 0.6) (d, 1)}
𝐵˜ = {(1, 0.2) (2, 1) (3, 0.8) (4, 0)}
𝐶̃= {(1, 0) (2, 0.4) (3, 1) (4, 0.8)}

Determine the implication relations


(i) IF x is 𝐴˜ THEN y is 𝐵˜
(ii) IF x is 𝐴˜ THEN y is 𝐵˜ ELSE y is 𝐶˜
Solution

To determine Part (i)

Compute 𝑅˜ = (𝐴˜ ×𝐵˜ ) 𝖴 (𝐴˜ ×Y)


̅
The membership function of 𝑅 is given by
where
˜

µ𝑅˜ (x, y) =max (min (µ𝐴˜(x), µ𝐵˜ (y)), 1-


where µR(x, y) =max (min (µA(x), µB(y)), 1-µA(x))

1 2 3 4

𝐴 ×𝐵 =
a 0 0 0 0
˜ ˜ 0.2 0
0.8 0.8
b 0.2 06 0.6 0
c 0.2 0
1 0.8
d
lOMoARcPSD|37581550

and 𝐴˜ ×
̅
1 2 3 4
Y =a 1 1 1 1
bcd 0.2 0.2 0.2 0.2 1 2 3 4
0.4 0.4 0.4 0.4
0 0 0 0 a 0 0.4 1 0.8
Here Y is Universe of discourse could be
b 0 0.2 0.2 0.2

𝐴˜ ×𝐶 = d
viewed as {(1, 1)(2,1)(3,1)(4,1)} a fuzzy set c 0 0.4 0.4 0.4
˜
of all whose elements x have µ(x)=1. 0 0 0 0

Therefore 𝑅˜ =max ((𝐴˜ ×𝐵˜ ) 𝖴 (𝐴˜


̅
×Y)

Therefore 𝑅˜ = max ((𝐴˜


1 2 3 4

𝑅˜ =
a 1 1 1 1

˜ ))
×𝐵˜ ), (𝐴˜̅
b 0.2 0.8 0.8 0.2 ×𝐶

c 0.4 0.6 0.6 0.6 gives

𝑅˜ =
1 2 3 4

Which represents IF x is 𝐴 THEN y is 𝐵


̃ ˜
a 0 0.4 1 0.8
b 0.2 0.8 0.8 0.2
To determine Part II c 0.2 0.6 0.6 0.4
d 0.2 1 0 0

The above relation represents IF x is 𝐴̃ is


Compute Also for compound implication IF
x is 𝐴˜ THEN y is 𝐵˜ ELSE y is
Then y is 𝐵˜ ELSE y is 𝐶̃
𝐶˜ the relation 𝑅˜ is equivalent to

𝑅˜ = (𝐴˜ ×𝐵˜ ) 𝖴 (𝐴˜ ×𝐶˜ )


̅

The membership function of R is given by


µ𝑅˜ (x, y) =max (min (µ𝐴˜ (x), µ𝐵˜
(y)), min
((1-µ𝐴˜ (x), µ𝐶˜ (y)))

1 2 3 4
𝐴˜ ×𝐵˜ =
a 0 0 0 0
b 0.2 0.8 0.8 0
c 0.2 06 0.6 0
d 0.2 1 0.8 0
lOMoARcPSD|37581550

Fuzzy Inferences

Fuzzy inference also referred to as approximate reasoning refers to computational procedures


used for evaluating linguistic descriptions. The two important inferring procedures are

(i) GMP (Generalized Modes Ponens


(ii) GMT(Generalized Modes Tollens)

IF x is 𝐴˜ THEN y is 𝐵˜
GMP is formally stated as,

x i𝑠 𝐴˜′
𝑦 i𝑠 𝐵˜ ′

Here ˜A, B˜ A˜ ’, 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 ˜𝐵’ the max-min composition of fuzzy


set ˜𝐴’ with 𝑅ˇ (x, y) which is the known implication relation (IF-THEN) is used. That is,

B˜ ’=A˜ ’o
In term of membership function

µ𝐵˜ 𝘍 (y) =max (min (µ𝐴˜ 𝘍 (x), µ𝑅ˇ (x, y)))


Where µ𝐴˜ 𝘍 (x) is the membership function of 𝐴̃ ’ µ𝑅ˇ (x, y) is the membership function of

the implication relation and µ𝐵˜ 𝘍 (y) is the membership function of 𝐵˜ ’

On the other hand, GMT has the form

IF x is 𝐴̃ THEN y is 𝐵˜

𝑦 i𝑠 𝐵˜′
𝑥 i𝑠 𝐴̃′
lOMoARcPSD|37581550

To compute the membership function of ˜𝐴’ the max-min composition of fuzzy


set ˜𝐵’ with 𝑅ˇ (x, y) which is the known implication relation (IF-THEN) is used. That is,

𝐴’=𝐵˜ ’o𝑅
In term of membership function

µA˜’(x) =max (min (µB˜ ’(y), µR˜ (x, y)))

Where µ𝐴˜ 𝘍 (x) is the membership function of ˜𝐴’ µ𝑅ˇ (x, y) is the membership

function of the implication relation and µ𝐵˜ 𝘍 (y) is the membership function of 𝐵˜ ’

µ𝐴˜ 𝘍 (x) =max (min (µ𝐵˜ 𝘍 (y), µ𝑅ˇ (x, y)))

Solved Example on Fuzzy Inference

Apply the fuzzy Modes Ponens rule to deduce Rotation is quite slow

(i) If the temperature is high then rotation is slow.


(ii) The temperature is very high
Let 𝐻˜(High), 𝑉˜ H (Very High) 𝑆̃(Slow) and 𝑄˜ S (Quite Slow) indicate the associated fuzzy
sets as follows
For X= {30, 40, 50, 60, 70, 80, 90, 100}, the set of temperatures and Y= {10, 20, 30, 40, 50, 60}
the set of rotations per minute
𝐻˜= {(70, 1) (80, 1) (90, 0.3)}
𝑉˜ H = {(90, 0.9) (100, 1)}
𝑄˜ S = {(10, 1) (20, 0.8)}
𝑆̃= ((30, 0.8) (40, 1) (50, 0.6)}
To derive 𝑅˜ (x, y) representing the implication relation (i), we need to compute

𝑅˜ (x, y) =max (𝐻˜ ×𝑆˜ , 𝐻˜ ×Y)


lOMoARcPSD|37581550

10 20 30 40 50 60

30 0 0 0 0 0 0
𝐻˜×𝑆̃ = 50
40 0 0 0 0 0 0
0 0 0 0 0 0
60 0 0 0 0 0 0
70 0 0 0.8 1 0.6 0
80 0 0 0.8 1 0.6 0
90 0 0 0.3 0.3 0.3
100 0 0 0 0 0 0

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
𝐻˜×Y=
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

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
60 1 1 1 1 1 1

𝑅˜ (x, y) =max (𝐻˜×𝑆̃, 𝐻˜×Y)80=


70 0 0 0.8 1 0.6 0
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

To deduce Rotation is quite slow we make use of the composition

𝑄˜ S = 𝐻˜ o𝑅˜ (x, y) (set 𝐻˜ has membership vales for elements 90, and 100 only that
0.9 and 1 respectively. Membership values for remaining elements are 0)
= [0 0 0 0 0 0 0.9 1] × 𝑅˜ (x, y) = [1 1 1 1 1 1]
NOTE: (Apply max-min composition on matrices 𝐻˜ and 𝑅˜ (x, y))
lOMoARcPSD|37581550

Fuzzification & Defuzzification

Fuzzy Rule Based Systems

Fuzzy linguistic descriptions are formal representations of systems made through fuzzy IF-
THEN rules. They encode knowledge about a system in statement of the form-
IF (a set of conditions) are satisfied THEN (a set of consequent) can be inferred,

Fuzzy IF-then rule is coded in the form


IF(x1 is 𝐴˜ 1, x2 is 𝐴˜ 2 …..xn is 𝐴˜ n) THEN (y1 is 𝐵˜ 1, y2 is 𝐵˜ 2….yn is 𝐵˜ n)
where linguistic variables xi, yj take the values of fuzzy sets 𝐴̃ i and 𝐵ˇ j respectively.
Where i, j =1,2, ….,n

Example for fuzzy Rule Base

If there is heavy rain and strong winds


Then there must be severe flood warning.
Here heavy, strong, and severe are fuzzy sets qualifying 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 the each rule. Then
C=CI ∩C2 ∩C3…… ∩ Cn

Where µc(y) =min (µc (µc (y1), µc (y2)….. µc (yn)))

∀y∈Y where 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
C1𝖴C2𝖴C3.........................𝖴Cn
Where µc(y) =max(c(µc(y1), µc(y2)….µc (yn))) ∀y∈Y
lOMoARcPSD|37581550

Fuzzification

Fuzzification is the process of transforming crisp set to a fuzzy set or a fuzzy set to fuzzier set i.
e. crisp quantities converted to fuzzy quantities. This operation translates crisp input values into
linguistic variables. In the real-life world, the quantities may be thought of as crisp, accurate and
deterministic, but actually they are not so. They possess uncertainty within themselves. The
uncertainty may arise due to vagueness, imprecision and ambiguity. In this case the variable is
probably fuzzy and can be represented by a membership function.

For example, when one is told that temperature is 90C, then person translates the crisp input
value into linguistic variable such as “cold” or “warm” according ones knowledge and then make
a decision about the need to wear jacket. If one fails to fuzzify then it is not possible to take
decision or error decision may be reached.

For a fuzzy set 𝐴̃ = {𝑥i, µÆ˜(𝑥i): 𝑥iЄ X } a common fuzzification algorithm is performed by
keeping µÆ˜ (𝑥i ) constant and 𝑥i being transformed into fuzzy set 𝑄˜ (𝑥i ) depicting the
expression about 𝑥i . The fuzzy set 𝑄˜ (𝑥i ) is kernel of fuzzification.

The fuzzified set 𝐴̃ be expressed as

𝐴̃ = µÆ˜ (𝑥1 ). 𝑄˜ (𝑥1 )+ µÆ˜ (𝑥2 ). 𝑄˜ (𝑥2 ) + ……….+µÆ˜ (𝑥𝑛 ). 𝑄˜ (𝑥𝑛 ) for I = 1 to n

This Process of fuzzification is called support (s-fuzzification) fuzzification. There is another


method of fuzzification is called g-fuzzification or grade fuzzification. In this method 𝑥i is kept
constant and µÆ˜(𝑥i) expressed as a fuzzy set.

Defuzzification-

In many situations, for a system whose output is fuzzy, it is easier to take crisp decision if the
output is represented as a single scalar quantity. This conversion of a fuzzy set to single crisp
value is called defuzification and it the reverse process of fuzzification..
Methods for defuzzification are

(a) Centroid Method

Also known as the centre of gravity or centre of area method, It obtains the centre of area (x*)
occupied by the fuzzy set. The expression for x* is given as
lOMoARcPSD|37581550

∫ µ(x)xdx
X* for a continuous membership function,
xi.µ(xi)
= ∫ µ(x)dx

∑𝑛
𝑛 µ ( xi )

and x* = i=1
for a discrete membership function.
i=1

Here n represents the number of elements in the sample, x i“ are the elements, and µ (xi) is its
membership function.

(b) Centre of Sums (COS) Method-

In this method, overlapping area is counted twice whereas in centroid method overlapping area is
counted once. COS builds the resultant membership function by taking the algebraic sum of
outputs from each of the contributing fuzzy sets A1, A2, A3, etc. The defuzzified value x* is
given by

𝑁 𝑛

i=1 𝑥i.∑
k
µ𝐴˜ (𝑥
𝑁 .∑𝑛
k
X*
𝐴k
∑ i ) µ ˜ (𝑥i)
= i=1 k=1

Here n is the number of fuzzy sets and N is 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.

(c) Mean of Maxima (MOM) Defuzzification-


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 for defuzzified value x* is given by

∑𝑥 ച𝑀 𝑥i
i
X* Where M= {xi /µ (xi) equal to the height of fuzzy set}
= |𝑀|

|M| is the cardinality of set M. In the continuous case M, could be defined as


M={x€[c,-c] is equal to the height of fuzzy set}
lOMoARcPSD|37581550

In such case, the mean of maxima is the arithmetic average of mean value of all intervals
contained in M including o length intervals.
The height of fuzzy set 𝐴̃ i.e h (𝐴̃) is the largest membership grade obtained by any element in
the A˜ set.
Example on difuzzification
A˜ 1, A˜ 2, A˜ 3, are three fuzzy sets as shown below in figure 4.1, figure 4.2, and
figure 4.3 respectively and aggregate is give in figure 4.4

1.0

µ 0.75

0.5

0.25 0.3

0 1 2 3 4 5 6 7 8

Figure 4.1 A˜1

1.0

µ 0.75

0.5 0.5

0.25

0 1 2 3 4 5 6 7 8 x
Figure 4.2 A˜2

1.0 1.0

µ 0.75

0.5

0 1 2 3 4 5 6 7 8 x
Figure 4.3 A˜3
lOMoARcPSD|37581550

1.0
1.0
µ 0.75

0.5

0.3

0 1 2 3 4 5 6 7 8 x

3.6 5.5

Figure 4.4 Aggregate of fuzzy sets A˜1, A˜2, A˜3

The defuzzification using (1) centroid method (2) COS method and (3) mean of maxima method
is presented below

Centroid Method

To Compute X* the centroid , we view the aggregate fuzzy set as shon in figure. In figure the
aggregate output has been divided into areas for better understanding

1.0
1.0
µ 0.75
7
0.5 4

0.3

5 8
2 c
3 9
1

0 1 2 3 4 5 6 7 8 x

3.6 5.5

Figure 4.5 Aggregated fuzzy sets of 𝐴˜ 1, 𝐴˜ 2, 𝐴˜ 3 viewed as area segments


lOMoARcPSD|37581550

For computation of x* we use table below

Area segment No AREA (A)


X A.X
1 1
×0.3×1 =0.15 0.67 0.1005
2
2 2.6×0.3 =0.78 2.3 1.794
3 0.3×0.4 = 3.8 3.8 0.456
4 1
×0.4×0.2 =0.04 3.8667 0.1546
2
5 1.5×0.5 = 0.75 4.75 3.5642
6 0.5×0.5 =0.25 5.75 1.4375
7 1
×0.5×0.5 =0.125 5.833 0.729
2
8 1×1 =1 6.5 6.5
9 1/2×1×1 =0.5 7.333 3.665
ΣA=3.715
ΣA. X=18.353

Note-Compute area and centroid of each segment separately using mathematical formulae. In
figure 4.5 regions 1, 4, 7 are triangular and remaining are rectangular.
(Centroid for triangular region X=𝑥1+𝑥2+𝑥3
3

In the table area (A) shows the area of segments of the aggregate fuzzy set and X shows the
corresponding centroid.
Now∑
Æ.𝑋 18.353
X*= = = 4.9
∑ Æ 3.715
Centre of Sums (COS) Method
Here, unlike centroid method the overlapping area is counted not once but twice. Making use of
aggregated fuzzy set shown the centre of sums, x* is given by

1.0
1.0
µ 0.75

0.5

0.3
2 3
1

0 1 2 3 4 5 6 7 8 x
Figure 4.6 –Aggregated fuzzy sets of 𝐴˜ 1, 𝐴˜ 2, 𝐴˜ viewed as area segments
overlapping area counted twice
lOMoARcPSD|37581550

For computation of x* we use table below

Area segment No AREA (A)


X A.X
1 1
×0.3×(3+5)=1.2 2.5 3.00
2
2 1
×0.5×(4+2)=1.5 5 7.5
2
3 1
×2×1×(3+1)=2 6.5 13.0
2
ΣA=4.7 ΣA.X̅ =23.5

ΣA.X̅ 23.5
X* = ΣA =4.7 =5.0

Mean of Maxima (MOM) method

Since the aggregated fuzzy set shown in fig (d) is a continuous set x* the mean of maxima is
computed as x*=6.5.
Here M = {X ∈[6, 7] /µ(x) =1] and the height of the aggregate fuzzy set is
1. Figure 4.7 below shows the defuzzyfied outputs using above three
methods

1.0

µ 0.75

0.5

0.3

0 1 2 3 4 5 6 7 8 x

X*=4.9 Centroid
method x*=6.5 MOM method
X*=5 COS X
method

Figure 4.7 Defuzzified outputs of the sets of A˜1, A˜2, A˜3


lOMoARcPSD|37581550

Fuzzy Controllers, Industrial Applications –

The working of any fuzzy controller is shown in figure 5.1 below

START CRlSP lNPUT FUZZlFlCATlON FUZZY lNPUT RULE EVALUATlON

END DEFUZZlFlCATlON
CRlSP OUTPUT FUZZY OUTPUT

Figure 5.1 working of fuzzy controllers

Two fuzzy Controllers are

(i) Greg Viot’s Fuzzy Cruise Control System


(ii) Yamakawa,s Air Conditioner Controller
(iii)

Greg Viot, s Fuuzzy Cruise Controller


This controller is used to maintain a vehicle at desired speed. The system consists of two
fuzzy inputs, namely speed difference speed difference and acceleration, one fuzzy output,
namely throttle control as illustrated in figure 5.2

Speed difference
Fuzzy Cruise Control
Throttle Control
Acceleratio
n
Figure 5.2 Fuzzy Cruise Control
System

Fuzzy Rule Base

A sample fuzzy rule base R governing the fuzzy cruise Control is as given in table below

Table-1 Fuzzy Rule Base for Cruse Control

Rule 1 If(speed difference is NL) and (acceleration is ZE) then (throttle control is PL)
Rule 2 If(speed difference is ZE) and (acceleration is NL) then (throttle control is PL)
Rule 3 If(speed difference is NM) and (acceleration is ZE) then (throttle control is PL)

Rule 4 If(speed difference is NS) and (acceleration is ZE) then (throttle control is PL)
Rule 5 If(speed difference is PS) and (acceleration is ZE) then (throttle control is PL)
lOMoARcPSD|37581550

Rule 6 If(speed difference is PL) and (acceleration is ZE) then (throttle control is PL)
Rule 7 If(speed difference is ZE) and (acceleration is ZE) then (throttle control is PL)

Rule 8 If(speed difference is ZE) and (acceleration is ZE) then (throttle control is PL)

Keys
NL – Negative Large NM – Negative Medium, NS - Negative
Small, ZE- - Zero PS – Positive Small, PM - Positive Medium, PL-
Positive Large
Fuzzy Sets

The fuzzy sets which characterize the inputs and outputs are as given in figures

NL NM NSZE PS PMPL
1

Degree of membership

0 31 63 95 127 159 191 223 255

Figure 5.3 Speed difference (Normalized)

NL NM NSZE PS PMPL
1

Degree of membership

0 31 63 95 127 159 191 223 255

Figure 5.4 Acceleration (Normalized)

NL NM NSZE PS PMPL
1

Degree of membership

0 31 63 95 127 159 191 223 255

Figure 5.5 Throttle control (Normalized)


lOMoARcPSD|37581550

Defuzzification

The centre of gravity method is applied to defuzzify the output. Initially the centroid is computed
for each of computing output membership function. 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 outputs area, the letter serving as weights.
Example

Figure 5.10 illustrates the computation of CG for the two competing outputs of rule 7 and 8
with strength of 0.1563 each

PS PM

Degree of membership
b1 b2
0.1563 h1

127 159 191 233


a1

a2

Figure 5.10) Computation of centre of Gravity

For the fuzzy set PS

X-axis centroid =159


Rule strength applied to determine output area =0.1563
Shaded area =×h× (a1+b1) = 1(0.1563) × (64+63.82) =9.99
2
For the fuzzy set PM

X-axis centroid point =191


Rule strength applied to determine output area =0.1563
Shaded area =1.h. (a1+b1) =1. (0.1563)(64+63.82) =9.99
2 2
Therefore
lOMoARcPSD|37581550

9.99×159+9.99×191
Weighted average (CG) =
9.99+9.99 = 175

In crisp terms the throttle control (normalized) is to be set as 175.

………………………………………

You might also like