2010 2011 Session Questions and Model Answers
2010 2011 Session Questions and Model Answers
Solutions to
CS4001 Fuzzy Logic and Fuzzy Control Systems
Use the fuzzy subset notation of ordered pairs {(x, µA(x))} where x∈X, X
being the universe of discourse and A is a fuzzy (sub)-set of X:.
Q1 (b) Compute the core, support and cardinality of the fuzzy sub-set of
the three ancestors and the two parents.
Answer 1b
(i) Core of all these fuzzy sets is the null set φ, as no members have the membership function
value equal to unity.
[10 Marks]
(ii) Support of all the fuzzy sets comprises all the listed members as members with zero
belongingness have been omitted.
[10 Marks]
Answer 2(a)
Relationships
[40 Marks]
Q2 (b)
The student is expected to discuss the Cartesian product of two fuzzy subsets – income and risk:
The 5artesian or cross product of fuzzy subsets A and B, of sets X and Y respectively is denoted as
A×B
T=A×B
µ Income
Excellent
( x ) = 0, ∀x ≤ 90; µ Income
Excellent
( x ) = 1, x ≥ 120;
µ Income
Good
( x ) = 0, ∀x ≤ 50 & ∀x ≥ 100 ; µ Income
Good
( x ) = 1, x = 75 ;
µ Income
Poor
( x ) = 0, ∀x ≥ 60 ; µ Income
Poor
( x ) = 1, x ≤ 10.
µ Risk
Low
( x ) = 0, ∀x ≥ 40 % ; µ Risk
Low
( x ) = 1, x ≤ 20% ;
µ Risk
Medium
( x ) = 0, ∀x ≤ 20% & ∀x ≥ 80% ; µ Risk
Medium
( x ) = 1, 40 % ≤ x ≤ 60% ;
µ Risk
High
( x ) = 0, ∀x ≤ 60 %; µ Risk
High
( x ) = 1, x ≥ 80 % ;
Answer 2(b)
x − a c − x
trim f ( x ; a , b , c ) = m a x m in , ,0
b − a c − b
,
x − a d − x
tra p m f ( x ; a , b , c , d ) = m a x m in ,1 , ,0
b − a d − c
,
Risk
And
1
0.9
0.8
0.7
0.6
0.5 Poor
0.4
Good
0.3
Excellent
0.2
0.1
0
0 50 100 150
Income (K Euros)
Then the fuzzy patches can be drawn as follows:
[60 Marks]
Q3 (a). Use the algebraic relationship between the input and the output,
for computing the value of the constants p01, p11, p02, p12.
Answer 3a
COMPOSITION
µ1 ( x) * [ p01 + p11 x] + µ 2 ( x) * [ p 02 + p12 x]
y=
µ1 ( x ) + µ 2 ( x )
µ1 ( x )
µˆ 1 ( x) =
µ1 ( x ) + µ 2 ( x )
µ 2 ( x)
µˆ 2 ( x) =
µ1 ( x ) + µ 2 ( x )
∴ y = µˆ 1 ( x) * [ p 01 + p11 x] + µˆ 2 ( x) * [ p 02 + p12 x]
[30 Marks]
Answer 3(b)
What is equally important here is that Takagi and Sugeno have method to
an n-rule, m-parameter system.
[20 Marks]
Q3 (c) Consider the following fuzzy implications (or rules) R1, R2, and R3
used in the design of a Takagi-Sugeno controller:
where y (i) refers to the consequent variable for each rule labelled Ri and
x1 and x2 refer to the input variables that appear in premise of the rules.
Compute the output of the 3-rule TS controller for input values 5 and 12.
Show all three steps of the computation, fuzzification, inference, and
composition for each of the input values.
Membership Functions
Small Medium Big Critical
x1=5 0.69 0.37 0 0.37
x2=12 0.25 0 0.2 1
∑ y=y
i =1, 3
(i )
* y (i )
=
∑ y=y
i =1, 3
(i )
[50 Marks]
Q4
Compute Enda’s speed of rotation (η) for the following cases: Indicate
clearly all the processes of fuzzy inference in your computation.
9.95 30 0˚
65.1 30 -30˚
ANSWER 4.
FUZZIFICATION:
[20 Marks]
Answer 4 (Continued)
FUZZIFICATION:
[20 Marks]
Answer 4 (Continued)
η ( χ1 , χ 2 , χ 3 ) ≡
5
∑α i *η i
0.0.8
η (10,30,0) = i =1
5
= = 2.2298 deg/ sec
0.4166
∑αi =1
i
[30 Marks]
Answer 4 (Concluded)
η (χ1 , χ 2 , χ 3 ) ≡
5
∑α i *η i
0 .8
η (65.1,30,−30) = i =1
5
= = 3.198 deg/ sec
0.250
∑αi =1
i
[30 Marks]
Q5
Q5(a). Consider the OR-gate with two inputs and one output:
X1 X2 Y
0 0 0
1 0 1
0 1 1
1 1 1
You are expected to train a perceptron, with two inputs and one output, to learn
to behave like an OR gate. Assume that the learning constant α=0.2, bias θ=-0.3
and input weights are w1=0.3 and w2=-0.1. Train the perceptron for at least 4
epochs. Tabulate the inputs and outputs (actual and desired) together with
weight changes.
Epoch 1
Epoch 2
Epoch 3
Epoch 4
[60 Marks]
Q5 (b) Can you use the perceptron learning algorithm for learning the behaviour
of an XOR gate? Give your reasons as to whether you can or cannot?
ANSWER 5(b)
Answer 5b. XOR gate cannot be modelled by simple perceptron since it doesn’t
belong to the set of linearly separable problems. Single perceptron can represent
a line in an input space where all inputs below this line have one output value
and all inputs above this line have another value. Since input space of XOR
problem cannot be divided by line to get all inputs related to 0 outputs on the
one side and all inputs related to 1 outputs to the other side of the line, single
perceptron can never model a XOR gate.
Q5 c. Describe the architecture of an adaptive neuro-fuzzy system that
can learn the behaviour described in the above rule base governing the
operation of an XOR gate.
ANSWER 5(c)
-1.5 -0.5
1 -9.0 1
1
x1 Σ ƒ x1 Σ ƒ
1
1
1
x2 x2