EE658A Assignment 6
EE658A Assignment 6
K
Roll No:17104027
EE658A: Assignment 6
Question No. 3: Mamdani fuzzy inference system – overview, methodology, schematic
diagram, fuzzification and defuzzification using various methods and formulae, solved
examples with suitable diagram. (Minimum 500 words).
Overview:
Mamdani's fuzzy inference method is the most commonly seen fuzzy methodology. Mamdani's method was
among the first control systems built using fuzzy set theory. It was proposed in 1975 by Ebrahim Mamdani as an
attempt to control a steam engine and boiler combination by synthesizing a set of linguistic control rules obtained
from experienced human operators. Mamdani's effort was based on Lotfi Zadeh's 1973 paper on fuzzy algorithms
for complex systems and decision processes.
Methodology:
Mamdani type fuzzy inference process consists of five steps:
Step 1: Fuzzify input variables.
Step 2: Apply fuzzy operator.
Step 3: Apply implication method.
Step 4: Apply aggregation method.
Step 5: Defuzzification.
Schematic diagram:
Fuzzification:
The Mamdani fuzzy inference system was proposed as the first attempt to control a steam engine and boiler
combination by a set of linguistic control rules obtained from experienced human operators. Figure 2 is an
illustration of how a two-rule Mamdani fuzzy inference system derives the overall output z when subjected to two
crisp inputs x and y.
Figure 2: The Mamdani fuzzy inference system using min and max for T-norm and T-conorm operators,
respectively
If we adopt max and algebraic product as our choice for the T-norm and T-conorm operators, respectively, and
use max-product composition instead of the original max-min composition, then the resulting fuzzy reasoning is
shown in Figure2, where the inferred output of each rule is a fuzzy set scaled down by its firing strength via
algebraic product. Although this type of fuzzy reasoning was not employed in Mamdani's original paper, it has
often been used in the literature. Other variations are possible if we use different T-norm and T-conorm operators.
Figure 3: The Mamdani fuzzy inference system using product and max for T-norm and T-conorm operators,
respectively
In Mamdani's application, two fuzzy inference systems were used as two controllers to generate the heat input to
the boiler and throttle opening of the engine cylinder, respectively, to regulate the steam pressure in the boiler and
the speed of the engine. Since the plant takes only crisp values as inputs, we have to use a defuzzifier to convert
a fuzzy set to a crisp value.
Defuzzification:
Defuzzification refers to the way a crisp value is extracted from a fuzzy set as a representative value. In general,
there are five methods for defuzzifying a fuzzy set A of a universe of discourse Z, as shown in Figure 3. (Here the
fuzzy set A is usually represented by an aggregated output MF, such as C' in Figures 4.2 and 4.3).
where μA(z) is the aggregationed output MF. This is the most widely adopted defuzzification strategy,
which is reminiscent of the calculation of expected values of probability distributions .
where α=min{z|z ∈ Z} and β=max{z|z ∈ Z}. That is, the vertical line z=zBOA partitions the region
between z=α, z=β, y=0 and y=μA(z) into two regions with the same area.
Mean of maximum zMOM: zMOM is the average of the maximizing z at which the MF
reach a maximum μ*. In symbols
where Z' = {z | μA(z)=μ*}. In particular, if μA(z) has a single maximum at z=z*, then zMOM=z*. Moreover,
if μA(z) reaches its maximum whenever z ∈ [zleft, zright] (This is the case in Figure 3), then zMOM = (zleft
+ zright)/2. The mean of maximum is the defuzzification strategy employed in Mamdani's fuzzy logic
controllers.
Smallest of maximum zSOM: zSOM is the minimum (in terms of magnitude) of the maximizing z.
Largest of maximum zLOM: zLOM is the maximum (in terms of magnitude) of the maximizing z.
Because of their obvious bias, zSOM and zLOM are not used as often as the other three defuzzification
methods.
The calculation needed to carry out any of these five defuzzification operations is time-consuming unless special
hardware support is available. Furthermore, these defuzzification operations are not easily subject to rigorous
mathematical analysis, so most of the studies are based on experimental results. This leads to the propositions of
other types of fuzzy inference systems that do not need defuzzification at all; two of them are introduced:
An example of a single-input single-output Mamdani fuzzy model with three rules can be expressed as:
Figure: 5
Figure :5 plots the membership functions of input X and output Y, where the input and output universe are [-10,
10] and [0, 10], respectively. With max-min composition and centroid defuzzification, we can find the overall
input-output curve, as shown in Figure 4.
Note that the output variable never reaches the maximum (10) and minimum (0) of the output universe. Instead,
the reachable minimum and maximum of the output variable are determined by the centroids of the leftmost and
rightmost consequent MFs, respectively.
Figure:6
In the climate comfortability example, three truncated fuzzy sets coming from three rules respectively are operated
through aggregation method by function max, and a combined new fuzzy set representing the outcome for output
variable ‘climate evaluation’ is ready for the last defuzzification process.
Figure 7: Applying aggregation method
Defuzzification:
x = 30 cuts small and medium of Input X at membership values 0.5 and 0.5 respectively
y = 49 cuts medium and large of Input Y at membership values 0.6 and 0.7027 respectively
W1 = min(0.5,0.7027) = 0.5
W2 = min(0.5, 0.6) = 0.5
W3 = min(0.5, 0.7027) = 0.5
Then Z = (w1*z1+w2*z2+w3*z3)/(w1+w2+w3)
= [ (0.5*-46)+(0.5*55)+(0.5*507) / (0.5+0.5+0.5) ]
= 172
c) A Tsukamoto fuzzy model rule base is defined as:
R1: If x is SMALL or y is SMALL then z=sigmf(-5:10;-1,5)
R2: If x is SMALL or y is HIGH then z=smf(1:10;2,7)
R3: If x is SMALL or y is MEDIUM then z=sigmf(-5:20;-1,10)
and inputs x and y are defined as below:
x(SMALL) = trimf(0,20,40); x(MEDIUM) = trapmf(25,35,45,55); x(HIGH) = trimf(45,65,85);
y(SMALL) = gaussmf(5,15); y(MEDIUM) = trapmf(25,35,45,55); y(HIGH) =
gaussmf(25,70);
Calculate the output z though pictorial representation for inputs x=30 or y=49.
(The universe of discourse of inputs is 0 to 100).
SOLUTION:
Combination of rules:
Rule1:If X is small or Y is small
Rule2:If X is small or Y is high
Rule3:If X is small or Y is medium
Rule3: Mem(small)(x)=0.5,Mem(med)(y)=0.6
=>Mem(z1)=max(Mem(small(x),Mem(med)(y))
=0.6
Rule2:Mem(small)(x)=0.5,Mem(med)(y)=0.7
=>Mem(z2)=max(Mem(small(x),Mem(high)(y))
=0.7
Mem(z2)=w2=0.7,Mem(z3)=w3=0.6
Z=
𝑧2 𝑤2 + 𝑧3 𝑤3
𝑤2 + 𝑤3
Z=(4.8*0.7+10*0.6)/(0.7+0.6)=7.2
Answer Z=7.2