In this lecture we shall see how Neural Network
Based Controllers can be designed for a Robot
Manipulator to track desired trajectories
under uncertainties and disturbances. So,
the so, let us consider the kinematic model
which can be written as x is equal to f of
q.
So, here x denote the Cartesian position and
orientation of the robot end effector and
q which is equal to q 1 q 2 q n vector denotes
the joint variables. So, for example, if we
take a 2 arm manipulator with angles we can
call it as q 1 and q 2 and the Cartesian axis
are x 1 and x 2. We can write the kinematics
equation as x 1 is equal to l 1 cos of q 1
plus l 2 cos q 1 plus q 2 x 2 equal to l 1
sin q 1 and l 2 sin of q 1 plus q 2.
So, here we can write x to the x 1, x 2 and
q to be q 1 and q 2 and this function we can
call it as f 1 of q and this is f 2 of q.
So, we can write it as x is equal to f of
q where f equal to f 1 f 2 vector and x is
x 1 x 2 vector. So, it is a kinematic model
for the 2 arm manipulator.
And, now if we differentiate this equation
with respect to time: we get the Cartesian
velocity x dot in terms of the joint velocity
q dot. So, here again x dot represent x 1
dot x 2 dot etcetera x n dot the velocity
of the end effector it contains position and
orientation of the end effector and q dot
denotes the joint velocity, where this J represent
the Jacobian of the manipulator. So, in the
previous example if we see that we can write
x 1 dot is equal to l 1 cos theta 1. If we
differentiate will get minus sorry cos q 1
if we differentiate we will get sin q 1 into
q 1 dot minus l 2 sin q 1 plus q 2 multiplied
by q 1 dot plus q 2 dot.
Similarly, x 2 dot can be written and this
can be written as x 1 dot x 2 dot vector can
be written as a 2 by 2 matrix multiplied by
q 1 dot q 2 dot, where the 2 by 2 matrix contains
this coefficients minus l 1 sin q 1 minus
l 2 sin q 1 plus q 2 that is multiplied by
q 1 dot etcetera. So, the four coefficients
can be written in the matrix which forms the
Jacobian of the 2 arm manipulator. So, this
is a general one for any robot manipulator
we can write x dot equal to Jacobian into
q dot form.
Now, if J is a 2 n by n matrix then J inverse
can be calculated, but if J is not a, it is
not a square matrix then we can find the pseudo
inverse of the Jacobian. So, the J plus denote
the pseudo inverse which can be calculated
by this expression, this is especially in
the case of if J is a matrix of size. It is
n cross m where m is greater than n. So, in
the case of redundant manipulators we can
write and if m is equal to n J plus denotes
the inverse of the matrix J, the usual inverse
of the matrix.
So, the J plus is denote defined as J transpose
multiplied by J J transpose whole inverse
provided the inverse exist for the J J transpose.
And, here because n is less than or equal
to m. J J transpose is a n cross m matrix
and we can find the inverse of the square
matrix and we can calculate J plus. And, it
can be easily verified that J into J J plus
will give the identity matrix from the expression
5 itself we can see that J J plus is identity
matrix.
So, now we consider the dynamic equation of
the robot manipulator for a given manipulator
we have seen how to derive the dynamic equation
using the Euler Lagrange equation. And, here
M represents the inertia matrix, V is the
centrifugal and Coriolis term, g represent
the gravity term. And, the disturbance which
occurs during the motion of the robot manipulators
are denoted by F and the T suffix d the disturbance.
External disturbance is denoted by T suffix
d and the friction due to the manipulator
itself is denoted by F q function and the
tau denotes the torque applied at the joints
of the manipulator.
So, this F term and the T suffix d terms are
unknown because they are all disturbances
or the friction terms, but we know that in
the real life situation all these disturbances
are in most of the time they are small in
size. So, they are all bounded by certain
constant. Here these are all vectors F is
a vector and T suffix d is a vector the disturbance
terms and the norm of those vectors can be
bounded by certain constant. And, we also
know that the matrix M, the matrix which is
the inertia matrix satisfies this property
because the entries of the inertia matrices
are all bounded below and above.
So, we can write the property that for any
vector xi in R n xi transpose m into xi, it
is a real number that is bounded above and
below by this types of constants where m 1
and m 2 are suitable values we can easily
find.
And, we can also see that the matrix M if
we differentiate with respect to time and
half d M by d T minus the centrifugal term.
It is a skew symmetric matrix, in other words
if we take any vector xi in R n xi transpose
of this into xi will always be equal to 0.
So, the xi transpose is 1 cross n matrix and
this whole thing is a n cross n matrix and
this is n cross 1. So, this is a single number
real number which is equal to 0, when we operate
with any arbitrary xi. That is the property
of the skew symmetric matrix and M half M
dot minus V always satisfies this particular
property.
Now, let us consider the desired Cartesian
trajectory is given by x suffix d. It is a
function of as t changes the x d changes,
it is a vector function and x of d is the
current position of the end effector. So,
the error is denoted by e and it is x d minus
the desired trajectory minus the current trajectory
of the robot end effector. Now, if you differentiate
e we will get x d dot minus x dot and we add
and subtract a term alpha times e, where alpha
is a positive constant, sorry alpha is a m
cross m matrix which is a positive definite
matrix.
For example, we can take a diagonal matrix
with positive numbers as the alpha matrix
and that is a positive definite matrix. Then
e dot can be written in this particular form.
So, here we see that e dot is equal to minus
alpha e is here and the remaining terms that
is J J plus is identity. So, the first term
is x d dot plus alpha e those terms are here
x d dot plus alpha e is here by multiplying
this, and then minus J q dot is here. So,
all the terms are rewritten in this particular
form. Now, if we denote this J plus x d dot
plus alpha e as r vector.
Then we can write the equation 10 as simply,
if we write r is equal to J plus into x d
dot plus alpha e minus q dot sorry the whole
thing as r, then we will get e dot is written
as minus alpha e plus J times r. So, that
is very easy to verify from the previous.
Now, if you substitute, if you write the entire
equation in terms of r. So, r is denoted by
J plus x dot suffix d plus alpha e minus q
dot as we have seen earlier. And, then if
we convert the and the dynamic equation is
also written in this particular form as we
have already seen. Now, what we do is we will
write the dynamic equation in terms of r only,
if we see that q dot is the from this equation
we will get q dot is nothing, but J plus x
d dot plus alpha e minus r.
So, now, if we differentiate one more time
we will get q double dot from this equation
and then if we substitute in this equation
13, the q double dot value from here we can
rewrite the whole equation in terms of r and
its derivative. So, equation 13 can be converted
into this equation M into r dot can be written
as minus V time r. This V is there and we
can convert it into this form plus h y.
We are introducing a new term h y here minus
tau plus T suffix d which is already available
here. This, if we take the tau term in the
left hand side we will get minus tau plus
T suffix d. So, this term can be verified
directly by taking q double dot and substituting
in this equation we get this arrangement,
where the newly introduced term h of y is
nothing, but this particular term.
So, how to check this particular thing? Substitute
this h of y in this equation directly and
then check that we will get the equation 13
directly. So, now this y variable is nothing,
but a vector which contains x d transpose
x d dot transpose x d double dot transpose
e transpose and e dot transpose. For example,
if we write x d it is a vector and x d transpose
is a called a row vector.
So, whatever has been written here inside
the bracket are all row vectors and then when
we take the transpose of the whole thing,
it becomes a column vector. So, y is a column
vector whose size is because e e dot x d all
of them have size n. If they are all belonging
to r n space and there are 5 such components.
So, it is nothing, but this belongs to R 5
times n.
The numbers the coordinates of y are of the
size 5 n components are there for this thing.
Now so, h of y is written in this particular
expression, our aim is to because the error
is to we want to make this error 0 e. So,
our aim is to make the error tending to 0
as T becomes larger and larger during the
tracking.
So, how to use neural network for this purpose?
We can design a controller if there is no
disturbance term. This F term and T suffix
d terms are not there in the equation or we
say that it is a ideal situation. There is
no disturbance then we know the dynamics of
the equation and we can find a controller
using some simple PD or PID controller as
we have seen using the Lyapunov theory.
Here also we will use Lyapunov theory, but
due to how to avoid this disturbance terms
that is what we will see using artificial
neural network. So, we have already seen what
is artificial neural network in the previous
lecture. So, x i’s are the input and y i’s
are the output and the hidden layer is having
this mu 1 mu 2 this values. So, there are
here 4 inputs and 3 hidden layer neurons and
2 output neurons.
So, and we have seen that how to write the
relation between the input and the output.
So, this sigma denotes the sigmoid function
which we can take it one of the examples of
sigmoid function is sigma of any variable
z is 1 by 1 plus e power minus z; its one
of the sigmoid function. So, using this we
can write the relation the v i j are the v
i j for example, v 1 1 is the weight joining
this first neuron, first input to the first
hidden layer neuron etcetera. So, similarly
the w 1 1 denotes the relation between the
hidden layer to the output neuron.
So, that relation is written like this. So,
output y k has this particular term and where
w j k and v i j all denotes the weights connecting
various neurons. And, now this expression
can be written in the matrix form like this
if we denote the V matrix to be v i j and
W matrix to be w j k as given here.
We can write capital Y, capital Y is nothing,
but y 1, y 2 etcetera y m. This vector it
is equal to W transpose this one into sigmoid
function at the value V transpose X where
capital X denotes the vector x 1, x 2, x n.
So, using this expression neural network expression
we can approximate any given function of x
1, x 2, x n.
So, if f is a continuous function from R n
to R m. So, function of n variables and its
value is a vector in R m. Then that function
can be approximated by a neural network of
the form given in C equation C.
So, for any small value epsilon given we can
find a neural network. So, that the difference
between f of X and the neural network is very
small; the given small value can be obtained.
So, this is the famous theorem from the neural
network approximation property for continuous
functions.
Now, we can note that the disturbance which
is occurring the friction or the external
disturbance is during the tracking, they are
assumed to be a continuous function. And we
say, assume that it can be approximated by
a neural network in this particular form as
given in the expression C. So, now let us
assume that the control tau, the torque tau
is selected in this particular form where
h cap of y is the estimate of the h of y.
That is h of y is the disturbance which we
have seen in the expression which we have
introduced here. So, this contains the disturbance
terms f the estimate of h of y using a neural
network is written in the form like this,
h cap equal to W cap transpose sigmoid function
V cap transpose y. So, here capital T denotes
the transpose of the matrix W cap. So, I think
we can change here also here also we can write
the W T denotes the transpose.
So, h cap is the estimate of the h of y using
a neural network expression. So, using the
feed forward neural network function approximation
we can write the equation as given here as
M r dot equal to minus V r is here minus K
r is here and h tilde is nothing, but the
h value minus the estimate h cap.
Now we can see that adding and subtracting
W transpose sigma V cap transpose of y, in
this expression we note here W and V are appearing
in one term, W cap and V cap are appearing
in the second term in this 2 terms. Now, we
are just making a combination W transpose
sigma V cap transpose y. This one we are adding
and subtracting and then combining those terms
we will get the next term like this.
Only we are changing the first and second
terms are as it is and the last terms were
also as it is we are because we are adding
and subtracting we will get the terms to be
in this particular form. Now, we note that
sigma V transpose y. So, sigma V transpose
y it is a function of the and v i j cap are
the estimated values of the beats. So, if
we write the sigma V transpose y as a Taylor
series expansion about this estimated values.
So, we can write it as sigma V cap transpose
y plus the first derivative of this function
at this point V cap transpose y multiplied
by the V transpose y minus we estimate this
thing. So, for example, if we take a Taylor
series expansion of a function f of x about
a point 0 x 0, we will get f of x equal to
f of x 0 plus f dash of x 0 into x minus x
0 plus etcetera. So, these are the higher
order terms. So, similarly sigma V is a function
V is a matrix here and we are finding the
Taylor series about the V cap matrix plus
its derivative term at the V cap and the difference
between the v matrix and the V cap matrix
terms.
So, we get V tilde T here and the higher order
terms and we can omit the higher order terms
and we can denote using this notations we
can write the further terms. So, M r dot finally,
can be converted into this particular form
using this Taylor; if we substitute for example,
sigma V transpose y for this term. So, this
and this will get subtracted and we will get
sigma dashed V cap transpose y, this is a
matrix. When we differentiate a vector then
we will get a matrix expression into V tilde
y as we have seen here plus the remaining
terms are as it is.
So, further simplifying this expression we
will get the terms M r dot to be in this particular
form. Now, what we want is to find the W cap
and V cap, h of y itself is not known because
it contains some disturbance. We want to estimate
this unknown function using neural network.
So, our aim is to find this W cap and V cap
using some technique.
So, we have to follow a weight updation algorithm
and as we have seen that all this functions
which are involved in this disturbances and
whatever expression we are finding they are
all bounded. So, we can find a suitable constant
p 1 which is bounding this particular expression
which is appearing in the equation.
So, we take p 1 as a bound, this can be taken
to be a big number for example, we can take
it to be 10 or 15, 20 any number depending
on the situation. A particular robot manipulator
or particular situation whether the situation
has more disturbance or less disturbance etcetera;
we can define or a priory estimate of this
bound can be assumed to be a particular value.
Now, we will design this v expression which
is appearing in the equation here. We have
introduced this v expression in the equation
before. So, everywhere we can see this equation
in the dynamics of the, we have selected the
control tau to be like this h cap y minus
K r plus J transpose e plus v. So, this is
also called a design parameter which we want
to design in such a way that the disturbances
are removed. So, the design parameter v is
selected to be like, this p 1 constant we
are assuming and in the previous slide this
is a bound for this norm of w.
And, r is the vector which we have already
introduced and the denominator we are introducing
p 1 into norm of this vector r plus delta.
So, this delta is taken to be a differential
equation delta dot that is d delta by d t
equal to minus gamma delta with the assumption
that gamma this delta of 0 is positive number
and gamma is a positive constant. So, we can
easily see that if you solve this equation
we will get delta of t is nothing, but e to
the power minus gamma t into delta of 0. So,
if delta of 0 is positive number as t becomes
larger and larger e to the power minus gamma
t is becoming smaller and smaller it will
tend to 0 as t tends to infinity.
So, that is the aim of selecting this delta.
Delta becomes 0 as t tends to these are all
function of t. So, that is how we select the
function delta. Now, we substitute all this
in the end. So, that the tracking is done
in a proper way by avoiding all the disturbances
by learning the disturbances using neural
network. So, how to learn the weights? How
to update the weights as the time progresses?
So, we assume that the W cap is updated in
this particular way as given in this equation
W cap dot the derivative d by d t of W cap
that is given by this expression and V cap
dot is given by this expression; where this
F matrix G matrix, they are all positive definite
matrices. So, for simplicity we can take all
these matrices to be a diagonal matrix with
positive constants positive real numbers.
And, this sigma cap sigma cap dash all these
are defined already in this slide, here sigma
dashed is defined like this, sigma cap is
this and sigma cap dashed is denoted by this
expression.
So, by substituting these expressions we see
that there is a weight updation algorithm,
this is called weight updation algorithm.
So, as the time progresses we can keep on
updating the weight using this particular
procedure and how to prove that this particular
procedure gives a correct weight for tracking
the desired trajectory.
So that can be seen here, we take a Lyapunov
function L to be in this particular form,
you can see that all of them are positive
terms e transpose e it is nothing, but norm
of e square. And, this one is a positive term
because M is a positive definite matrix and
here F is a positive definite matrix therefore,
this is a positive value. The trace, trace
means the sum of the diagonal of this matrix
all of them are positive values here also
all these terms. Already we have seen that
delta is a positive function and gamma is
a positive number.
So, each and every term here all of them are
positive values and at the 0 values, when
we substitute all of them the e because it
is a function of e r w tilde and v tilde etcetera.
So, all the functions which are given here
are positive and when we put all of them to
be 0 we get the l value to be 0 at the origin.
Now, we differentiate this with respect to
time d L by d t and then substitute in the
place of e dot in the place of r dot and then
in the place of W cap dot and in the place
of V cap dot etcetera all the terms which
we have already introduced in the previous
slides.
So, substituting all the derivatives similarly
delta dot also in the previous slide we have
seen, all the substitutions and properly making
use of the trace property. Trace of a matrix
a is nothing, but sum of the diagonal elements
now we can make use of one property. So, if
we take r transpose s; where r is let us say
vector r 1, r 2, r n. So, r transpose is a
row vector and if s is s 1, s 2, s n. So,
we get a column vector s here. So, r transpose
s denotes r 1 s 1 plus r 2 s 2 etcetera. So,
it is same as the trace of s and r transpose.
If we take s is the column vector and r transpose
is row vector, if we multiply will get a matrix.
And if we take the sum of the diagonal of
this matrix it is same as nothing, but r transpose
s itself.
So, this property we will use here. So, they
will get canceled automatically, many terms
will get cancelled finally, we will get we
are left with only terms like this. The derivative
L dot is nothing, but minus e transpose alpha
e like this and then minus r transpose K r.
And, after canceling out all the terms using
this particular property we get remaining
terms to be only this much, these are the
few terms and we are assuming that v is selected
like this.
And, then if you cross multiply with these
terms further it is canceled norm of r square
into p p 1 square is canceled with r transpose
r is nothing, but norm of r square. So, and
multiplied by p 1 square so, that is canceled
here and we finally, get the terms to be sorry
like this. L dot we will get only this much,
it is less than or equal to minus e transpose
alpha e minus r transpose K r.
So, this is nothing, but minus of e transpose
alpha e plus r transpose K r. So, this is
a positive term because alpha and K both are
positive definite matrices. So, these two
are positive value with a minus sign. So,
we have that L is positive definite, L dot
is negative definite strictly less than 0.
So, this implies the system is asymptotically
stable using the Lyapunov theory. So, what
we get here is because of the Lyapunov theory
we get the system which we have considered
originally. The control system M r dot equal
to minus V r plus h of y minus tau plus T
suffix d with this disturbance and the control
is tau is controlled. And, it tracks the desired
trajectory using the control defined by this
expression as given here and the neural network
weights.
Because, the control involves a neural network
expression and the weights are updated using
this updated updating algorithm. And, we have
proved that the system is asymptotically stable
if we apply that particular control and hence
it proves that the system tracks the desired
trajectory successfully. As T progresses the
trajectory is tracked. So, this is a lengthy
procedure, even if we take a very simple example
of a two link manipulator this may be a very
complicated procedure.
And, this can be demonstrated only using a
computer program suitably written for a neural
network updating algorithm and assuming a
particular function for the disturbance and
then proving that the disturbances is avoided
using the neural network etcetera.
So, with this I complete the lecture on the
neural network based controller design.
Thank you.
