WEBVTT
00:08.370 --> 00:15.370
Today, we will be discussing fuzzy rule base
and approximate reasoning. This will be lecture
00:30.840 --> 00:37.840
3 in module 2 of Intelligent Control, which
is Fuzzy Logic in module 2. Last class, we
00:40.530 --> 00:47.530
discussed the relation. We learned what a
fuzzy relation is. Today, we will be dealing
00:51.230 --> 00:58.230
with the inference mechanism from a fuzzy
rule base. What is a rule base?
00:59.819 --> 01:06.819
Topics to be covered today are linguistic
variables, fuzzy rule base, fuzzy implication
01:10.990 --> 01:17.990
relations, fuzzy compositional rules, approximate
reasoning for discrete fuzzy sets, approximate
01:22.290 --> 01:29.290
reasoning for continuous fuzzy sets, and summary.
01:30.560 --> 01:37.560
What is fuzzy linguistic variable? Algebraic
variables take numbers as values, while linguistic
01:42.230 --> 01:49.230
variables take words or sentences as values.
You already know that if I have a variable
01:53.100 --> 01:59.480
x, then if it is an algebraic variable, it
may take natural numbers or real numbers depending
01:59.480 --> 02:06.480
on what kind of variable it is. Similarly,
a fuzzy variable x will take values that are
02:10.280 --> 02:17.280
linguistic values. For example, let x be a
linguistic variable with a label ‘temperature’.
02:22.170 --> 02:29.170
The universe of discourse is temperature.
In that universe, I am looking at a fuzzy
02:29.819 --> 02:36.609
variable x when I describe the temperature.
The fuzzy set temperature denoted as T can
02:36.609 --> 02:43.609
be written as T = very cold, cold, normal,
hot or very hot.
02:47.549 --> 02:54.549
From place to place, people may use different
connotations for describing the temperature
02:58.639 --> 03:05.639
but we have taken for example's sake this
particular set to describe temperature in
03:08.900 --> 03:15.900
natural language. Looking at the temperature,
one may say it is very cold or cold, normal,
03:16.400 --> 03:22.709
hot or very hot. Here, temperature is the
base variable, which is also called as the
03:22.709 --> 03:29.709
universe of discourse. Each item in this fuzzy
set is a fuzzy linguistic value for the variable
03:29.930 --> 03:36.930
x. If temperature is a fuzzy variable, then
the linguistic values for this fuzzy variable
03:40.319 --> 03:46.849
are very cold, cold, normal, hot, and very
hot.
03:46.849 --> 03:53.849
We will take some other examples of linguistic
variables. For example, we can talk about
04:06.269 --> 04:13.269
age, which is one linguistic variable; height
is another linguistic variable. Let me say
04:15.459 --> 04:22.459
that this is the linguistic variable. One
is age and another is height. Then, I can
04:28.030 --> 04:35.030
say that the linguistic values for age would
be young, old, and very old. This would be
04:51.590 --> 04:58.590
the linguistic value for age, whereas for
height, we can say short, medium, or tall.
05:09.000 --> 05:16.000
These are the linguistic values for height
and for each category, we can say there is
05:19.930 --> 05:26.930
a defined dynamic range. For age, we can define
of course 0 to 100; very rarely, people live
05:42.270 --> 05:49.270
for more than 100 years. We can say 0 to 100.
If I say young, probably the prime should
05:52.770 --> 05:59.770
be… anybody who is less than 25 years would
be young. I can define old to be around 50
06:08.379 --> 06:15.379
years and very old as those who are around
70 years. Like that, we can define the dynamic
06:16.099 --> 06:23.099
range for age whose linguistic values are
young, old, and very old. This is years.
06:27.860 --> 06:34.860
Similarly, we can easily say 3 to 7 feet for
height – short, medium, and tall. We rarely
06:38.490 --> 06:45.490
see a person who is less than 3 feet and also
persons who are above 7 feet are very rare.
06:48.240 --> 06:55.240
Between 3 and 7 feet, we can define the dynamic
range for the height and the linguistic values
06:59.460 --> 07:06.460
can be ascribed as short, medium, and tall,
and then after dynamic range, we define membership
07:08.830 --> 07:15.830
function. How do we define?
Given an age, we have to find out how much
07:20.610 --> 07:27.610
that membership… – young or…. For example,
if somebody's age is 40, how young is he?
07:30.939 --> 07:37.469
The membership value may be for a 40 year
old, we can say how young he is 0.5 and for
07:37.469 --> 07:44.469
how old he is – maybe, he is in the middle
between young and old. So, we can say 0.5
07:46.419 --> 07:53.419
membership muold. A 40-year-old person may
be ascribed as a membership function under
07:55.129 --> 08:02.129
the category young to be 0.5 and membership
function onto the category old to be 0.5.
08:02.229 --> 08:09.229
Similarly, for height also, we can define
mushort membership function and mutall and
08:11.919 --> 08:18.919
so on. Given a crisp value for age or for
height, as many linguistic values are there,
08:25.289 --> 08:32.289
we get that many membership functions. For
each linguistic value, we get a specific membership
08:35.840 --> 08:38.289
function.
08:38.289 --> 08:44.269
Once we talked about linguistic values, now
we will introduce another term called linguistic
08:44.269 --> 08:51.269
modifier. Consider a fuzzy set young. Now,
if you look at the set young, those who are
08:53.930 --> 09:00.930
20 years old the membership function young
is 0.8, for 30 years old it is 0.6, for 40
09:02.779 --> 09:09.779
it is 0.2, and 60 obviously is no more young,
so 0. If a fuzzy set young is given, which
09:14.959 --> 09:21.959
is a subset of a fuzzy set called age….
I can say this is a subset of age. Age is
09:26.410 --> 09:33.410
the superset or the universal set for defining
young. Now, the linguistic variable very young
09:35.920 --> 09:42.920
where very is the modifier…. Once I define
what young is, in very young, very is the
09:44.540 --> 09:51.540
modifier. So, we can probably define that
their membership function as very young to
09:57.910 --> 10:04.910
be young square, that is…. What does young
square mean? This membership function gets
10:11.389 --> 10:18.389
squared, that is 0.8, becomes 0.64, 0.6 becomes
0.36, 0.2 becomes 0.4, and 0 is 0.
10:20.980 --> 10:27.980
Given a specific set, if I ascribe to the
set and the modifier, probably we can define
10:30.230 --> 10:37.230
some kind of rule by which the very young
can be defined. It is not that always very
10:37.260 --> 10:44.260
young will be young square. This is just one
way to evaluate a linguistic value very young
10:50.269 --> 10:57.269
given young. Similarly, the linguistic variable
very very young can be written by induction
10:58.230 --> 11:03.209
as again young to the power of 4. If I define
very young to be young square, then very very
11:03.209 --> 11:10.209
young has to be young to the power 4. Obviously,
in that case 20 is 0.4096, which is 0.64,
11:14.510 --> 11:21.510
the membership function square. You define
a 0.64 square is 0.4096, 0.36 is 0.1296, 0.04
11:24.990 --> 11:31.990
is 0.0016 and similarly 0 is 0. This is the
notion of linguistic modifier.
11:37.440 --> 11:44.440
Another example. Similarly if a is a fuzzy
set, I can define extremely a to be a cube,
11:47.480 --> 11:54.480
very a is a square, more or less is a to the
power half and slightly a is a to the power
11:59.680 --> 12:06.680
1 upon 3, so cube root. So, cube root of a,
square root of a, a square, and a cube, depending
12:09.160 --> 12:16.160
on whether the modifier is extremely or very
or more or less or slightly. This is where
12:17.810 --> 12:24.810
we can deal with linguistic modifiers.
We gave some idea about the linguistic values
12:27.690 --> 12:34.690
and linguistic variables. These are necessary
because in the traditional sense, when we
12:36.769 --> 12:43.769
express worldly knowledge, we express them
in natural language. So here it is. From computational
12:46.360 --> 12:53.360
perspective, such worldly knowledge can be
expressed in terms of rule base systems.
12:56.420 --> 13:02.240
Worldly knowledge is very conveniently expressed
in natural language. When we describe the
13:02.240 --> 13:07.779
worldly knowledge, natural language is the
best way to describe them. The rule base is
13:07.779 --> 13:13.579
one of the ways to represent knowledge using
natural language for computational purpose
13:13.579 --> 13:20.579
of course. A generic form of a rule base is
as follows. What we said is that the worldly
13:24.470 --> 13:31.470
knowledge can be represented in terms of rule
base and a rule base is described as if premise
13:33.970 --> 13:40.970
or antecedent, then conclusion is consequent.
13:44.910 --> 13:51.910
The above form is commonly referred to as
the IF-THEN rule-based form. It typically
13:56.350 --> 14:03.259
expresses an inference such that if we know
a fact, we can infer or derive another fact.
14:03.259 --> 14:10.259
Given a rule, I can derive another rule or
given a rule, if I know a rule and the associated
14:14.730 --> 14:21.730
relation, then given another rule, I can predict
what should be the consequence.
14:24.850 --> 14:31.850
This is a fuzzy rule base. Any worldly knowledge
can be expressed in form in the form of a
14:32.259 --> 14:39.139
rule base. Now, when I talk about fuzzy rule
base, fuzzy information can be represented
14:39.139 --> 14:46.139
in the form of a rule base, which consists
of a set of rules in conventional antecedent
14:46.220 --> 14:53.220
and consequent form such as if x is A, then
y is B, where A and B represent fuzzy propositions
14:54.310 --> 15:01.310
(sets). Suppose we introduce a new antecedent
say A dash and we consider the following rule
15:04.550 --> 15:11.550
if x is A dash, then y is B dash, from the
information derived from rule 1, is it possible
15:12.329 --> 15:18.230
to derive the consequent in rule 2, which
is B dash?
15:18.230 --> 15:23.910
This is the question that we are trying to
answer in a fuzzy rule base. A fuzzy rule
15:23.910 --> 15:30.910
base consists of a set of rules. From these
rules, if I know rule 1, if I know what A
15:35.420 --> 15:42.420
is, what B is, if I have derived them, and
if I have the knowledge of A dash, can I compute
15:44.440 --> 15:49.920
what is B dash? This is a very simple way.
Now, I am presenting the problem to all of
15:49.920 --> 15:56.920
you, that is, we know rule 1. We know what
is the set A and set B. In rule 2, we know
16:01.769 --> 16:08.769
only A dash but not B dash. Can we infer B
dash? This is the question. The answer is
16:10.879 --> 16:17.879
yes. The consequent B dash in rule 2 can be
found from composition operation B dash equal
16:19.850 --> 16:26.850
to A dash… this is called the compositional
rule of inference, the compositional operator
16:28.389 --> 16:35.389
with R.
16:56.690 --> 17:03.690
We talked about fuzzy rule base. It consists
of a set of rules. Now, how do we infer knowledge
17:07.709 --> 17:14.709
from this rule base? There are certain steps.
First, we will understand what fuzzy implication
17:19.169 --> 17:26.169
relations are. A fuzzy implication relation
for a given rule if x is Ai, then y is Bi
17:27.850 --> 17:34.850
is formally denoted by Ri. x, y is the relation
matrix whose elements are given by mu Ri x,
17:40.390 --> 17:47.390
y and this mu Ri x, y is constructed or is
computed by various implication rules. There
17:51.549 --> 17:58.549
are various kinds of implication rules. Now,
we will understand them.
18:03.460 --> 18:09.280
What is the implication rule? If p then q.
This is called implication rule, where both
18:09.280 --> 18:16.280
p and q are fuzzy propositions. If x is Ai,
then y is Bi, but p also can be multiple propositions.
18:25.570 --> 18:32.570
If x1 is A1, x2 is A2 and so on, then what
is y? Let us take this simple relation, fuzzy
18:49.200 --> 18:56.200
rule. If x is Ai, then y is Bi. I will say
this is p and I will say this is q. If p,
19:02.260 --> 19:02.799
then q.
19:02.799 --> 19:09.799
Now, we will talk about Dienes–Rescher Implication.
In this, if p then q states that p is true
19:19.789 --> 19:26.789
but q is false is impossible, that is, in
this proposition, in this rule, if I say if
19:28.980 --> 19:35.980
p is true, then to say that q is false is
impossible. That means if p is true, then
19:40.120 --> 19:46.960
q is false is a false statement, it is not
possible. This is one argument. What does
19:46.960 --> 19:53.960
it mean? That means p which is true and not
q (q is false, so not q is true) is false.
20:00.720 --> 20:07.720
Using De Morgan's Law, we can show that p
and not q is the same as not p or q. Thus,
20:13.610 --> 20:20.610
the relational matrix can be computed for
this particular relation not is mu Ri x, y
20:26.830 --> 20:33.830
is maximum. This is maximum because or means
maximum and not p means 1 minus muAi x, p
20:40.950 --> 20:47.950
is if x equal to Ai. Obviously, the membership
function given a crisp value is muAi x, where
20:55.150 --> 21:02.150
x is the specific crisp value. muAi x is the
fuzzy membership function of p. not p is 1
21:12.230 --> 21:19.230
minus muAi x and similarly for q, the membership
function is muBi y. The maximum value comes
21:26.480 --> 21:33.480
because of the or operation – this or this.
Obviously, the relation from A to B is defined
21:40.220 --> 21:45.850
by this expression.
21:45.850 --> 21:52.850
We will go to another type of implication
relation, which is very popular in control
21:53.640 --> 22:00.640
engineering as well as fuzzy systems. It is
called Mamdani implication. In this, when
22:01.270 --> 22:08.270
fuzzy IF-THEN rules are locally true, then
using Mamdani implication, p implies q implies
22:13.140 --> 22:20.140
p and q is true. This is the AND operation;
p and q are both simultaneously true. That
22:21.730 --> 22:28.730
is because we say that each rule is locally
true. If p is true, then q is true. We do
22:31.080 --> 22:38.080
not ascribe any other means by which q can
be true. Thus, the relational matrix can be
22:38.970 --> 22:43.020
computed using any of the following expressions.
22:43.020 --> 22:50.020
We have already explained the first one in
the relation class that this is min operation
22:50.460 --> 22:57.460
or product operation. This is a min or product.
What you are seeing is that I find out the
23:04.549 --> 23:11.549
element of the relation matrix associated
with the rule p implies q is that the minimum
23:16.820 --> 23:23.820
of muAi x and muBi y using Mamdani implication….
If x is A1, then y is B1 or here, we have
23:47.669 --> 23:54.669
written Ai and Bi. If x is Ai, then y is Bi.
The relation matrix associated with this A
24:01.740 --> 24:08.740
which is R, the relation matrix we can put
like this where… This is my x, this is my
24:20.029 --> 24:27.029
y, so any typical element associated with
xi is minimum of mu x in fuzzy set Ai and
24:33.960 --> 24:40.960
mu y in fuzzy set Bi. Each element in R is
computed as using computed using either this
24:43.059 --> 24:49.580
formula or this formula. The Mamdani implication
rule is widely used in fuzzy system and fuzzy
24:49.580 --> 24:56.580
control engineering. In this, if the temperature
is hot, then fan should run fast. This rule
24:58.649 --> 25:04.360
does not imply if temperature is cold, then
fan should run slow; this means each rule
25:04.360 --> 25:09.830
is independent, they are locally true, we
cannot infer.
25:09.830 --> 25:16.830
A fuzzy implication relation is another category,
which will call Zadeh implication. This is
25:17.760 --> 25:24.760
if p implies q may imply either p and q are
true or p is false. What we are saying is
25:29.830 --> 25:36.830
that just like a local Mamdani rule, we say
p and q are true imply either p and q are
25:44.220 --> 25:51.220
true or p is false. Thus, p implies q means….
p and q are simultaneously true, which is
26:00.580 --> 26:07.580
Mamdani local rule or if p is false, then
p implies q has no meaning or p is false.
26:15.840 --> 26:22.840
This has taken an extra logic that is p and
q or not p.
26:26.830 --> 26:33.830
Thus, the relational matrix can be computed
as follows. If I look at this, what is p and
26:34.450 --> 26:41.450
q? p and q means minimum of muA x and muB
y. What is not p? 1 minus muAi x. This entire
26:49.700 --> 26:56.700
thing has to be maximum of minimum of these
and this, which is this statement. mu, the
26:57.860 --> 27:04.860
relational matrix elements are computed using
this particular expression. Given a set of
27:07.399 --> 27:14.399
rules, we just learnt various schemes by which
we can construct a relational matrix between
27:15.260 --> 27:20.820
the antecedent and the consequent. The next
step would be to utilize this relational matrix
27:20.820 --> 27:27.399
for inference. This method is commonly known
as compositional rule of inference, that is,
27:27.399 --> 27:34.399
associated with each rule we have a relational
matrix. So, given a rule means given a relational
27:37.830 --> 27:44.830
matrix and given another antecedent, how can
I compute a consequent? This is the prime
27:45.110 --> 27:50.330
question that we are asking.
27:50.330 --> 27:57.330
This is derived using fuzzy compositional
rules. The following are the different rules
27:58.380 --> 28:05.380
for fuzzy composition operation, that is,
B equal to A composition R. R is the relational
28:10.559 --> 28:17.559
matrix associated with a specific rule, A
is a new antecedent that is known, R is known,
28:25.149 --> 28:32.149
B is the new consequent for the new antecedent
A. I have to find out what is B for this new
28:34.649 --> 28:41.649
A, given R. That is computed by A composition
R and we have already discussed in the relation
28:46.640 --> 28:51.860
class that there are various methods and max-min
is very popular.
28:51.860 --> 28:58.860
First, we compute min and then max. Similarly,
max-product: instead of min, we take the product
29:07.090 --> 29:14.090
and compute what is the maximum value. Similarly,
min-max: instead of max-min, it is min-max.
29:16.950 --> 29:23.950
First, max and then min. Next, max-max and
min-min. One can employ these looking at the
29:26.740 --> 29:29.179
behavior of a specific data.
29:29.179 --> 29:36.179
Now, we will take an example. We are given
a rule if x is A, then y is B, where A is
29:38.659 --> 29:45.659
this fuzzy set: 0.2 for 1, 0.5 for 2, and
0.7 for 3. This is a discrete fuzzy set. B
29:47.799 --> 29:54.799
is another fuzzy set that defines fuzzy membership
0.6 for 5, 0.8 for 7, and 0.4 for 9. The question
29:58.210 --> 30:05.210
is infer B dash for another rule if x is A
dash, then y is B dash, where A dash is known.
30:08.700 --> 30:15.700
A is known, B is known, and A dash is known.
What we have to find out is what B dash is.
30:18.200 --> 30:25.200
Infer B dash is the question that is being
asked. Hope you understand.
30:25.820 --> 30:31.519
Using Mamdani implication relation, first
we will find out between A… the first rule,
30:31.519 --> 30:38.519
that is, if x = A, then y is B. The relational
matrix associated with this rule is…. For
30:44.440 --> 30:51.440
R, how do we compute? A elements are 1, 2,
and 3 and B elements are 5, 7, and 9. We have
30:53.960 --> 31:00.960
to find out now for 0.2. Here, we compare
with all the elements in point B and with
31:04.890 --> 31:11.890
each element, we found what the minimum is.
The minimum is always 0.2. Hence, the maximum
31:12.309 --> 31:19.309
of that is always 0.2. I have to find out
the relational matrix between A and B. The
31:23.630 --> 31:30.630
Mamdani principle means minimum, so between
1 and 5, 1 is associated with 0.2, and 5 is
31:31.630 --> 31:38.630
associated with 0.6, so the minimum is 0.2.
Similarly, 1 is associated with 0.2, 7 is
31:39.100 --> 31:46.100
associated with 0.8, so for 1 and 7, the minimum
is 0.2. Similarly, 1 is associated with 0.2,
31:47.210 --> 31:54.210
9 is associated with 0.4, so from 1 to 9,
the minimum membership is 0.2. Similarly,
31:54.710 --> 32:01.710
you can see that from 2 to all the elements
5, 7, 9, the minimum are 0.5, 0.5, and 0.4.
32:04.950 --> 32:11.950
Similarly, from 3 to 5, 7, and 9, we have
0.6, 0.7, and 0.4. These are the minimum fuzzy
32:17.100 --> 32:24.100
memberships between an element in A to element
in B. That is how we compute the relational
32:25.440 --> 32:26.889
matrix.
32:26.889 --> 32:33.889
Once we compute the relational matrix, then
we use max-min composition relation to find
32:34.580 --> 32:41.580
out what is B dash, which is A dash (which
is 0.5, 0.9, and 0.3) composition R and you
32:45.080 --> 32:52.080
can compute. This is my R. I have to find
out my matrix. This is 0.5, 0.9, and 0.3.
33:06.899 --> 33:13.899
So this composition R is… you can easily
see I take this row vector, put along the
33:16.889 --> 33:23.889
column matrix and I see what is the minimum
for each case. You can easily see 0.2 will
33:23.990 --> 33:29.519
be minimum here, 0.5 will be minimum here,
0.3 and maximum is 0.5.
33:29.519 --> 33:36.519
The first element is 0.5. Again, I take this
place in parallel with this column and then,
33:36.700 --> 33:43.549
I find first minimum here is 0.2, here 0.5,
here 0.3 and then maximum is again 0.5. Again,
33:43.549 --> 33:50.549
I take the same row vector, put along this
column vector and then, I find here the minimum
33:54.929 --> 34:01.929
is 0.2, here minimum is 0.4, here minimum
is 0.3 and the maximum is 0.4. This is the
34:03.840 --> 34:10.840
relation, this is the answer. This is our
B dash. Given A, this is my B dash using fuzzy
34:14.659 --> 34:17.790
compositional principle or relation.
34:17.790 --> 34:24.790
There are other mechanisms also that we discussed.
For the same example, if you use max-min,
34:30.250 --> 34:37.250
you get B dash; for max-product, you get another
B dash; for min-max, you get another. Min-max
34:38.980 --> 34:45.980
and max are same for this example. Then, for
max-max, you see that all the fuzzy membership
34:47.170 --> 34:54.170
are the maximum values and for min-min, they
are the minimum values here. Now, the question
34:55.930 --> 35:02.930
is what is the approximate reasoning? Approximate
reasoning means given any logical system,
35:03.150 --> 35:09.360
we do not have, it is very difficult to make
an exact result. That is why from engineering
35:09.360 --> 35:16.360
perspective, we are more liberal. We do not
want to be so precise. As long as our system
35:17.860 --> 35:24.380
works, we are happy; if our control system
works, we are happy.
35:24.380 --> 35:30.450
Approximate reasoning. We have set up rules
so we use a specific compositional rule of
35:30.450 --> 35:37.450
inference and then we infer the knowledge
or the consequence. Given a rule R (R is the
35:40.270 --> 35:46.380
relational matrix associated with a specific
rule) and given a condition A, the inferencing
35:46.380 --> 35:53.380
B is done using compositional rule of inference
B equal to A composition R. The fuzzy sets
35:56.360 --> 36:02.960
associated with each rule base may be discrete
or continuous, that is, A may be discrete
36:02.960 --> 36:08.160
or A and B may be discrete or continuous.
36:08.160 --> 36:15.160
A rule base may contain a single rule or multiple
rules. If it is continuous, I cannot define
36:17.590 --> 36:23.570
what the R relational matrix is. It is very
difficult because it will have infinite values.
36:23.570 --> 36:30.570
R is not defined. That is why for continuous,
we apply compositional rule of inference but
36:33.180 --> 36:40.180
the method to compute is different. A rule
base may contain single rule or multiple rules.
36:40.870 --> 36:47.870
Various inference mechanisms for a single
rule are enumerated. Various mechanism means
36:48.860 --> 36:55.860
we talked about min-max, max-min, max-max,
min-min and so on. The inference mechanism
36:57.670 --> 37:03.950
for multiple rules….
37:03.950 --> 37:10.950
Single rule. Now, we will take the examples
one by one. Single rule with discrete fuzzy
37:12.260 --> 37:18.210
set. We talked about a fuzzy set that may
consist of a single rule or multiple rules.
37:18.210 --> 37:25.210
It can be discrete fuzzy set or a continuous
fuzzy set. We will try to understand how to
37:25.960 --> 37:32.960
make approximate reasoning for such a rule
base using the methods that we just enumerated.
37:36.210 --> 37:43.210
For each rule, we compute what is the relational
matrix if it is discrete fuzzy set and then
37:43.250 --> 37:50.250
we use compositional rule of inference to
compute the consequence given an antecedent.
37:51.340 --> 37:58.340
That is for discrete fuzzy set. We have already
talked about this but again, for your understanding,
37:58.790 --> 38:04.270
I am presenting another example for single
rule with discrete fuzzy set.
38:04.270 --> 38:10.710
Rule 1: If temperature is hot, then the fan
should run fast. If temperature is moderately
38:10.710 --> 38:17.710
hot, then the fan should run moderately fast.
In this example, we are given the temperature
38:20.130 --> 38:27.130
is in degree Fahrenheit and the speed is expressed
as 1000 rpm. The fuzzy set for hot H is for
38:34.640 --> 38:41.640
70 degree Fahrenheit, 80 degree Fahrenheit,
90 degree Fahrenheit, and 100 degree Fahrenheit,
38:42.330 --> 38:49.330
the membership values are 0.4, 0.6, 0.8, and
0.9. Similarly, for the fuzzy set F, for which
38:54.590 --> 39:01.180
the fan should run fast, the fuzzy set is
for 1000 rpm, the membership is 0.3, for 2000
39:01.180 --> 39:07.120
rpm, the membership is 0.5, for 3000 rpm,
the membership 0.7, and for 4000 rpm, the
39:07.120 --> 39:10.950
membership is 0.9.
39:10.950 --> 39:17.950
Given H dash, which is moderately hot, to
be for 70… moderately hot means it is a
39:18.270 --> 39:25.270
little more hot. So, same temperature obviously
and their corresponding membership values
39:25.450 --> 39:32.450
will reduce, because if I am describing moderately
hot, they will have the same temperature but
39:32.620 --> 39:37.000
the membership values will be less. You can
easily see here that for 70, instead of 0.4,
39:37.000 --> 39:42.100
now it is 0.2; for 80, instead of 0.6, it
is 0.4; for 90, instead of 0.8, it is 0.6;
39:42.100 --> 39:49.100
for 100, instead of 0.9, it is 0.8. This is
moderately hot. Now, the question is find
39:50.090 --> 39:51.770
F dash.
39:51.770 --> 39:58.770
I hope you are clear with this question. The
question is very simple. We are given rule
39:59.560 --> 40:06.560
1, we have defined what is the fuzzy set hot
and fuzzy set fast by these two statements
40:08.270 --> 40:15.270
and in the second rule for moderately hot,
we know the fuzzy set. We do not know what
40:16.250 --> 40:21.360
the fuzzy set is corresponding to moderately
hot, that is, moderately fast. We do not know
40:21.360 --> 40:28.360
moderately fast. Find out F dash. If H, then
F. If H dash, then F dash. Find out F dash.
40:35.720 --> 40:41.010
First, what do we do?
40:41.010 --> 40:48.010
Corresponding to rule 1, we found out what
is R. This is for rule 1. We knew that the
40:53.680 --> 41:00.680
membership functions for H were 0.4, 0.6,
0.8, and 0.9, and for fast, the membership
41:17.740 --> 41:24.740
functions where 0.3, 0.5, 0.7, and 0.9. If
you look at this, these are my H values, the
41:34.090 --> 41:38.270
crisp values: 70 degree Fahrenheit, 80 degree
Fahrenheit, 90 degree Fahrenheit, and 100
41:38.270 --> 41:45.270
degree Fahrenheit. This is my speed: 1000
rpm, 2000 rpm, 3000 rpm, and 4000 rpm. Between
41:47.690 --> 41:54.690
70 and 1000 rpm, the entry would be minimum
of these two, which is 0.3. Similarly, between
42:00.470 --> 42:07.470
0.4 and 0.5, the minimum would be again 0.4
and then between 0.4 and 0.7, it will be 0.4,
42:12.250 --> 42:15.490
and for 0.4 and 0.9, it is 0.4.
42:15.490 --> 42:21.300
Similarly, we go to the next one, which is
0.6. For 0.6, 0.3 minimum 0.3, for 0.6 and
42:21.300 --> 42:28.300
0.5, the minimum is 0.5, for 0.6 and 0.7,
minimum is 0.6, for 0.6 and 0.9, it is 0.6.
42:30.830 --> 42:37.830
Similarly, you can fill all other cells here
with their values: 0.3, 0.5, 0.7, 0.8, 0.3,
42:43.840 --> 42:50.840
0.5, 0.7, and 0.9. This is my relation matrix
associated with rule 1: if H, then F. Now,
42:53.350 --> 43:00.350
what I have to do is I have to find out F
dash given H dash, using the fuzzy compositional
43:01.240 --> 43:04.570
rule of inference, which is represented like
this.
43:04.570 --> 43:11.570
F dash is H dash compositional rule of inference
with R. This is max-min composition operation.
43:17.660 --> 43:24.660
First, we take
the min and then compute. H dash is given
as 0.2, 0.4, 0.6, and 0.8. This is my H dash
43:48.120 --> 43:55.120
(moderately hot) and I have to do compositional
inference between H dash and R. Again, I am
43:57.120 --> 44:02.950
repeating so that you understand how to compute
it. You put this row vector along this column
44:02.950 --> 44:09.210
vector first. For each element, you find out
what is the minimum. You see that here it
44:09.210 --> 44:16.210
is 0.2, 0.3, 0.3, and 0.3 and the maximum
of that is 0.3.
44:16.490 --> 44:23.190
Similarly, you take again these values and
put them here vertically. Here, the minimum
44:23.190 --> 44:30.190
is 0.2, here 0.4, here 0.5, here 0.5, and
maximum is 0.5. I am sure you will see here
44:32.340 --> 44:39.340
it is 0.7, but in this case, you find that
if you take this here, it is 0.2, here 0.4,
44:41.770 --> 44:48.770
here 0.6, here 0.8, and maximum is 0.8. F
dash is 0.3, 0.5, 0.7, and 0.8. That is how
44:54.650 --> 45:01.650
we infer or we do approximate reasoning for
a rule base. This is a very simple case.
45:02.490 --> 45:09.490
We will go to a more difficult one, which
is multiple rule with discrete fuzzy sets.
45:10.040 --> 45:17.040
There are two rules now. Rule 1 is if height
is tall, then speed is high. Rule 2: if height
45:19.360 --> 45:26.360
is medium, then speed is moderate. This is
describing a rule for a person as to how fast
45:28.630 --> 45:35.630
he can walk. Normally, those who are tall
can walk very fast and those who are short,
45:36.940 --> 45:43.940
naturally their speed will be less. This is
one fuzzy rule that expresses the speed of
45:44.040 --> 45:49.340
a person while walking. If height is tall,
then speed is high and if height is medium,
45:49.340 --> 45:56.340
then speed is moderate. For this, the fuzzy
memberships are defined as tall, high, medium,
45:56.790 --> 45:57.940
and moderate.
45:57.940 --> 46:04.940
Tall is 0.5, 0.8, and 1 for various feet like
5, 6, and 7. For speed is high, for 5 meter
46:08.770 --> 46:15.490
per second, 7 meter per second, and 9 meter
per second, the corresponding membership values
46:15.490 --> 46:22.490
are 0.4, 0.7, and 0.9. For H2, which is medium
height, the corresponding fuzzy membership…
46:26.760 --> 46:33.760
you can easily see that when I say medium
in this fuzzy set, 5 has 0.6, 6 has 0.7, and
46:38.090 --> 46:45.090
7 has 0.6. The moderate speed is 0.6 for 5
meter per second, 0.8 for 7 meter per second,
46:55.500 --> 47:02.500
and 0.7 for 9 meter per second. If this is
the fuzzy set given, now the question is given
47:05.450 --> 47:12.450
H dash, which is above average, and the corresponding
fuzzy set is 0.5, 0.9, 0.8 for three different
47:15.560 --> 47:22.560
heights, find S dash, the speed above normal.
I hope the question is very clear to you.
47:26.100 --> 47:32.920
We have two rules. If height is tall, then
speed is high; tall is defined and high is
47:32.920 --> 47:36.180
defined. If height is medium, then speed is
moderate. I have already defined the fuzzy
47:36.180 --> 47:43.180
sets for both medium as well as moderate.
They are all discrete fuzzy sets. Now, you
47:43.190 --> 47:50.190
are presented with new data and what is that
new data? You are presented with a data called
47:50.230 --> 47:57.130
above average, which is 0.5, 0.9, and 0.8
for three different heights for 5, 6, and
47:57.130 --> 48:04.130
7. Then, find S dash equal to above normal,
that is, if height is above average, then
48:06.350 --> 48:11.690
the speed should be above normal. How do we
do it?
48:11.690 --> 48:18.690
This is the solution of this example. We have
two rules. Naturally, we will have two relational
48:19.110 --> 48:25.370
matrices: R1 for rule 1 and R2 for rule 2.
I will not go in detail of how we compute.
48:25.370 --> 48:32.370
You simply you go the antecedent and consequent,
look at the membership function, find the
48:34.810 --> 48:41.810
minimum for each entry. Here, these are the
heights and these are the speeds; 5, 6, 7
48:42.500 --> 48:49.500
feet is the height and 5, 7, and 9 meter per
second are the speeds of the individuals.
48:50.440 --> 48:57.440
Now, you check the fuzzy sets and corresponding
to each fuzzy set, find out what is the minimum
49:00.030 --> 49:07.030
membership function. For 5, 5, you will find
the membership function is 0.4, minimum 0.5,
49:08.050 --> 49:15.050
0.5, 0.4, 0.8, 0.8, 0.4, 0.8, 0.9. You can
verify this. Similarly, R2 can be found out.
49:21.740 --> 49:28.740
Taking the minimum membership entry between
these two fuzzy sets, that is, if I say this
49:33.740 --> 49:40.740
is H1 and S1 and this is H2 and S2. Look at
these two fuzzy sets, find out what the minimum
49:58.840 --> 50:05.840
entries are for each relation and then, how
do we compute S dash above normal? We have
50:09.060 --> 50:16.060
now two relational matrices. It is very simple.
We do two composition operations: H dash composition
50:18.470 --> 50:25.470
with R1 (this one) and again, H dash composition
R2 and then, we take the maximum of that,
50:28.110 --> 50:29.510
maximum of these two.
50:29.510 --> 50:36.510
You can easily see that the maximum of H dash
composition R1, H dash composition R2. You
50:37.160 --> 50:40.830
can easily see that because H dash is common,
this particular expression is the same as
50:40.830 --> 50:47.830
H dash composition max of R1 and R2. This
is R1 and R2. We look at all those entries
50:50.410 --> 50:56.220
wherever it is the maximum: for 0.4 and 0.6,
the maximum is 0.6; for 0.5 and 0.6, the maximum
50:56.220 --> 51:01.820
is 0.6; for 0.5 and 0.6, the maximum is 0.6.
You see the last element here 0.9 here and
51:01.820 --> 51:08.820
0.6, so this is 0.9. Like that, for all entries
of R1 and R2, whatever the maximum values,
51:08.960 --> 51:14.910
you put these values here (that is called
maximum R1 and R2) and take a composition
51:14.910 --> 51:21.670
with H dash. So H dash composition max of
R1 and R2. H dash is already given as 0.5,
51:21.670 --> 51:28.670
0.9, and 0.8. If you do this composition,
you get 0.6, 0.8, and 0.8. I hope this clears
51:30.640 --> 51:37.640
your concept of how we compute or we do approximate
reasoning in a rule base. Similarly, if there
51:40.760 --> 51:47.760
are multiple rules, we have no problem and
we can go ahead with the same principle.
51:48.890 --> 51:54.040
The last section that we will be covering
today is the multiple rules with continuous
51:54.040 --> 52:01.040
fuzzy sets. We talked about discrete fuzzy
set, but if it is continuous fuzzy sets, how
52:02.140 --> 52:09.140
do we deal with that? Normally, a continuous
fuzzy system with two non-interactive inputs
52:09.400 --> 52:16.400
x1 and x2, which are antecedents, and a single
output y, the consequent, is described by
52:16.550 --> 52:23.550
a collection of r linguistic IF-THEN rules
Where the rule looks like this: If x1 is A1
52:23.660 --> 52:30.660
k and x2 is A2 k, then y k is B k, where k
is 1, 2 up to r. This is the k th rule. Similarly,
52:36.470 --> 52:43.250
we can have rule 1, rule 2, rule 3, up to
rule r.
52:43.250 --> 52:49.220
In this particular rule, A1 k and A2 k are
the fuzzy sets representing the k th antecedent
52:49.220 --> 52:56.220
pairs and B k are the fuzzy sets representing
the k th consequent. In the following presentation,
52:57.490 --> 53:04.490
what we will do now is we will take a two-input
system and two-rule system just to illustrate
53:11.290 --> 53:18.290
how we infer from a rule base where the fuzzy
sets are continuous. The inputs to the system
53:23.980 --> 53:29.320
are crisp values and we use a max-min inference
method.
53:29.320 --> 53:36.320
Kindly pay attention, because this is a very
important concept that we will be presenting.
53:39.930 --> 53:46.500
We have two rules here. You can easily see
that we have represented graphically. You
53:46.500 --> 53:53.500
can see there are two variables x1 and x2.
There are two fuzzy variables and for each
53:56.160 --> 54:03.160
rule, we have a consequent y. The first rule
says that if x1 is A1 1 and x2 is A2 1, then
54:06.490 --> 54:13.490
y is B1. Similarly, if x1 is A1 2, x2 is A2
2, then y is B2. Now, how do we infer? Given
54:21.200 --> 54:28.200
a crisp input, a new input is given, crisp
input in the domain of x1 and another crisp
54:30.190 --> 54:37.190
input in the domain of x2. There can be a
system whose two variables can be temperature
54:39.190 --> 54:46.190
as well as pressure. You can easily think
x1 to be the temperature and x2 to be the
54:50.840 --> 54:55.460
pressure. For example, for a particular given
system, you found out the temperature to be
54:55.460 --> 55:02.460
50 degrees centigrade and pressure to be some
value. Given these two quantities, crisp quantities,
55:05.290 --> 55:12.250
how do we infer what should be my y?
55:12.250 --> 55:18.120
To do that, I will just explain how to do
this. The crisp input is given – temperature.
55:18.120 --> 55:25.120
Now, you find out corresponding membership
values here. Corresponding to this crisp input,
55:27.340 --> 55:34.340
we get the membership value in rule 1 as muA1
1 and for the same crisp input, this rule
55:42.090 --> 55:49.090
2 will provide you muA1 2. Now, in the second
fuzzy variable, given crisp input, rule 1
55:59.420 --> 56:06.420
will compute… you see that this one will
compute muA2 1 and for the second one, the
56:09.940 --> 56:16.940
second rule, the same crisp input would give
this one, which is muA2 2. Once we find out
56:21.980 --> 56:28.280
these membership values, what do we do? We
graphically see which is minimum between muA1
56:28.280 --> 56:35.280
1 and muA2 1. The minimum is muA2 1. We take
that and we shade these areas in consequence.
56:40.290 --> 56:47.290
Now, we take the second rule. We find between
muA1 2 and muA2 2, the minimum is muA1 2.
56:53.320 --> 57:00.320
We take that minimum and shade the area and
consequent part of this rule 2. Now graphically,
57:01.430 --> 57:08.430
we add these two taking the maximum. First,
min and then max. You can easily see that
57:11.150 --> 57:18.150
when I overlap this figure over this figure,
I get this particular figure. You overlap
57:19.810 --> 57:26.810
this second figure on the first figure or
first figure on the second figure and take
57:27.760 --> 57:34.760
the resultant shaded area. After taking this
resultant shaded area…. Once you find this
57:36.340 --> 57:43.340
shaded area, the next part is to see what
is y given a crisp value. There are many methods,
57:45.560 --> 57:51.330
but we will focus in this class or in this
course on only one method, that is, center
57:51.330 --> 57:52.550
of gravity method.
57:52.550 --> 57:58.480
Obviously, if I take this figure and find
out what is the center of gravity, it is this
57:58.480 --> 58:05.480
value y star. The crisp output can be obtained
using various methods. One of the most common
58:05.610 --> 58:11.540
method is the center of gravity method. The
resulting crisp output is denoted as y star
58:11.540 --> 58:18.540
in the figure. This is y star. What we learnt
in this is given a crisp input 1 and crisp
58:20.570 --> 58:27.570
input 2 and given two fuzzy rules, how do
we infer correspondingly a crisp output? Our
58:33.010 --> 58:40.010
data is crisp, but we are doing fuzzy computation.
Hence, rules are fuzzy. We take this data
58:42.620 --> 58:49.620
to the fuzzy rule base and then fuzzify them
through fuzzification process. Graphically,
58:53.820 --> 59:00.820
we find what is the net shaded area using
the max principle. We found out the shaded
59:01.470 --> 59:08.470
area for each rule in consequent taking the
min principle. Taking the max principle, we
59:09.890 --> 59:16.890
found out the resultant area and then, y star
is the center of gravity of these areas.
59:19.380 --> 59:26.380
Finally, the summary. In this lecture, we
covered the following topics: linguistic variables
59:31.270 --> 59:38.270
and fuzzy rule-based systems, various fuzzy
implication relations, approximate reasoning
59:39.070 --> 59:44.130
for discrete fuzzy sets and then finally,
approximate reasoning for continuous fuzzy
59:44.130 --> 59:51.130
sets. Thank you very much.
378