You are on page 1of 9

Soft Computing (EC1710)

Assignment No. 1
1.Define fuzzy set and its basic operation.

2.Consider two fuzzy sets A and B. Find complement, union, intersection and De Morgan’s
law.

A = {2/1+3/0.5+4/0.6+5/0.2+6/0.6}, B = {2/0.5+3/0.8+4/0.4+5/0.7+6/0.3}.

[ Note De Morgan’s law: ̅̅̅̅̅̅


𝐴𝑈𝐵 = 𝐴̅ 𝑈𝐵̅ & ̅̅̅̅̅̅̅
𝐴 ∩ 𝐵 = 𝐴̅ ∩ 𝐵̅ . The membership value of
any element ‘x’ in the null set 𝜑 is 0 and the membership value of any element ‘x’ in the
whole set 𝑥 is 1.]

3. We want to compare two sensors based upon their detection levels and gain settings.
The following table of gain settings and sensor detection levels with a standard item being
monitored provides typical membership value to represent the detection levels for each
of the sensors.

Gain Setting Sensor-1 (S1) Sensor-2 (S2)


Detection Levels Detection Levels
0 0 0
20 0.5 0.35
40 0.65 0.5
60 0.85 0.75
80 1 0.9
100 1 1

The universe of discourse is X= {0,20,40,60,80,100}.


(a) Find the membership function for the two sensors.
(b) Find the following membership functions using standard set operations.
(i) 𝜇𝑆1∪𝑆2 (𝑥) (ii) 𝜇𝑆1∩𝑆2 (𝑥) (iii) 𝜇̅̅𝑆1̅̅ (𝑥) (iv) 𝜇̅̅𝑆2̅̅ (𝑋) (v) 𝜇̅̅̅̅̅̅̅̅̅
𝑆1∪𝑆1 (𝑥) (vi) 𝜇̅̅̅̅̅̅̅̅̅
𝑆1∩𝑆1 (𝑥)

̅̅̅̅ (𝑥) (vii) 𝜇𝑆1∩𝑆1


(vii) 𝜇𝑆1∪𝑆1 ̅̅̅̅ (𝑥) .

4. Let ‘x’ be the universe of commercial aircraft of interest.


X = {a10, b52, b117, c5, c130, f4, f14, f15, f16, f111, kc130}.

Let A = {f16/0.3, f4/0.5, a10/0.4, f14/0.6, f111/0.7, b117/1.0, b52/1.0}

where, ‘A’ is the fuzzy set for passenger class aircraft, B be the fuzzy set of cargo,

B= {b117/0.4, f111/0.4, f4/0.6, f15/0.8, f14/0.9, f16/1.0}.

Find the value of the operation performed on these fuzzy sets. [i.e. 𝐴𝑈𝐵, 𝐴 ∩ 𝐵 ̅̅̅
, 𝐴, 𝐵̅ ].

5. What is cardinality of fuzzy set?

6. Using your own intuition and definitions of the universe of discourse, plot fuzzy function for
“weight of people” with the help of 5 linguistic variables.

7. Using your intuition, develop fuzzy numbers “approximately 4 or approximately 8” Using


the following function shapes.

(a) Triangular
(b) Trapezoidal
(c) Gaussian function.

8. Two fuzzy sets P and Q are defined on x as follows.

𝜇(𝑥1) x1 x2 x3 x4 x5
P 0.1 0.2 0.7 0.5 0.4
Q 0.9 0.6 0.3 0.2 0.8

Find the following 𝜆 cut sets:


(a) 𝑃0.2 (b) 𝑃0.3 (c) (𝑃𝑈𝑄)0.5 (d) (𝑃 ∩ 𝑄)0.4 (e) (QU𝑃̅)0.8 (f) (PU𝑃̅)0.2

9. Given these fuzzy sets:

A= {x1/0.9+x2/0.5+x3/0.2+x4/0.3}
B= {x1/0.2+x2/1+x3/0.8+x4/0.4}
C = {x1/019+x2/0.7+x3/0.5+x4/0.6}
Find 𝐴0.6, 𝐵1.0, 𝐶0.3 , ̅̅̅̅̅
𝐴0.2 , ̅̅̅̅̅
𝐴0.2, ̅̅̅̅̅
𝐵0.8 , ̅̅̅̅̅
𝐶0.5
10. The fuzzy sets A and B are defined as universe, x = {0,1,2,3} with the following
membership fractions:

2 4𝑥
𝜇𝐴 (𝑋) = 𝑥+3 , 𝜇𝐵 (𝑋) = 𝑥+5

Define the intervals along x-axis corresponding to the 𝜆 cut sets for each fuzzy set A and B
for following values of 𝜆 : 0.2,0.5,0.6.

11.For given membership function given below determine the defuzzified output value by
different methods.

12. Find the defuzzied value of the given fuzzy set by weighted average method.
13. If reference sets x= {m, n}and Y= {p, q, r}and fuzzy sets A and B defined on them are:
A= 0.3/m + 0.7/n ; B=0.5/p +0.1/q +0.8/r.
Find the fuzzy relation ‘R’ between fuzzy sets A and B.

14. Consider two fuzzy sets A and B. A represents universe of three discrete temperature
x= {x1, x2, x3} and B represents universe of two discrete flow Y= {y1, y2}. Find the fuzzy
relation ‘R’ between them.

15. Let R: If ‘job is risky’ then ‘compensation is high’ be a fuzzy rule. There are four jobs -
job1, job2, job3, job4 constituting the universe job = {job1, job2, job3, job4}. Also, there are
four categories of compensation C1, C2, C3, and C4 in ascending order. Hence the universe
for compensation = {C1, C2, C3, C4}. The fuzzy sets risky -job and high – compensation is
defined on the universe job and compensation respectively as given below.

Risky-job =0.3/job1+0.8/job2+0.7/job3+0.9/job4,
High-compensation=0.2/C1+0.4/C2+0.6/C3+0.8/C4. Using Zadeh’s interpretation of the
implication methods. Find the relation ‘R’ which gives the truth value of rule R.

Fuzzy Implication method for the fuzzy ‘if......then........’ rule

The fuzzy rule if ‘x is A’ then ‘y is B’ is symbolically expressed as R: A(x) → B(y)

The above fuzzy rule if ‘x is A’ then ‘y is B’ can be expressed as a fuzzy relation between A
and B where

R(x,y) = ζ[A(x)→B(y)]

Two most popular interpretations of fuzzy rule are:

(a) Mamdani’s interpretation of fuzzy rule


R(x,y) = ζ[A(x)→B(y)]
=min[ζ(A(x)), ζ(A(y))]
=min [𝜇𝐴 (𝑥), 𝜇𝐵 (𝑦)]

(b) Zadeh’s interpretation of fuzzy rule


R(x,y) = ζ[A(x)→B(y)]
=max [{𝜇𝐴 (𝑥), 𝜇𝐵 (𝑦)}, 1-𝜇𝐴 (𝑥)]
i.e R=(AxB)U(A’xV)
Assuming U&V universes for the fuzzy sets A and V respectively & V is the fuzzy
set in which all members have membership value 1

Sol.
̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅
R = (risky job x high-compensation) U (𝑟𝑖𝑠𝑘𝑦 − 𝑗𝑜𝑏 𝑥 𝑐𝑜𝑚𝑝𝑒𝑛𝑠𝑎𝑡𝑖𝑜𝑛)
𝑐1 𝑐2 𝑐3 𝑐4
𝑗𝑜𝑏1 0.2 0.3 0.3 0.3
𝑗𝑜𝑏2 0.2 0.4 0.6 0.8
risky-job x high compensation = [ ]
𝑗𝑜𝑏3 0.2 0.4 0.6 0.7
𝑗𝑜𝑏4 0.2 0.4 0.6 0.8
𝑐1 𝑐2 𝑐3 𝑐4
𝑗𝑜𝑏1 0.7 0.7 0.7 0.7
̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅ 𝑗𝑜𝑏2 0.2 0.2 0.2 0.2
𝑟𝑖𝑠𝑘𝑦 − 𝑗𝑜𝑏 x high compensation = [ ]
𝑗𝑜𝑏3 0.3 0.4 0.6 0.7
𝑗𝑜𝑏4 0.2 0.4 0.6 0.8

[Since compensation is a fuzzy set whose elements are 1]


𝑗𝑜𝑏1 0.7 0.7 0.7 0.7
𝑗𝑜𝑏2 0.2 0.4 0.6 0.8
R= [ ]
𝑗𝑜𝑏3 0.3 0.4 0.6 0.7
𝑗𝑜𝑏4 0.2 0.4 0.6 0.8
Hence matrix ‘R obtained above’ embodies the information in the fuzzy implication.
IF job is Risky THEN Compensation is high on the basis of the fuzzy concepts risky-
job and high-compensation.
16. Consider two fuzzy sets A and B
0 0.1 0.3 0.8 1.0
A = {5 + 30 + 50 + 100 + 300}
0.7 0.8 0.2 0.1 0.7
B={2 + + + 10 + 1.2}
4 8

(a) Find fuzzy relation using the Cartesian product A×B.


Another fuzzy set ‘C’ is defined as
1.0 0.8 0.1 0.2 0
C = { 5 + 30 + 50 + 100 + 300}

Find a relation between ‘C’ and previously determined relation of part(a) using
(b) Mamdani’s (min. compensation) implication rule
(c) Zadeh’s (max. compensation) implication rule
17. using max-min compensation, find the relational matrix between 𝑅1 and 𝑅2
𝑦1 𝑦2 𝑦3 𝑦4 𝑦5
𝑥1 0.1 0.2 0.1 1 0.8
𝑥
𝑅1 = 2 [0.4 0.5 0 0.2 1 ]
𝑥3 0.9 0.2 0.4 0.3 0.2

𝑧1 𝑧2 𝑧3 𝑧4
𝑦1 0.8 0.1 0.5 0.4
𝑦2 0.3 0.9 0.8 0.1
𝑅2 = 𝑦3 1 0.2 0.6 0.1
𝑦4 0.4 0.2 0.3 0
𝑦5 [0.1 1 0.8 0.7]

18. By using centroid method of defuzzification convert fuzzy value ‘Z’ to precise value 𝑍 ∗
for the following graph.

19. Many products, such as tar, petroleum jelly, and petroleum are extracted from crude oil.
In newly drilled oil well three sets of oil samples are taken and tested for their viscosity.
The results are given in the form of the three fuzzy sets 𝐵1 , 𝐵2 and 𝐵3 , all are defined
on a universe of normalized viscosity as shown in the figure below. By using standard
formulas, we want to find the most nearly representative viscosity value for all these oil
samples, & hence find the crisp value (𝑍 ∗ ) for the three fuzzy viscosity sets
20.Two company bid a contract. A committee has to review the estimates of those companies
and give reports to its chairman. The reviewed report are evaluated on a non-dimensional
scale and assigned a weighted score that is represented by fuzzy membership function as
illustrated by the two fuzzy sets 𝐵1 & 𝐵2 in figure. The chairperson is interested in the
lowest bid, as well as a metric to measure the combined “best” score. For the logic union
of membership functions shown here, find the defuzzified value, 𝑍 ∗ using each of the
methods discussed. Comment on the differences of the methods.

1
μ μ

Z Z
2 3 5 6
2 3 4

21. Design a fuzzy cruise controller given by the following block diagram.
Speed difference
Fuzzy cruise Throttle control
control
Acceleration

The fuzzy sets for the fuzzy linguistic variables are provided below.

μ
NL NM NS ZE PS PM PL

Z
0 31 63 95 127 159 191 223 255

(a) Speed deference (normalized)


Where NL-Negative Large, ZE- Zero, PL- Positive Large, NM- Negative Medium, NS-
Negative Small, PS- Positive Large
(b)Acceleration (normalized) &
(c) Throttle control (normalized)
Find the input if normalized speed difference is 100 & normalized acceleration is 70.

22. Design a fuzzy logic controller to simulate a temperature control system for a room using
Matlab’s fuzzy logic Toolbox.

23. A system is described by a set of three rules, using the forgoing fuzzy variables. All the
rules have to be satisfied simultaneously for the system to work. The rules are
(1) IF x and y then 𝑧1
(2) IF x and y then 𝑧2
(3) IF 𝑥 2 and 𝑦 2 then 𝑧1
Determine the output of the system by graphical inference using max-min technique if x=3
and y=4 and use centroid method for defuzzification.

24. Use Matlab’s fuzzy logic toolbox to model the tip given after a dinner for two, where
the food can be disgusting, not good, blunt, satisfying, good, or delightful & the service can
be poor, average, or good. Then use the fuzzy inference system (FIS) & membership
function editors to define and tune your rules.

25. Consider the Takagi-Sugeno fuzzy rules:


𝑅1 : IF (x is negative) THEN (𝑦1 = 𝑒 −0.9𝑧 )
𝑅2 : IF (x is zero) THEN (𝑦2 = 4.2𝑥)
𝑅3 : IF (x is positive) THEN (𝑦3 = 𝑒 −0.𝑥 )

μ
1

x
-10 -4 0 4 10
Evaluate y in case of x=-3, x=2 and x=9.

You might also like