WEBVTT
00:19.960 --> 00:26.960
We are on the last module of this course,
intelligent control module four. The broad
00:31.969 --> 00:38.969
topics is fuzzy control, in the first class
we described this. Then, we took a loop on
00:39.680 --> 00:46.680
the various fuzzy controls schemes that are
prevailing in the literature. Today, we will
00:51.300 --> 00:58.300
now be discussing all those schemes in depth.
Today, we will be discussing on Mamdani type
00:59.629 --> 01:05.179
fuzzy logic controller and parameter optimization.
01:05.179 --> 01:09.750
Basic architecture of a Mamdani type fuzzy
logic controller, we have already discussed
01:09.750 --> 01:16.750
in the previous, in the second model on fuzzy
logic about this we will revisit that. The
01:17.640 --> 01:24.640
issue always with Mamdani type is that, how
do you optimize the parameters? Very briefly
01:27.270 --> 01:34.270
we will discuss genetic algorithm, fuzzy logic
controller for a single link manipulator.
01:35.909 --> 01:42.310
Now, univariate Marginal Distribution Algorithm,
this is another genetic algorithm (01:41)
01:42.310 --> 01:49.310
evolutionary computation approach for optimization.
We will compare both this genetic algorithms,
01:49.390 --> 01:55.930
simple genetic algorithm and univariate marginal
distribution algorithm in a generic example
01:55.930 --> 02:01.509
of a robot arm control. So how does fuzzy
logic controller work?
02:01.509 --> 02:07.579
Define the control objectives and criteria.
Given a system; we have to say what the control
02:07.579 --> 02:12.780
objectives are, what parameters of the system
to be controlled, what kind of response is
02:12.780 --> 02:19.220
needed, what the possible system failure modes
are. Now, for this system, determine the input
02:19.220 --> 02:26.220
and output relationship and choose a minimum
number of variables for input to the fuzzy
02:26.250 --> 02:33.250
logic controller engine, typically error in
rate of change of error for fuzzy PID controller.
02:33.250 --> 02:39.440
I hope that you remember in our last class,
in fuzzy logic not in the last class, in previous
02:39.440 --> 02:46.440
one of our previous classes. We have discussed
that, how the PI or PID type of controller
02:47.209 --> 02:54.209
can be represented in terms of error and change
in error or their function of error or change
02:57.910 --> 03:01.940
in error. Using the rule based structure of
fuzzy logic controller, break the control
03:01.940 --> 03:08.940
problem down into a series of IF X AND Y THEN
Z rules that define a desired controller output
03:11.109 --> 03:18.109
response for a given system input conditions.
Create fuzzy logic controller membership functions
03:20.040 --> 03:27.040
that define the meaning values, linguistic
values of input output terms used in the rules
03:28.470 --> 03:32.959
because; a fuzzy logic controller resists
the crisp input.
03:32.959 --> 03:39.959
But, the computation is through linguistic
variables and after that the output is again
03:40.079 --> 03:47.079
crisp because, the system which is out there
is processing crisp input and crisp output.
03:50.479 --> 03:54.790
The next is the test of the system, evaluate
the results, tune the rules and membership
03:54.790 --> 03:59.680
function and continuously simulate until satisfactory
results are obtained.
03:59.680 --> 04:05.340
So, complete architecture of a fuzzy logic
controller. This is our plant of process.
04:05.340 --> 04:12.340
You have sensors and then you get the plant
feedback through sensors which are converted
04:12.359 --> 04:19.359
to fuzzy linguistic variables which, is known
as fuzzification. That goes to the rule base
04:20.959 --> 04:27.959
and then inference mechanism. Then, information
mechanism actuates the control signal in fuzzy
04:29.290 --> 04:36.290
variable which is converted to crisp values
through defuzzification and the driver or
04:36.979 --> 04:43.979
actuator gives to the control signal the actual
process. This is our architecture.
04:45.870 --> 04:52.870
You see that, normally if say for example,
this is my error and this is my membership
04:54.009 --> 05:01.009
function mu and maximum value is 1. You see
that, if my change in error, this is in unit,
05:04.000 --> 05:10.360
so we can define here, it shows that, this
is positive very large, positive large. This
05:10.360 --> 05:17.360
is thus giving an idea what pvl values is
positive very large. Similarly, nvl is negative
05:21.409 --> 05:28.409
very large. So, you say that, this is the
way. This are the linguistic values, negative
05:32.580 --> 05:39.580
large negative medium, negative small 0, the
0 is around the value 0, positive small, positive
05:41.009 --> 05:48.009
medium, positive large and positive very large.
This way you see that, in this case the variable
05:50.610 --> 05:57.610
e the error has been fuzzy partitioned into
9 fuzzy linguistic variables from negative
06:02.280 --> 06:09.280
very large to positive very large. So, once
you fuzzify a crisp variable then we are almost
06:12.120 --> 06:14.009
very clear about the rule base.
06:14.009 --> 06:20.259
For example here, a rule base for fuzzy PID
controller has two input variables, error
06:20.259 --> 06:27.259
and change in error, if each input variable
is fuzzy partitioned as negative very large,
06:28.349 --> 06:35.349
negative large, negative medium and so forth
until positive very large respectively then,
06:35.479 --> 06:42.479
the fuzzy rule base is that hardly found at
the rule. So this is my error and this is
06:46.490 --> 06:52.759
my change in error. What I am saying that
error is negative very large, negative large
06:52.759 --> 06:59.719
until positive very large and change in error
is this is d is differential term. So, that
06:59.719 --> 07:06.210
is also negative very large, negative large,
negative medium, d simply refers here to change
07:06.210 --> 07:13.210
in error. That is also fuzzy partitioned into
9. So, 9 into 9 obviously the number of rules
07:14.080 --> 07:21.080
are 81. So, how do I do value is, if I say
error is negative very large and change in
07:22.689 --> 07:29.659
error is negative very large then, my control
actions will be negative very large.
07:29.659 --> 07:36.659
We can take any other example, let us say
positive medium my change in error where error
07:38.080 --> 07:45.080
is a 0. The action should be positive medium.
So, this is way. You see that, all 81 rules
07:50.629 --> 07:57.629
are possible maximum number of rules given
8 fuzzy partitioning zones, in 2 variables.
08:00.279 --> 08:07.279
Then, 9 into 9 total 81 rules, 81combinations
are possible. Total is 81 rules. Once rule
08:11.490 --> 08:18.490
is given then, given a situation we see which
the rules are. Like you know if you look at
08:19.509 --> 08:26.509
here, given a situation all the things will
not fire. For example, you see here if my
08:29.110 --> 08:36.110
crisp values are here. Only 2 rules will fire
0 error and positive small, in that sense,
08:43.060 --> 08:50.060
maximum time only two rules fire, otherwise
it all depends how you fuzzify, I cannot say
08:50.860 --> 08:56.390
that only two rules firing. Also you can make
rules of only one rule; atleast one rule has
08:56.390 --> 09:02.020
to fire. Otherwise your scheme is not right.
You have to design in such a way atleast one
09:02.020 --> 09:09.020
rule will fire, given a situation but in general
more than one rule fires. But in general fuzzy
09:09.650 --> 09:15.070
partition is done in such a way that two rules
fire. That is why, you are saying two rules:
09:15.070 --> 09:17.870
Rule 1 and rule 2.
09:17.870 --> 09:24.870
Given this, we find out this is my crisp input.
This is rule 1 fires and gives, this is my
09:29.030 --> 09:36.010
control action and rule 2 fires and gives
me the control action like this. Then, what
09:36.010 --> 09:42.370
we do is, the sided portion is the control
action. This is given by mean principle and
09:42.370 --> 09:49.370
now we add this to shaded area. Then, we get
this complete area and this is my complete
09:50.990 --> 09:57.990
action control action. How do I find out this
is fuzzy control action? This fuzzy control
09:58.990 --> 10:05.990
action is converted to the crisp control action
using center of gravity method. This we have
10:11.530 --> 10:18.530
already discussed, center of gravity method.
In general now I would like to turn your attention,
10:19.630 --> 10:24.640
why we are doing fuzzy logic controller? We
are doing because; fuzzy logic controller
10:24.640 --> 10:28.470
was conceived as a better method for sorting
and handling data.
10:28.470 --> 10:34.270
It has proved to be an excellent choice for
many control system applications since, it
10:34.270 --> 10:39.830
mimics human control logic. It can be built
into anything from small hand made products
10:39.830 --> 10:46.640
to large computerized process control systems.
Fuzzy based control has become highly competitive
10:46.640 --> 10:53.640
due to its better performance, high reliability,
robustness, low power consumption and cheapness.
10:54.380 --> 10:59.710
The thinking process involved in fuzzy realm
is not complex it is simple, elegant and easy
10:59.710 --> 11:00.600
to apply.
11:00.600 --> 11:05.260
Fuzzy logic control is one of the methodologies
for solving control system problem. It lends
11:05.260 --> 11:10.230
itself for implementation in systems, ranging
from simple small embedded micro controller
11:10.230 --> 11:17.230
to large networked multi-channel PC or workstation
based data acquisition and control system.
11:17.460 --> 11:21.940
It can be implemented in hardware software
combination of both Fuzzy control directly
11:21.940 --> 11:28.750
also can be implemented in fuzzy hardware,
fuzzy chips. A fuzzy logic controller provides
11:28.750 --> 11:35.750
the simple way at a definite conclusion based
up on vague ambiguous imprecise noisy or missing
11:37.500 --> 11:44.500
input information. Fuzzy logic controller
approaches to control problem, mimics how
11:46.790 --> 11:51.650
a person making a decision at a much faster
rate.
11:51.650 --> 11:58.090
It has inherently robust, since it does not
require precise noise free inputs. The output
11:58.090 --> 12:04.090
control is a smooth control function, despite
a wide range of input variations. Since the
12:04.090 --> 12:10.770
fuzzy logic controller processes user define
rules, governing the target control system.
12:10.770 --> 12:16.460
It can be modified and tweaked easily to improve
or alter the system performance drastically.
12:16.460 --> 12:23.260
New sensor can easily be incorporated into
the system by generating appropriate governing
12:23.260 --> 12:28.880
rules. Fuzzy logic controller is not limited
to a few input or outputs. It allows the sensor
12:28.880 --> 12:35.880
to be inexpensive and imprecise. It keeps
overall system cost effective and low complexity.
12:37.620 --> 12:43.120
Because of the rule based operation, a reasonable
number of inputs can be processed and numerous
12:43.120 --> 12:48.620
outputs can be generated. Defining the rule
becomes complex if too many inputs and outputs
12:48.620 --> 12:53.800
are chosen for a single implementation. It
is better to break control system into smaller
12:53.800 --> 12:59.540
chunks and use several smaller fuzzy logic
controllers that can be distributed on the
12:59.540 --> 13:06.220
system. Fuzzy logic controller can be used
to control non linear system. That would be
13:06.220 --> 13:11.830
difficult or impossible to model mathematically.
This opens doors for control system designer
13:11.830 --> 13:15.560
that would normally be deemed infeasible for
automation.
13:15.560 --> 13:21.380
Finally, fuzzy logic controller provides a
different approach to control complex systems.
13:21.380 --> 13:27.440
This method focuses on what the system should
do, rather than trying to model how it works.
13:27.440 --> 13:32.700
One can concentrate on solving the problem
rather than trying to model the system mathematically,
13:32.700 --> 13:37.100
if that is even possible. On the other hand
the fuzzy approach requires a sufficient expert
13:37.100 --> 13:41.940
knowledge for the formulation of the rule
based on the combination of the sets and the
13:41.940 --> 13:42.940
defuzzification.
13:42.940 --> 13:49.190
The drawbacks of the Mamdani types, so now
we talked about fuzzy logic controller, it
13:49.190 --> 13:55.750
is in a kind of found the positive aspect
of fuzzy logic controller. Now we are only
13:55.750 --> 14:02.750
discussing Mamdani type of fuzzy logic controller.
The problem is that, you have rule base and
14:03.440 --> 14:10.440
this is associated with many parameters, the
membership parameters. These membership parameters
14:15.310 --> 14:21.290
because; how many rules, how many fuzzy zone
portioning and all those things and membership
14:21.290 --> 14:26.120
function, whether you can selectÖ if you
are selecting Gaussian membership function
14:26.120 --> 14:32.160
then a Gaussian membership function is characterized
by two parameters. One is the mean another
14:32.160 --> 14:37.390
is the sigma.
14:37.390 --> 14:43.510
How do we optimize? Because normally what
the engineer does is that he kind of heuristically
14:43.510 --> 14:50.510
tunes his rules. But can there be proper method
of tuning? Normally the genetic algorithm
14:51.710 --> 14:58.710
is good technique to update these parameters.
But, this is only possible if you are doing
15:00.070 --> 15:06.930
it offline simulation. That is the model that
is being controlled. We have some kind of
15:06.930 --> 15:12.730
mathematical form. The system that we are
trying to control we have a mathematical model
15:12.730 --> 15:18.000
for it. Then, we can always design a fuzzy
logic controller using Mamdani type. We can
15:18.000 --> 15:25.000
optimize the parameters using genetic algorithm.
Normally what is done is that, given a physical
15:27.440 --> 15:34.050
system you take some approximate mathematical
model and do offline simulation. Optimize
15:34.050 --> 15:41.050
the parameters and take to the real time system
and their heuristically tune the parameters.
15:41.940 --> 15:48.770
So, GAís perform parallel search. What is
GA and GAís perform parallel search? Find
15:48.770 --> 15:55.010
out optimal parameters where each local search
does either a hill climbing or a gradient
15:55.010 --> 15:55.470
search.
15:55.470 --> 16:02.470
A genetic algorithm you see the first initial
population means this is when any population
16:03.000 --> 16:10.000
means in the case of a control systems solution
random solution space of parameters. If I
16:20.850 --> 16:27.850
know every parameter has certain range. In
that range I create random numbers than I
16:30.350 --> 16:37.350
take each solution set and then I take each
parameter set and then evaluates the fitness.
16:41.370 --> 16:46.190
Based on the fitness value but in this case
what is the fitness obviously it is tracking
16:46.190 --> 16:53.190
error. If the tracking error is minimum in
a specific case that as in the top. Similarly,
16:53.500 --> 17:00.500
there are various, so we reorganize, rearrange
the population of fitness, in other various
17:02.080 --> 17:09.080
methods selection and specifically for control
system, you are very comfortable simply doing
17:09.630 --> 17:16.630
proportional selection. Proportional selection
means, according to the fitness the selection
17:16.799 --> 17:23.799
is done. If I say the initial population is
100 and I will always select after every iteration,
17:27.069 --> 17:34.069
only 30% of them. That means 30% of the top
best candidates are selected and from those
17:40.529 --> 17:47.529
candidates 30% from this 100. So, I have 100
I categorize then according to their fitness
17:48.950 --> 17:55.950
value and then 30% I take and these 30% through
crossover and mutations, are again converted
17:58.259 --> 18:05.259
100. I started with 100 using fitness, evaluate
through fitness I did a selection in terms
18:11.460 --> 18:18.460
of proposal of selection 30% best out of 100
is taken and through crossover and mutation,
18:19.710 --> 18:24.259
I duplicate this 30 to 100 again.
18:24.259 --> 18:31.259
Initial population was 100.We went through
the evaluation process using a fitness cross
18:33.419 --> 18:40.169
function. Then, we did the selection using
the best values and then using cross over
18:40.169 --> 18:47.169
mutation we again got 100. What is the stopping
criterion? Stopping criteria is that how much
18:50.769 --> 18:57.769
tracking error I need. Normally we select
a stopping criteria is that what is the minimal
19:01.899 --> 19:08.899
requirement for tracking error or root mean
square of the tracking error something like
19:09.879 --> 19:16.879
that. Or you can always say also I do just
100 iterations or 1000 iterations. One of
19:16.950 --> 19:23.909
them, whatever stopping criteria you get out
of those solutions, what is the best you take
19:23.909 --> 19:30.909
and that best is your optimal solution. Now
we will utilize this concept to control. We
19:36.879 --> 19:41.340
take a very simple example. It is better to
learn as subject through simple example.
19:41.340 --> 19:47.379
Again consider a single link manipulator is
what you are seeing here. This is my link,
19:47.379 --> 19:54.379
this is the motor. I apply the control torque
this is my angle theta and this if I assume
20:00.980 --> 20:07.980
this theta is actually from this angle theta.
This is angle theta. Then, ml square theta,
20:10.529 --> 20:17.529
double dot plus mgl sin theta is tau. So,
m is 1 kg l is 1 meter g is 9.81 kg per meter
20:22.110 --> 20:23.159
square.
20:23.159 --> 20:28.649
It is desired that the link will follow. We
are talking about how to implement for remote
20:28.649 --> 20:33.889
manipulator PD controller. It is desired the
link will follow a desired trajectory x d
20:33.889 --> 20:40.889
equal to sin t. What we are saying that this
will simply oscillate around its particle
20:42.909 --> 20:49.909
position like this. The PD controller tracking
error is obviously sin t. The desired trajectory
20:55.740 --> 21:02.740
minus theta t the PD controller tau equal
to Kp plus e (t) plus Kd into e dot t. So
21:12.909 --> 21:19.909
this is our PD controller. Kp into error plus
the derivative gain into the differential
21:20.940 --> 21:26.720
of the error Kp, is the proportional gain
and Kd is the derivative gain. Although parameter
21:26.720 --> 21:31.450
Kp and Kd are heuristically determined the
optimal values can be obtained using genetic
21:31.450 --> 21:38.450
algorithm. For certain purpose, what we did
that this is the multi objective function.
21:39.269 --> 21:46.269
We want to minimize the
cost function in error as well as the change
in error. Here also the total controls effort
21:59.019 --> 22:06.019
the square. We got the quadratic function
in error in quadratic function change in error
22:06.269 --> 22:13.269
in the actuated control input. We want to
minimize both. So, doing that running a genetic
22:16.919 --> 22:23.919
algorithm for this, we got the Kp value is
74 and Kd value is 3.
22:27.679 --> 22:34.679
We will see that, for same remote manipulator
also can be control a feedback linearization.
22:35.309 --> 22:41.009
For this again the same manipulator ml square
plus double dot plus mgl sin theta tau. It
22:41.009 --> 22:48.009
is desired that, it will track sin t again
setting the error sin t minus theta t as the
22:48.730 --> 22:55.730
error. We get the derivative of error is cos
t minus theta dot(t) and the double derivative
22:56.340 --> 23:03.340
of e error is minus sin t minus theta double
dot(t). If I select a filter tracking error
23:04.889 --> 23:11.889
r (t) to be e dot(t) lambda e(t) then, I can
write r dot(t) is e double dot(t) plus lambda
23:14.119 --> 23:21.119
e dot(t). This e double dot(t) can be written
here minus sin t minus theta double dot t
23:22.419 --> 23:29.419
plus lambda e dot t. So here, this theta double
dot(t) can be taken from here from this expression
23:32.889 --> 23:39.889
which is tau minus mgl sin theta upon ml square
theta is theta double dot. This is theta double
23:43.070 --> 23:50.070
dot minus lambda e dot is retain here minus
sin t is written here. This is my closed loop
23:50.549 --> 23:57.549
error dynamics. So to make, if I take the
value of m equal to 1, l equal to 1, my final
24:02.610 --> 24:09.610
close loop dynamic becomes this one r dot(t)
r dot(t) is minus sin t, plus lambda e dot(t)
24:10.809 --> 24:17.809
minus tau minus g sin theta. How do I select
my control law tau such that, this is stable?
24:22.139 --> 24:29.129
So if the control law is selected, tau is
minus sin t plus lambda e dot plus g sin theta
24:29.129 --> 24:36.129
plus kr. Then, the closed loop error dynamics
becomes r dot(t) is minus kr. This is stable,
24:37.989 --> 24:44.989
if k is a positive constant. This is a very
simple feedback linearization because it is
24:45.659 --> 24:52.659
a non linear system we selected tau, the control
law which is this one. This is the control
24:55.269 --> 25:02.239
law. If we select this control law, we are
able to show that, the close loop error dynamics
25:02.239 --> 25:09.239
is given by r dot(t)is minus k dot. This is
a stable dynamics.
25:18.970 --> 25:25.970
What we did is that, we did a feedback linearization.
Before that, we did classical PD controller
25:26.919 --> 25:33.340
and also using the earlier fuzzy controller
also, we implement a fuzzy controller. Now
25:33.340 --> 25:39.789
let us see the performance. PD controller
what is the performance you see that, this
25:39.789 --> 25:45.850
is my solid line is my desired and the broken
line is actual. So, this tracking is not so
25:45.850 --> 25:52.850
good which is natural because, simple PD controller
and hence the control access are given here.
25:54.470 --> 26:00.340
This is most optimal performance of the PD
controller because you have optimized the
26:00.340 --> 26:03.549
parameter of Kp and Kd using genetic algorithm.
26:03.549 --> 26:10.549
Now feedback, this is FBL is feedback linearization
technique. So using this controller you easily
26:12.649 --> 26:19.649
see that the tracking is very good, as well
as this is the oscillation in the input torque
26:23.570 --> 26:30.570
is reduced here and it is very smooth torque.
Now, we have implemented as fuzzy logic controller
26:32.799 --> 26:37.129
g optimization.
26:37.129 --> 26:44.129
Using this, when we again did the performance
is good with the control actuation is also
26:48.869 --> 26:55.869
very smooth just like Feedback linearization,
it is the best achieves, the very good controller.
27:01.570 --> 27:08.570
So, fuzzy logic controller, it was started
with this g of optimization also provide the
27:10.470 --> 27:11.450
similar.
27:11.450 --> 27:18.450
If I want to compare comparative performance,
you see that, fuzzy controller is now with
27:18.749 --> 27:25.460
this same. You can see that same controller
input effort. You see that, this is the comparative
27:25.460 --> 27:32.460
because; we are almost applying same control
input 5.1, 5.1, 4.8 Newton meter. This is
27:32.929 --> 27:39.929
root mean square control source. So, total
control at every time. If I have u(k) or if
27:44.330 --> 27:51.330
I have u(t) ut square into dt. Find out and
then average it. Then, take the root means
28:05.179 --> 28:11.989
square. I get this control effort and correspondingly
you see fuzzy controller has the order of
28:11.989 --> 28:18.989
error is 10 to the power minus 3. But, PD
controller has 10 to the power of minus 2
28:21.570 --> 28:28.570
and linear feedback controller say 10 to the
power minus 4, so fuzzy controller is almost
28:29.320 --> 28:36.320
equivalent to linearization feedback controller.
You will now of course, this is just an example.
28:38.619 --> 28:45.619
Using some simple example the fuzzy logic
controller also can be further improved. The
28:48.480 --> 28:55.480
invariant you will now discuss about another
evolutionary computation approach for optimization
28:56.779 --> 28:59.859
the Univariate marginal distribution algorithm.
28:59.859 --> 29:06.859
UMDA estimates the distribution using mean
field approximation. Each string in the population
29:07.869 --> 29:14.859
is represented by a binary factor x. The algorithm
generates new points according to following
29:14.859 --> 29:21.859
distribution. This is called mean field approximation.
This is the distribution of a total string
29:24.320 --> 29:31.320
and this is the individual bits in the string.
So, the UMDA algorithm that is what is meaning
29:32.409 --> 29:39.409
of this is that, if x is a factor of x1, x2
and x3, then, p(x) is simply p(x)1, p(x)2,
29:47.749 --> 29:54.749
p(x)3. This is called mean field approximation
in probability theory. So, probability joint
29:55.649 --> 30:02.649
distribution is computed simply multiplication
of individual or marginal distribution. So,
30:03.230 --> 30:10.230
the step 1: set t equal to 1 and generate
n binary strings randomly and this binary
30:12.769 --> 30:18.179
streams represents certain parameters. Step
2: select m less than n strings according
30:18.179 --> 30:25.179
to a selection method, normally proportional
method. Step 3: compute the marginal frequencies
30:26.690 --> 30:33.690
for each one, from the selected strings. Generate
new n point according to this distribution
30:36.299 --> 30:43.299
which we have derived. Set t equal to t plus
1. If the termination criteria not met, go
30:44.369 --> 30:46.710
to step 2.
30:46.710 --> 30:53.710
The example I will say, let us say I have
3Ö, the consist 3 bits and I have such 3
30:58.769 --> 31:05.769
such strings. Then, you can easily simply
the marginal frequency of 1 in the first bit
31:10.320 --> 31:17.320
is 1 upon 3. Marginal frequency of 1 in the
second bit is 2 by 3 and marginal frequency
31:20.609 --> 31:27.609
of 1 in the third bit is 2 upon 3. Obviously,
the probability join distribution of x1 equal
31:31.489 --> 31:37.960
to 1, x2 equal to 2, and x3 equal to 1 is
simple multiplication of this, which is 1
31:37.960 --> 31:44.960
upon 3 into 2 upon 3 into 2 upon 3. Then,
easily see this is 4 upon 3 cube or 4 upon
31:48.570 --> 31:54.279
27. How do we do it? New population is generated
according to this marginal frequency distribution.
31:54.279 --> 32:01.279
What I do in the next time when I generate,
I generate here. So, I generate, what I had
32:09.809 --> 32:16.809
say 10 strings. I did a selection and I proved
to 3 best and this 3 best, are converted again
32:23.559 --> 32:30.559
to 10 number of population to 10 using this.
Why I do is that the first strings, they are
32:36.129 --> 32:43.129
generated. I will generate 1 with the probability
1 up on 3 and with probability 1 up on 3 1
32:47.820 --> 32:54.149
is selected probability 2 up on 3 0 is selected
in the first string, first bit and second
32:54.149 --> 33:01.149
bit with the probability 2 up on 3 I select
1, otherwise 0 and similarly third one with
33:02.100 --> 33:09.100
probability 2 up on 3 I selected 1 and with
probability 1 up on 3 as select as 0.
33:11.179 --> 33:18.179
This is the UMDA univariant marginal distributional
problem. Now we will show you in this particular
33:22.269 --> 33:29.269
lecture, the application of this particular
invariant marginal distribution algorithm
33:33.039 --> 33:40.039
to a robot arm control. The general approach
to control a robot arm is to actuate a feed
33:40.639 --> 33:46.149
forward torque which is computed based on
inverse dynamics model of the robot arm and
33:46.149 --> 33:52.269
a feedback torque that is computed using position
and velocity feedback terms. The schematic
33:52.269 --> 33:58.190
diagrams for such control architecture are
as follows: What you are seeing is here that
33:58.190 --> 34:04.419
given a robot control robot arm, this is my
robot manipulator. The normal approach to
34:04.419 --> 34:11.419
control a robot arm is that, I have an inverse
dynamics which gives me given the desired
34:11.419 --> 34:18.419
trajectory gives me what is the feed forward
torque. Given the desired trajectory using
34:20.770 --> 34:27.770
the feedback, actual output feedback I have
a PD controller and that actuator is tau feedback.
34:30.099 --> 34:37.099
This is the total tau and the objective is
that, the robot manipulator should follow
34:39.950 --> 34:45.270
the desired trajectory. That means q should
follow q d. This is the generic architecture
34:45.270 --> 34:52.270
for robot manipulator. This is inversion,
this is for stability. Now you see that, given
34:53.839 --> 34:59.920
if I assume that robot manipulator dynamics
are not exactly known or there are uncertainties
34:59.920 --> 35:06.920
what I can do is that, I can learn inverse
dynamics of robot manipulator. I put this
35:08.950 --> 35:15.950
inverse dynamics here. I can also design instead
of PD controller a fuzzy PD controller. Now
35:17.809 --> 35:24.809
I am controlling the same system using a different
approach that is fuzzy logic controller.
35:27.480 --> 35:34.480
What is inverse dynamics model? In the absence
of dynamic and parameteric uncertainties the
35:36.470 --> 35:42.839
inverse model can be directly computed in
terms of desired link position the velocity
35:42.839 --> 35:48.789
and acceleration using forward dynamics of
the robot arm. This is very simple in the
35:48.789 --> 35:55.789
general robot dynamics is m theta double dot
c theta dot plus g is tau. All that I have
36:03.410 --> 36:10.410
to do is that, if I know mlg. Then, given
theta d theta dot d and theta double dot d.
36:14.900 --> 36:21.900
I can compute tau. This is the best way to
control the robot manipulator because this
36:23.670 --> 36:30.670
is the inverse dynamics but, unfortunate most
of the time the parameters that we identify
36:31.299 --> 36:38.299
m c and g. They may not be exact. However,
the inherent uncertainties compile a control
36:40.559 --> 36:45.950
engineer to estimate the model using neural
networks or fuzzy logic. The generic form
36:45.950 --> 36:52.950
of the inverse dynamics for a robot manipulator
is thus given as tau is the function of q
36:53.309 --> 37:00.309
desired velocity desired and acceleration
desired. So, tau is the required torque and
37:01.940 --> 37:08.940
position velocity and acceleration as the
link position the velocity acceleration respectively.
37:10.200 --> 37:16.510
The fuzzy model of the inverse dynamics you
see that, we talked about this model. First
37:16.510 --> 37:23.510
we will solve this one. How to derive a fuzzy
logic, fuzzy inverse dynamics of a given robot
37:24.440 --> 37:31.440
manipulator? So, the generic form of the fuzzy
model is given as, if x1 is A1 x2 is A2 and
37:32.819 --> 37:39.819
xn is An then, y is B. Where xi is fuzzy input
variables for the model Ai is the fuzzy attribute
37:41.079 --> 37:48.079
of xi and y is the fuzzy output and B is the
fuzzy attribute of y. For a single link manipulator,
37:51.210 --> 37:58.210
if I take ml square double dot plus mgl cos
theta is tau. The fuzzy inverse dynamics model
37:58.630 --> 38:05.630
maps, 2 fuzzy input variables q. This is not
q this is theta and theta double dot to one
38:12.549 --> 38:17.690
fuzzy output variable. Sometimes we represent
this angular position and angular velocity
38:17.690 --> 38:23.710
and acceleration either in terms of theta
or q. So that, we have 2 variables here, theta
38:23.710 --> 38:27.970
and theta double dot.
Because we know the torque does not depend
38:27.970 --> 38:34.970
on the other variable whichhis is theta dot.
How many variables then this inverse model
38:35.329 --> 38:41.690
are dependent on in this particular example
two input variables. So each input variables
38:41.690 --> 38:48.690
are fuzzy partitioned into 6 regions, negative
big, negative medium, negative small, positive
38:50.380 --> 38:57.380
small, positive medium and positive big. Once
you have 2 input variables and each input
39:02.630 --> 39:09.430
variable is fuzzy partitioned into 6 zones.
Then obviously, we have the rule base that
39:09.430 --> 39:13.230
will consist of maximum possible 36 rules.
39:13.230 --> 39:19.660
To describe the dynamics for simplicity, we
assume that, the output fuzzy variable is
39:19.660 --> 39:26.660
a fuzzy singleton. It is a fuzzy singleton
means it is like this. This is called fuzzy
39:31.480 --> 39:38.480
singleton. But, if the moment I represent
than this is triangular members. We can Gaussian
39:44.690 --> 39:51.690
membership. But, singleton means it has a
single value. This is the x1 whatever output
39:52.289 --> 39:59.289
is here. This is fuzzy singleton output of
the fuzzy model is computed using center of
40:00.010 --> 40:07.010
gravity method which have already discussed,
where r is the index for the rule, R is the
40:10.500 --> 40:17.500
total number of rules and mur here is minimum
of all this fuzzy index. That is A1 of x1
40:21.289 --> 40:28.289
of A2 of x2 and Anof xn. When I fuzzify this
given crisp values x1, x2, xn. There corresponding
40:31.000 --> 40:37.950
fuzzy values are fuzzy memberships are computed
using define fuzzy membership function A1,
40:37.950 --> 40:44.950
A2 and An so fuzzy parameters optimization.
We saw that if I am trying to control a single
40:49.710 --> 40:56.210
link robot manipulator, I have to design two
things. One is inverse dynamic model and another
40:56.210 --> 41:03.210
is a fuzzy PD controller. We are now doing
fuzzy inverse dynamics. In this we saw that,
41:03.970 --> 41:10.200
the torque, actuating torque is a function
of two variables which is angular position
41:10.200 --> 41:17.200
and angular acceleration. The missing element
is angular velocity so 2 input fuzzy partitions
41:20.140 --> 41:26.190
into each input is fuzzy partition into 6
variables, 6 linguistic variables. Then, we
41:26.190 --> 41:33.190
have 36 rules and if I say that, each membership
function is a Gaussian membership function,
41:34.869 --> 41:39.990
which we have actually taken in this case.
Then, each membership function is characterized
41:39.990 --> 41:46.990
by 2 parameters. One is mean any Gaussian
is by mean as well as then variants sigma.
41:51.779 --> 41:56.869
The inverse dynamics of the single link manipulator
is described by 2 input variables, and one
41:56.869 --> 42:01.869
output variable. Each input variable is fuzzy
partition into 6 regions and each reason is
42:01.869 --> 42:08.869
characterized by 2 parameters mean and variance,
because of Gaussian membership function. The
42:17.039 --> 42:24.039
total numbers of parameters in the input space
are 24 because I have 6 partitions in the
42:25.250 --> 42:32.250
first input variable and another 6 partition
in the second input variable, each input linguistic
42:33.200 --> 42:40.200
variable is characterized by 2. So, 6 plus
6 is 12 into 2 is 24 and there are total number
42:40.619 --> 42:47.619
of 36 rules. Each rule is associated with
one fuzzy single term. So, that is 36 parameters
42:51.500 --> 42:58.500
means if x1 is A1 x2 is A2. Then, y is a specific
value y is 10 unit and y is 20 units, y is
43:02.789 --> 43:09.789
40 units like that. Singleton value means
it is a precise value. There are 36 singleton
43:11.690 --> 43:17.529
parameters in the output space one for each
36 rules. Thus, fuzzy inverse model consist
43:17.529 --> 43:24.529
of 60 parameters 24 plus 36. Since the output
is a nonlinear function in terms of these
43:25.599 --> 43:31.670
60 parameters. The resulting nonlinear optimization
problem is a good candidate within the evolutionary
43:31.670 --> 43:37.970
computation approach. What we will do is that,
we will now use simple genetic algorithm as
43:37.970 --> 43:44.970
well as UMDA univariant marginal distribution
algorithm to learn this inverse dynamics.
43:46.520 --> 43:53.520
Quickly compare which is doing better because,
we have learned. The fuzzy inverse model parameters
43:54.000 --> 44:00.260
are optimized using both simple genetical
logarithm and univariate marginal distribution
44:00.260 --> 44:02.270
algorithm.
44:02.270 --> 44:08.349
In simple genetic algorithm and univariate
marginal distribution algorithm each parameter
44:08.349 --> 44:15.349
is represented by a binary string that consists
of 8 bits and you have 60 parameters. So,
44:15.369 --> 44:22.369
60 into 8 are 480 bits. It is if I have a
string in the population these strings consist
44:24.670 --> 44:31.670
of like that. 480 bits and out of that 8 bits
represent 1 parameter and total number of
44:42.520 --> 44:49.520
480 bits will represent 60 parameters. Initially,
the population size is kept at 1000. So, in
44:52.119 --> 44:57.119
simple genetic algorithm the proportional
selection is adapted multipoint cross over
44:57.119 --> 45:04.119
is done the mutation rate is kept at 0.01;
whereas, in univariate marginal distribution
45:04.960 --> 45:11.029
algorithm 20% of the population is selected
according to fitness. The univariate frequency
45:11.029 --> 45:15.829
of each bit is computed over the selected
strings and a new population is generated
45:15.829 --> 45:16.960
accordingly.
45:16.960 --> 45:23.960
That has been the universe dynamics as generated
in two following position trajectories. We
45:24.670 --> 45:30.150
took in one case desire trajectory to cos
3 t another case the desired trajectory q
45:30.150 --> 45:37.150
is 1 up on 3 cos t plus cos 2 t plus cos 3
t. Using this 2 trajectory, we generated 500
45:44.450 --> 45:51.450
data points. For all this 500 data points
with every step we took a parameter set. We
45:56.569 --> 46:03.569
computed the output and we matched whether
given these values we can find out tau. Using
46:08.990 --> 46:15.990
SGA and UMDA both simple genetic algorithm
and univariate marginal distribution algorithm
46:17.410 --> 46:24.410
are evolved for 100 generations. The cost
function is always evaluated for these 500
46:25.520 --> 46:32.520
data points. If we see that; the learning
of UMDA which is the solid line and simple
46:37.440 --> 46:42.589
genetic algorithm which is the broken line,
you see that, error convergence in parametric
46:42.589 --> 46:49.589
evolution using univariate marginal distribution
algorithm and simple genetic algorithm while
46:49.740 --> 46:56.740
modeling the inverse dynamics we are showing
it and the conclusion is UMDA univariate marginal
46:57.319 --> 47:03.730
distribution algorithm is faster than simple
genetic algorithm. The interesting point is
47:03.730 --> 47:10.730
that, this univariate marginal distribution
algorithm is actually a very simplified form
47:11.279 --> 47:18.279
of a probabilistic approach purely probabilistic
approach to evolve the solution base.
47:18.549 --> 47:25.549
Now we will test the fuzzy inverse model using
simple genetic algorithm. The accuracy of
47:31.349 --> 47:36.250
the predict model is tested by comparing with
the desired torque corresponding to two different
47:36.250 --> 47:43.250
trajectories. What you are seeing is that
this first trajectory what you are seeing
47:44.940 --> 47:51.940
corresponds this is the desired torque. This
is the torque output torque tau and the desired
47:56.609 --> 48:03.609
torque and this is the given trajectories.
If you see that this is the desired torque
48:10.490 --> 48:17.490
at different instance along the trajectory
cos t is this one desired torque. SGA is estimating
48:24.109 --> 48:31.109
the values like this you see that this is
SGA estimation. You see this is not so accurate.
48:35.569 --> 48:42.569
Similarly, the second trajectory corresponding
to the tau is computed like this value; whereas,
48:47.579 --> 48:54.579
the predicted through inverse model. There
is certainly discrepancy this model learning
49:01.519 --> 49:02.799
is not good.
49:02.799 --> 49:09.799
But, when you set to univariate marginal distribution
algorithm you can check that, the prediction
49:11.470 --> 49:18.359
is much better here, using univariate marginal
distribution algorithm here also the prediction
49:18.359 --> 49:25.359
is much better. This is the first trajectory
cos 3t and second trajectory is the summation
49:27.519 --> 49:34.519
of 3 different trajectories. The figure clearly
shows that the univariate marginal distribution
49:35.150 --> 49:40.240
algorithm does better when compared to the
simple genetic algorithm is not that is a
49:40.240 --> 49:47.240
blanket statement. We are only considering
the simple genetic algorithm for there also
49:47.240 --> 49:54.240
very advanced genetic algorithms that may
also do better than UMDA. So, we showed until
49:57.950 --> 50:00.809
now is an inverse dynamics fuzzy inverse dynamic
model.
50:00.809 --> 50:06.269
Now, would be talking about feedback fuzzy
PD controller. The generic form of a rule
50:06.269 --> 50:13.269
in a fuzzy logic controller is again the same
if x1 is A1, x2 is A2 and xn is An then, the
50:13.930 --> 50:19.319
control action tau is B. The final control
action is computed using center of gravity
50:19.319 --> 50:24.529
method in case of a single link manipulator.
2 input variables are link position and a
50:24.529 --> 50:31.529
link velocity and are fuzzy portioned in 6
reasons as negative big, negative medium,
50:33.519 --> 50:39.920
negative small, positive small, positive medium,
and positive big. Also the only control variable
50:39.920 --> 50:46.920
is fuzzy partitioned into 8 reasons: Negative
critical, negative big, negative medium, negative
50:49.329 --> 50:56.329
small, positive small, positive medium, positive
big and positive critical.
50:58.329 --> 51:03.089
Each fuzzy variable this is represented by
two parameters taking Gaussian membership
51:03.089 --> 51:10.089
function, its mean and variants. Thus, we
have 40 variables. However, by fixing means
51:11.000 --> 51:18.000
of some fuzzy attributes not negative small,
positive small 0. We reduce the parameters
51:19.599 --> 51:25.789
tries to 30. You have to do little because,
we are very sure you can fix certain parameters
51:25.789 --> 51:31.039
and then you reduce those parameters size
to 30. As before each parameter is represent
51:31.039 --> 51:38.039
by 8 bits so naturally is now consisting of
240 bits. Now we see that, error convergence
51:39.240 --> 51:46.240
in parametric evolution using UMDA and SGA
while designing fuzzy PD controller is that,
51:47.339 --> 51:54.339
UMDA is pretty fast compare to simple genetic
algorithm.
51:54.990 --> 52:01.990
Finally, we first design two aspects separately.
Now, you will put both of them together and
52:04.559 --> 52:11.559
then, we will design a robot arm control using
both inverse dynamic and PD controller. So,
52:14.450 --> 52:20.450
if we do that which proposed earlier.
52:20.450 --> 52:27.450
See that, the robot arm control is simulated
using fuzzy UMDA inverse dynamics and fuzzy
52:27.579 --> 52:34.010
UMDA PD controller. Since, UMDA performance
is better than SGA. In the first case, we
52:34.010 --> 52:39.440
used exact inverse dynamics are along with
fuzzy PD controller for a set point tracking.
52:39.440 --> 52:46.279
Then, we assumed 20% model uncertain is in
the actual model and the control schemes are
52:46.279 --> 52:51.269
implemented using fuzzy PD controller and
a conventional PD controller. The results
52:51.269 --> 52:58.269
show that, FLC is robust parametric uncertainties.
So, in the beginning you see that, this solid
52:59.599 --> 53:06.599
line which is this one, this particular one.
So, this solid lines represents when we have
53:10.470 --> 53:17.470
the model is exact for which we have derived
the fuzzy inverse model and we have derived
53:20.690 --> 53:27.690
the fuzzy controller. Now introduced 20% model
certainties and doing the model uncertainties,
53:34.549 --> 53:40.900
we again are running on the chain fuzzy logic
controller which we derived for the exact
53:40.900 --> 53:41.319
model.
53:41.319 --> 53:47.369
Now you took the 20% uncertainties in the
parameters, we introduced that, arbitrarily
53:47.369 --> 53:54.369
randomly and then we saw the controller performance
has not degraded, the second one which is
53:54.880 --> 54:01.880
inversing this. But, if you do simple the
PD controller with
the classical PD controller and assume the
54:09.859 --> 54:16.269
20% model uncertainties obviously, due to
model uncertainties you cannot go to the exact
54:16.269 --> 54:22.690
set point. This is your set point desired
set point. There is an error, the actual set
54:22.690 --> 54:29.599
point and desired set point. So, desired set
point is 1 radian which is this. What we are
54:29.599 --> 54:36.599
saying that, set point response FLC without
model uncertainty first one and this is my
54:38.510 --> 54:45.510
third one. FLC with model uncertainties does
very nicely and PD with model uncertainties,
54:48.299 --> 54:53.569
you see that, it has some error.
54:53.569 --> 55:00.569
Finally, in this lecture following topics
have been covered. We covered first of all
55:02.630 --> 55:08.670
Mamdani type of fuzzy logic controller then,
parameter optimization using simple genetic
55:08.670 --> 55:15.670
algorithm and UMDA. We demonstrated that,
how these two optimization schemes work for
55:17.829 --> 55:24.829
robot arm control. But, we give a caution
here the adaptive fuzzy logic control is possible
55:25.309 --> 55:32.309
only if the offline simulation can be carried
out. Today, we gave you some idea about how
55:34.869 --> 55:41.220
we do parameter optimization of fuzzy logic
controller. In the next class which will be
55:41.220 --> 55:48.220
interesting for you, for which we will show
you how to generate rules from actual crisp
55:50.720 --> 55:57.720
data in a manner that, the fuzzy logic controller
is stable. Here, we are optimizing and as
56:03.140 --> 56:10.140
long as our performances criteria are limiting
then we say system is stable. But, there is
56:10.269 --> 56:17.269
no readymade. We do not actually generate
rules such that, system is stable. Next fuzzy
56:20.990 --> 56:27.990
logic controller the type that we will be
describing how to generate rule base using
56:28.980 --> 56:35.980
stability concept. Thank you.
422