Skip to main content
Loading Explore guides…
Inverse Kinematics · Acedra
Home
Explore
Engineering
Inverse Kinematics
Sign in to save
Chat
If YouTube asks you to sign in, open the video on YouTube.
Watch on YouTube
Reload player
Transcript
710 segments
Copy
Hide video
0:12
Good morning, welcome back. So, we will start the discussion on inverse kinematics today.
0:18
In the last few classes we talked about the forward kinematics starting
0:24
from the coordinate the coordinate transformation
0:30
matrix and how do we go to identify the DH parameters and then using
0:36
DH parameters how do we get the transformation matrix and then use it for forward
0:41
kinematic analysis and we saw few examples in the last few classes
0:46
and see how to use the forward kinematics for getting them
0:52
position and orientation of a manipulator that can be expressed as a function of the
0:57
manipulator parameters the join parameter As a function of the manipulator parameters, the joint
1:03
parameters as well as the link parameters that is what we discussed. So, today
1:09
we will start the inverse kinematics problem, I briefly explain to you what is inverse
1:14
kinematics problem. So, we will see the details of this problem and how that can
1:19
be solved for manipulators. So, what we
1:24
going to cover in this is basically the problem definition.
1:30
The problem definition, so we will try to define what is the inverse kinematics problem
1:35
all about and then we will see something called solvability. So it is
1:41
not that necessary that always the inverse problem can be solved, so it can be
1:45
solved under certain conditions only. So we will see the existence of solutions
1:51
and then the problem of having multiple solutions. So some cases there will not be
1:55
any solution and in some cases there will be multiple solutions. So we need to
1:59
see what is that solvability. There will be multiple solutions, so we need to see
2:03
what is that solvability and then we look at the solution strategies,
2:09
there are different strategies to solve this. So, we look at the closed form solutions
2:14
and then algebraic or geometric solution and then we look into the I mean then
2:20
there is another method called the numerical solution, we will not go into the details
2:24
of numerical solution just for to tell you that that also is a method for
2:29
solving inverse kinematics, but we will be talking only about the. method for solving inverse
2:33
kinematics, but we will be talking only about the close form solution.
2:39
And then we go into the velocity relationship of course, that is not the inverse
2:44
kinematics part. So, we look into the velocity relationship that is the relationship between the
2:49
joint velocities and the tip velocities, where we discuss about the Jacobian and
2:54
singularity. And finally, we will talk about the statics also. So, the
3:00
force relationship under static So, the force relationship under static
3:06
condition. So, that is going to be the discussion for the next few classes.
3:12
Now, we already mentioned about the inverse problem.
3:18
What is the manipulator inverse problem? As you know, the manipulator
3:24
tasks are normally formulated in terms of the desired position and orientation. So, as I
3:29
told you, so I have an object here, I have an object here.
3:39
this is an object. Now, I have a coordinate frame assigned to this
3:45
object, so that I know the relative position and orientation of the object with respect
3:49
to the base of the robots. Now, my interest is to see how can I
3:54
use this robot to pick this object from here, I need to pick this object
4:00
from here and place it somewhere here, I want to place it somewhere here. and
4:04
place it somewhere here I want to place it somewhere here and I know this
4:09
position also so I can define this position where I want to reach so I
4:14
have this object in this position and I want to pick up this using this
4:19
robot so if I have to bring this tool to this
4:24
position what should be my joint angles is the
4:29
problem in inverse kinematics so that
4:34
In inverse kinematics, so that is the way normally all the manipulator problems are formulated.
4:41
So, in knowing the joint angle and get where to where will it reach the
4:45
forward kinematics is useful, but not in the practical scenarios like this.
4:51
Here we are interested to know what should be the joint angles to reach here
4:55
and similarly what should be the joint angles for the tool tip to reach here
4:59
to drop this point object here. So, that is what is the requirement in the
5:05
practical object here so that is what is the requirement in the practical application so
5:10
that is what says that they are normally formulate in terms of the desired position
5:14
and orientation so we have a desired position and orientation for the tool and we
5:19
want to know how can I reach the how can we reach that position and
5:22
orientation using the joints and that is that is the
5:28
inverse problem that is of interest to us so we have something from here to
5:33
pick and then place it somewhere else. So, how to reach this position. something from
5:37
here to pick and then place it somewhere else so how to reach these positions
5:40
are the interest to us and a systematic closed form
5:46
solution applicable to robots in general is not available that is this problem cannot be
5:52
generalized because each robot will be having its own way of reaching that position and
5:58
solving that position or getting the joint
6:03
positions to corresponding to that position cannot be generalized because of Positions to corresponding to
6:09
that position cannot be generalized because of the robot configurations we will see why the
6:14
what the problem is later but that is the problem here it cannot be generalized
6:18
and unique solutions are rare and multiple solutions exist.
6:24
So many times we will be having multiple solutions that mainly because suppose you have
6:30
a point
6:39
or assume that this object is here and you want to reach
6:45
here this point. So, you can actually reach from here, you can actually reach from
6:49
here and reach here or you can actually reach like this also. So, you can
6:54
actually have a elbow up or elbow down kind of a solution. So, this kind
7:00
of multiple solutions are very common in inverse
7:04
and because of
7:10
Okay and because of all these you have this inverse problem as a very difficult
7:14
than the forward problem. So, forward problem was very generalized for any set
7:20
robots configuration we can have a general solution and therefore, we are not able to
7:26
we are able to get a generalized solution. But in the case of inverse
7:31
this is not possible because of various reason which we will see
7:39
see later and unique solutions are not there. So, all these actually leads to
7:45
inverse problem as a complex one compared to the
7:51
forward problem ok. So, now if you
7:56
want to solve this inverse problem, so we can look at what is happening in
8:00
the forward relationship. So, we have this arm matrix which we discussed in the forward
8:14
tool in base coordinate frame as a function of joint variable q. So, now when
8:20
we do a forward kinematics for q is the joint variable here. So, q are
8:23
the q the set of joint variable then we can actually represent the position p.
8:28
So, this position vector p and its orientation or the end of this tool frame
8:33
can be represented using this rotation matrix and the position vector r q
8:39
and p q rotation vector. RQ and PQ rotation
8:45
matrix and the position vector can be used to represent this. Now what is this
8:51
P? P is basically the position of this point, position of this point
8:56
P and represented in terms of PX, PY
9:02
and PZ. So, we represent it as PX, PY, PZ and then we have a
9:07
relationship PX is something, PX, PY is something this is what we get in the
9:11
P x P y is something this is what we get in the forward relationship
9:17
and this will be a function of the Q. So, we know that it is
9:22
a function of Q depending on the type of robot it may be a function
9:26
of Q 1 to Q n and this also is a function of Q 1
9:31
to Q n. Similarly R also we have this as a vector I mean
9:36
3 by 3 matrix. So, you have the normal
9:42
So, you have the normal approach in sliding vectors. So, you can call it as
9:48
nx, ny, nz like that and each one also
9:54
we saw that this also is a function of joint variables. So, nx is equal
9:59
to function of joint variables, ny is a function of joint variables like that.
10:05
So, we have these equations available with us. Now, the question is how can we
10:10
actually How can we actually use px suppose we know
10:16
px how can I find q1 q2 q3. So, we have to start from the
10:20
forward relationship and then solve this relation to find out the q. So, that is
10:25
the requirement in inverse kinematics. So, given the desired position
10:31
p and orientation r of the tool find values for the joint variables q which
10:36
satisfy the arm equation. So, now if suppose this p is given to you now
10:41
you want this p to be reached here. You
10:47
say that this is the P which I want to reach and I have an
10:50
orientation like this. If this is known, if this P and this RQ
10:56
is known, how can I find this Q corresponding to this P and R? That
11:02
is the inverse problem. So, given a desired position P and orientation R for the
11:07
tool, find values for the joint variables Q which satisfy the arm equation. So,
11:13
this is the which satisfy the arm equation. So, this is the inverse
11:18
kinematics problem ok.
11:24
So, if I had to represent this relationship between the direct and inverse kinematics, you
11:30
can see that if you have the joint space parameters Q, if you know this
11:34
Q 1 to Q n that is we call the joint space, joint parameter or
11:39
joint variables. Now, we use the direct kinematics or the forward kinematics to get the.
11:48
tool configuration space R n which actually is the P and R
11:54
that is the position vector and the rotation matrix can be obtained. So, for any
11:59
value of Q you will be able to get the position and orientation using the
12:03
forward kinematics we call it as the tool configuration space. Now
12:09
if you apply this inverse kinematics to this suppose you have you know P and
12:12
R then You know P and R then you apply inverse kinematics
12:18
and you get the joint space variables. So, use this tool
12:24
configuration space information using inverse kinematics then get the
12:28
joint space is the inverse problem. So, you can see
12:34
that if we want to solve the inverse kinematics we need to have a direct
12:38
kinematics relationship because that direct kinematics relationship is the one which is used to solve
12:44
the inverse kinematics problem or we need
12:50
to know the forward relationship of the manipulator to solve the inverse kinematics and the
12:56
arm matrix should be known to us ok. So, now look at the
13:01
solubility of this relationship. So, as we know if P and R are known then
13:06
we can use some method to solve for Q. So, that is the inverse requirement.
13:12
Now, see how the P and R are represented. Suppose, we have this
13:18
relationship for the arm matrix, it says that px, py, pz
13:23
and nx, ny, nz, sx, xy,
13:29
the normal sliding and approach vectors, normal sliding and approach vector and the position vector
13:34
is the one which is given to us. Because we assume that we know this
13:38
or this is known to us and we want to solve for the joint
13:44
variables joint variables which corresponds to that one.
13:49
Now, in the case of normal case of forward kinematics, how is it represented? This
13:53
px, py, pz will be represented like this. For example, I taken one robot configuration
13:59
and for that robot, we will see that px is equal to this one and
14:05
py is equal to this one and pz is equal to this one. So, we
14:10
can see that there can be three relationship, three equations can be written for that
14:14
particular manipulator can be written for that particular manipulator, we
14:20
have a relationship at P X is equal to C 1 multiplied by something, P
14:25
Y is S 1 multiplied by something and P Z is 215 minus something okay,
14:30
so that is the three equation that you can have. Now similarly, we can write
14:35
A X is equal to minus C 1 S 2 3 4, A Y is
14:39
equal to minus S 1 S 2 3 4, A Z is equal to minus
14:42
C 2 3 4, so like this we will see that we can actually get.
14:47
So, like this we will see that we can actually get 9 equations from here
14:53
and 3 equations from here. So, we have totally 9 plus 3 12
14:58
equations from this matrix relationship. So, our matrix is given. So,
15:04
for P x is equal to this P y is equal to this like this
15:08
we have 9 plus 3 12 equations. And using this 9
15:14
plus 3 12 equations, we need to find the join variable. 12 equations
15:19
we need to find the join variables q1 to qn. So,
15:25
you have q1 to qn to be found out because if px is given
15:31
suppose I have px is equal to 170 and py is equal to 50 and
15:36
pz is equal to 50. Now, I have to write 170 is equal to this
15:40
50 is equal to this and 50 is equal to this and solve it to
15:45
find out what will be the values of theta 1 theta 2 etc which What
15:49
will be the values of theta 1, theta 2 etcetera which satisfy this condition. So,
15:54
that is the way how we need to look at this. So, we have 9
15:59
plus 3, 12 equations and n unknowns n may be 6
16:04
or 5 or whatever it is. So, we will see that there are 12 equations
16:09
and you have n unknowns to solve. So, things seems to be
16:14
simple because you have 12 equations
16:20
simple because you have 12 equations and you have only n unknown this n will
16:24
be normally 6 or 5 or whatever it is. So, that seems to be a
16:30
easy problem to solve. But if you look at closely this one you will see
16:36
that ok there are 12 equations and n unknowns and equal to 6 for a
16:40
6 axis robots. But if you look at closely this, these 3 equations you
16:46
can say PX, PY, PZ they are independent because you can actually place the robot.
16:51
p y, p z they are independent because you can actually place the robot in
16:55
the position the end effector can be placed anywhere in the x y z plane
17:00
within the work space so that it can be independent so p x, p y,
17:04
p z there is no relationship directly as long as where you want to place
17:08
it you can place. So you can actually get these three equations are independent they
17:12
have three independent equations here but this nine equations they are not independent.
17:19
The reason is that this actually represents three vectors. The reason is that this
17:24
actually represents 3 vectors, so this actually represents the normal vector,
17:30
sliding vector and approach vector and they are orthogonal and of course they are independent
17:36
vectors. But these 3 out of this nx, ny, nz they are not
17:41
independent ok, there is a relationship between nx, ny and nz to satisfy this condition
17:47
of the vector ok. So, nx square plus ny square plus nz square is equal
17:52
to 1. similarly
17:57
Sx square plus Sy square plus Nz square is equal to 1 and Ax square
18:02
plus Ay square plus Nz square is equal to 1. So, that is the unit
18:05
vector the three orthogonal directions. So, these three equations that you are seeing here
18:11
these three equations are not really independent and similarly these three equations are not independent
18:17
these three are not independent. So, effectively we have only one equation from here
18:23
which is independent. Effectively we have only one equation from here which is independent and
18:28
this is only one equation from here and this one equation here. So, we can
18:32
have only 3 independent equations from the rotation part. This rotation
18:38
matrix gives you 3 independent equations though we have 9 equations since they are not
18:44
independent what we can see is only 3 independent equations. So these 3 independent
18:49
equations from this part and then 3 independent equations from This part and then 3
18:55
independent equation from the positioning part give you totally 6 equations.
19:03
So, you can actually get 6 independent equations from the arm matrix.
19:09
So, using the arm matrix you will be able to get 6 independent equations to
19:13
solve for the n variables. So, we have 6 equations now we have
19:19
n variables. So, if the n is equal to 6 or less than 6,
19:29
we can solve the problem. But when n is equal to 7, you would not
19:33
be able to solve because you have only 6 equations and 7 unknowns cannot be
19:37
solved. So, you need to choose one of this you have to select and then
19:42
you have to get other 6. So, that actually leads to multiple solutions depending on
19:47
the values of the first assumption. So, effectively we have only
19:52
3 independent equations and 3, 6 independent
20:00
equations and n unknowns and non -linear they are non -linear equations and then difficult
20:05
to solve. So, 6 independent equations and n unknowns and non -linear equations. So, we
20:11
need to solve them in order to get find out the joint variables, but they
20:15
are not that easy to solve because they are non -linear equations and
20:21
when n is more than 6, again you will have difficulty. So, that is the
20:31
difficulty with the inverse kinematics or that actually tells you the solvability aspect of
20:36
the inverse problem. We have 6 independent equations and n unknowns
20:42
and the relationships what you are seeing here are the non -linear equations
20:48
and not that easy to solve. Now, we have to see how
21:00
So, first thing we look at this is there a solution existing or not. So,
21:05
we know that there are 6 equations and 6 unknowns suppose it is 6 n
21:08
is equal to 6. So, we have 6 equations and 6 unknowns. So, we can
21:13
actually solve the equation that is possible but
21:17
whether there is a solution existing or not if there is a solution existing then
21:23
only we can solve then only we can solve it.
21:28
So, if we have to solve using the 6 equation first thing we need to
21:32
ensure is that yes there is a solution existing for it and therefore start solving
21:38
it and how do we ensure that there is a solution existing? So, we look
21:43
at this a manipulatory solvable if all the sets of joint variables can be found
21:48
corresponding to a given end effector location. So, a location is given to you and
21:54
if you can find all the And if you can find all the joint angles
22:00
corresponding to that location then we call it as a solvable one that means you
22:04
need to get all the sets of joint variables which can actually reach to that
22:10
position and orientation. So, then if we can find it then we call it as
22:14
a solvable. Now there are few conditions
22:20
under which we can say this is possible ok. So, not all positions
22:28
All positions are solvable and there are some position which cannot be sold also. So,
22:33
first we look at what is the necessary condition to have a solution that is
22:38
if you want to have a solution what is the minimum condition to be satisfied,
22:44
what is the necessary condition to be satisfied. The first point is that suppose you
22:49
have a robot like this
22:50
suppose this is the robot and I
22:56
will say its workspace is something like I will say it is work space is
23:01
something like this ok I am just roughly mentioning ok this is the work space
23:07
that the robot is now as a programmer I may not be knowing that
23:13
what is the work space it can reach or what is the all the points
23:16
I may not be knowing suppose I give a position here maybe it may be
23:22
possible to solve but if I have say that ok I want to reach this
23:27
position then it is definitely not possible to reach this position. want to reach this
23:31
position then it is definitely not possible to reach this position because it is beyond
23:35
the work space of the manipulator. So, the necessary condition to have a solution is
23:40
that it should be within the work space that is without that condition you cannot
23:43
never can never solve the problem. So, first condition is that the tool point within
23:49
the work space. So, the tool point what you have want to solve should be
23:53
within the work space that is the first condition. Now,
23:58
we know that if I want to reach this position
24:05
I will be able to reach this position and if I want to get a
24:09
particular orientation also. So, I need to have a orientation decide orientation at decide
24:15
position then I know that there should be 3 degree of freedom for
24:21
positioning and I need to have another 3 degree of freedom for
24:26
orienting that means I can get any orientation and any position and within the workspace
24:32
you. I can get any orientation and any position and within the workspace using this
24:36
3 plus 3 degree of freedom that is 6 degree of freedom. Suppose I have
24:41
only 5 degree of freedom suppose I do I do not have I mean I
24:45
have only 5 degree of freedom then it is clear that I would not be
24:49
able to reach the orientation needed I can use the first 3 degree of freedom
24:53
to reach the position but then I have only now left with only 2 degree
24:58
of freedom out of 5 3 used for positioning. So, I have only 2 degree
25:02
of freedom for orientation. out of 5, 3 used for positioning. So, I have only
25:06
2 degree of freedom for orientation. That means I would not be able to get
25:09
all the orientations, I can control 2 orientation and the third one will be depending
25:13
on the 2. So, I cannot really say all the 3 orientations I want and
25:18
then only have only 5 degrees of freedom, it is not possible, then you would
25:21
not be able to solve. So, that is the condition if n is greater than
25:24
overall 6 to have any arbitrary orientation. So, if I had to have any arbitrary
25:29
orientation of the tool, I need to have minimum 6 degrees of freedom or more
25:33
than 6 degrees of freedom. I need to have minimum 6 degrees of freedom or
25:37
more than 6 degrees of freedom, so if n is equal to 6 or more
25:41
then I can have all the arbitrary orientation and if I have only 5 degrees
25:45
of freedom then I say that I need to get all the orientations it is
25:50
not possible that means I would not be able to solve for any arbitrary orientation
25:55
if there is a there is only 5 degrees of freedom or number of degrees
26:00
of freedom is less than the less than 6. So, that is the second condition.
26:09
necessary condition to have the solution. So, first condition is that the tool
26:15
point should be within the workspace, the second condition is that n should be 6
26:19
if I want all the orientations achieved.
26:25
Now another condition is that the tool orientation is such that none of the joint
26:29
limitations are violated. So, all the physical all the robots will be having some physical
26:34
limitations All the robots will be having some physical limitations in joint movement.
26:40
So, whether your wrist will be having roll, pitch and yaw
26:46
axis and each one will be having some joint limits okay. So, maybe roll can
26:51
have all the 360 degree but pitch and yaw cannot have 360 degree rotation because
26:55
of the physical limitation. Now if your orientation says the orientation what you
27:01
want actually can be achieved if Actually can be achieved
27:07
if the joint limitations are violated or we will be getting a solution but if
27:11
you say that the joint has limits then you would not be able to get
27:15
the or the desired orientation. So, we need to ensure that the tool orientation is
27:19
such that none of the joint limitations are violated. So, in these three conditions these
27:24
three necessary conditions to be satisfied if you want to get a solution or you
27:29
to have a to make the manipulator solvable.
27:41
that is the necessary condition. So, there are two kinds of solutions. So,
27:47
if you know that this necessary condition is satisfied, then we can actually solve for
27:51
this. We can solve for the solutions. And the two methods of solutions are one
27:57
is known as closed form solution and the other one is numerical solution. So, closed
28:01
form solution is that you can use the algebraic expression or the analytical expression that
28:06
you already developed. using a
28:12
forward kinematics. So, you can use these analytical expressions and solve for it that is
28:17
basically known as the closed form solution. So, the analytical method can be used to
28:22
get a solution then we call it as a closed form solution.
28:28
So, analytical method can be either this equations or you can have a geometrical method
28:32
also. So, two methods are there either you directly solve this algebraic equations or you
28:38
go for a Either you directly solve this algebraic equations or you go for a
28:42
geometrical approach and then find out the possible joint angles which will
28:48
provide the position and orientation. So, that is the closed form solution and the other
28:54
one is known as the numerical solution where you do an iterative search and then
28:58
find out the solution. So, you start with some value for each joint angle
29:04
and then search all other joint angles which will actually lead to the decide. all
29:10
other joint angles which will actually lead to the desired position and orientation. And if
29:15
you do a search and at some point you will find that how this meets
29:19
the requirement. So that is the numerical methods which is an iterative and time consuming
29:24
methods. So, whenever the closed form solution is not possible we have to go for
29:30
time consuming method of numerical solution. Similarly, when you have large number of degrees
29:36
of freedom you have freedom you have
29:41
multiple solutions then also you may have to go for a numerical solutions to get
29:47
a most feasible solution. So, how do we know whether there is a closed form
29:52
solution existing or not that is the second question. So, the first question was that
29:57
okay whether it can be solved or not now if it can be solved which
30:02
method to be used whether we go for a closed form solution or a numerical
30:06
solution and to get this closed And,
30:12
to get this closed form solution we call there is a sufficiency condition we say
30:17
that there is a sufficiency condition to get a closed form solution. So, any manipulator
30:23
can be solved for its inverse using closed form methods if
30:29
it satisfy the conditions given here that is known as a sufficiency condition.
30:35
The sufficiency condition says that if three adjacent joint axis are intersecting
30:40
or three adjacent joint axis are intersecting or 3
30:46
adjacent joint axis are parallel to one another then we will be able to
30:51
solve the inverse kinematics using the closed form methods.
30:56
And if this condition is not satisfied then you would not be able to solve
31:01
it using a closed form method you need to go for a a numerical methods
31:06
that is the situation or that is the condition let us say sufficiency condition.
31:12
situation so that is the condition that say sufficiency condition where you can solve this
31:18
using closed form methods. And what does it says suppose you have
31:23
this axis like this you have one axis here one axis here and
31:29
one axis joint here and all the joint axis are parallel
31:33
then all the adjacent joint axis ok so all the adjacent joint axis
31:39
are the three adjacent joint axis are parallel then you can. These are the three
31:44
adjacent joint axis are parallel then you can have a closed form solution. Otherwise
31:50
if the three adjacent joint axis suppose you have one axis here and then one
31:55
axis like this and one axis at this point which actually again intersect the
32:01
these three. Suppose you have one axis and another axis here which actually like this
32:06
then these three axis are intersecting if the three adjacent joint axis are
32:12
intersecting then you will If the three adjacent joint axis are intersecting then you will
32:18
be having a closed form solution. So this is the necessary sufficiency
32:23
condition to get a closed form solution. So whenever you get a manipulator to be
32:27
solved for inverse kinematics first thing you need to check is whether the closed form
32:32
solution existing or not. If the closed form solution is not existing then you would
32:36
not be able to solve it using algebraic or geometric method you
32:45
numerical method only and from where this condition comes that you can
32:50
actually see later when we try to solve. So, probably if you remember the
32:55
forward kinematic relationship if there are three adjacent joint axis you might
33:01
have seen that it actually comes like theta 2 plus theta 3 plus theta 4
33:06
format or we write it as theta 2, 3, 4. So,
33:12
that is the form it was coming in the arm matrix or the arm. So,
33:16
that is the form it was coming in the arm matrix or the arm equation
33:20
and that is the reason why we need to have this kind of parallel axis
33:24
so that you will be getting it in the this format. So, it can actually
33:27
be solved if they are not this way then you will be getting 2, 3
33:31
and then theta 4 as another one then you have to solve for 2, 3
33:35
and 4 separately that actually leads to problem in the solution. So, this will be
33:40
more clear when we try to solve the equations but the relationship comes
33:46
But the relationship comes from this, this condition comes from that
33:52
relationship developed or that actually happens in the forward kinematics.
33:58
Similar is the case with the intersection also intersecting the joint axis
34:02
okay. So these are the necessary and
34:07
sufficiency condition for getting the solution. So necessary condition for existence
34:13
of solution and sufficiency condition for existence of
34:21
closed form solution okay. And
34:27
as I mentioned there will be multiple solutions so when it is a redundant
34:33
robots so when you have n is equal to 7 or more then we call
34:38
it as a redundant robots because what you need in space is 6 degrees of
34:42
freedom and if you have more 7 degrees of freedom or 8 degrees of freedom
34:45
controllable degrees of freedom then it becomes a redundant robot. of freedom or 8 degrees
34:49
of freedom controllable degrees of freedom then it becomes a redundant robot. So, whenever the
34:54
robot is redundant then you have multiple solutions because you can only 6 only you
34:59
can solve. So, 7, 8 and all you need to make assumptions and then for
35:03
each value of theta 7 or theta 8 you have to find for theta 1
35:07
to theta 6. So, that actually leads to large number of multiple solutions.
35:15
And another one is the elbow up and elbow down solution which I already mentioned.
35:19
So, you have an elbow up solution
35:24
like this. So, you can actually reach this position from here or you can actually
35:29
reach the position from here and this is the elbow up or elbow down solution
35:34
that also leads to multiple solutions.
35:39
So, always there is no unique solution you will be most of the time you
35:44
will be having multiple solution for the inverse problem.
35:50
The inverse problem that talks about the
35:55
basic requirements for the system to be solvable. Now as I told
36:01
you in the closed form solution algebraic and geometric approach is there. So the algebraic
36:06
approach is obtain the equations from the matrix so the 12 equation that we already
36:12
mentioned so obtain the matrix equations the scalar equation from the matrix
36:17
and then try to solve them that is the algebraic approach. and then try to
36:22
solve them that is the algebraic approach okay and in this so at this
36:28
geometric approach we will not be discussing because geometric approach normally more of a graphical
36:34
approach so you know the position and orientation to be reached and you know the
36:37
link length and other orientation other parameters so you try to geometrically
36:43
construct the manipulator position and
36:49
orientation to see what position or in position Later position and orientation to see what
36:54
position or position of this joints will actually reach the required position
37:00
and then find out the joint angles corresponding to that. So we will not be
37:04
going to that part we will be looking only at the algebraic approach. So here
37:09
we do this by getting the scalar equations from the matrix form. So as I
37:15
mentioned there will be 12 equations so we can actually write down 12 equations
37:19
using the matrix that is
37:27
the arm matrix. Now, these two dual equations always in the I mean
37:33
there are non -linear equations and it consists of rectometric
37:38
identity parameters and therefore, we need to use some tricks to
37:43
solve them. So, they cannot be solved easily there are lot of difficulties in solving
37:48
this dual equations. So, we use some trigonometric identities.
37:53
So, we use some trigonometric identities to combine two
37:59
equations first square them and then add them and then eliminate certain variables. So, there
38:03
are different tricks to be used for example you have something like A cos theta
38:08
plus B sin theta and then so you can A1
38:14
B1 like this and then probably you can actually when you add them cos square
38:17
theta plus sin square theta will come and then you will be able to eliminate
38:21
some of these parameters Eliminate some of these parameters that is what actually
38:27
says such as first square them and add them and eliminate certain variables. So, the
38:33
trigonometric identities are like sin square theta plus cos square theta is equal to 1.
38:37
So, such trigonometric identities can be used and we can actually get them by combining
38:42
equations. So, you square them add and you will get this and then you can
38:46
eliminate some of the variables that is the trick one which we can use.
38:51
And then the trick to be used is that you use the substitute. And then
38:56
the trick to be used is that you use the substitution. So, you can substitute
39:02
for this trigonometric variables with some other and then convert
39:08
them into polynomials. So, the trigonometric equations can be converted to a polynomial
39:13
and then solve the polynomial that is another way to solve it. So, for example,
39:18
you substitute u is equal to tan theta by 2, then cos theta can be
39:22
written as 1 minus u square by 1 plus u square and sin theta can
39:26
be written as. 1 minus u square by 1 plus u square and sin theta
39:30
can be written as 2 u by 1 plus u square and then whenever the
39:34
cos theta sin theta is coming you substitute these parameters and these values and
39:39
then convert that into a polynomial equation and then solve the polynomial and then get
39:45
the theta. So, finally we need to get the theta that is the trick too
39:50
and then another trick to be used is that find out expression for both sin
39:55
and cos of a joint angle theta. That find out expression for both sine and
39:59
cos of joint angle theta, so you write sine theta you find out what is
40:04
sine theta, suppose you want to sine theta 1 is equal to k and then
40:08
you find out cos theta 1, so cos theta 1 you try to write it
40:14
as square root of 1 minus k square, so that will be cos theta 1,
40:18
so you have sine theta 1 and cos theta 1 and then use a function
40:23
called a tan 2 to get the theta value.
40:32
So, a tan 2 cos sin theta cos theta. So, we write it as a
40:37
function called a tan 2 function normal r tan is not used but instead we
40:41
say a tan 2 function and that can actually give you a unique expression for
40:46
theta. So, when you use the normal r tan so theta can actually be anywhere
40:52
here but then when you use r tan it will not clearly tell in which
40:56
quadrant it lies because r tan value will be. It will not clearly tell in
41:00
which quadrant it lies, because arc tan value will be same but the quadrant will
41:04
not be specified. But if you use an arc tan 2 function, A tan 2
41:08
function, you will be able to clearly tell which quadrant it lies. So, you will
41:12
be able to get the theta value uniquely defined using arc tan 2 function. I
41:18
will explain this when we consider the examples of how to use the arc tan
41:21
2 function, what is the importance of arc tan 2 function in solving these equations.
41:29
So, to solve this equation we need to use some of this trigonometric identities or
41:34
trigonometric tricks which actually helps us to simplify the
41:39
equations and then solve them without much of difficulty.
41:45
So, that is about the method or the way to solve the thing the
41:51
inverse problem. So, let us take a very simple example of a a 2 degree
41:55
of freedom planar. The simple example of a 2 degree of freedom planar
42:01
manipulator ok. So, this planar manipulator
42:06
is given with link length L1 and a link length L2 will say and this
42:12
one is assume that this one is theta 1 and this one is theta 2
42:15
and as I mentioned the first thing to in order to
42:21
solve the for the inverse kinematics you need to have the forward kinematics relationship kinematics
42:26
relationship and that will give you the matrix.
42:32
So, we will do the same process we assign the coordinate frame x0, y0, x1,
42:37
y1, x2, y2, etcetera and then see how to get the forward
42:43
kinematics. So, now we need to get this forward relationship,
42:49
so I can take this as px, px1 and okay this is for, so
42:55
the px is actually this one. ok this is for so the p x is
43:00
actually this one so this is the p x and then this is the p
43:04
y ok so this being a simple
43:10
2 degree of freedom planar manipulator will be able to write this p x and
43:14
p y very easily so p x can be written as l 1 cos theta
43:19
1 plus l 2 cos theta 1 2 similarly p y can be written as
43:25
l 1 s 1 plus l 2 can be written as L1 S1 plus
43:30
L2 S12. Now, we need
43:36
to solve for theta 1 and theta 2. So, we need to find out for
43:40
any value of px and py how can you get theta 1 and theta 2.
43:44
So, that is the position part. So, we are looking only the positioning part here
43:49
just to give the feel of how do we solve it. So, theta 1 and
43:54
theta 2 is to be solved. So, here is equation 1 and this is equation
43:58
2. is to be solved. So, here is equation 1 and this is equation 2.
44:03
Now, how do we solve for theta 1 and theta 2 because we have only
44:06
these 2 equation l1 c1 and l1 l2 c12 l1 s1 plus l2 s12.
44:12
So, what we do we will try to see some of the we will try
44:16
to use some of the tricks to solve this. So, one of the tricks is
44:21
basically to square and add these 2 equations. So, if I write down as p
44:25
x square plus p i square.
44:31
plus pi square. So, if I square and add them then I will be able
44:37
to write this as like this px square plus py square is equal to l1
44:41
square plus l2 square plus 2 l1 l2 c2 because l1 c1 square and l2
44:46
c2 l1 l1 s1 square will actually become l1 square
44:51
and similarly get l2 square plus 2 l1 l2 c2 and we can get
44:57
c2 as px square plus py square minus l1 square.
45:04
by L1 square, L2 square to L1 L2. So,
45:10
we have solved for C2. So, once we have
45:16
C2, we can find out theta 2, we need to find theta 2. So, instead
45:20
of using directly cos inverse, we do not use a cos inverse to get
45:26
theta 2, because that will not tell you in which quadrant the theta lies, because
45:35
at the 4 quadrants we want to clearly get which quadrant theta is lying and
45:40
therefore, what we do we will try to find out S 2 from here. So,
45:45
S 2 can be obtained as square plus or minus square root of 1 minus
45:49
C 2 square that is the way how you can get the S
45:55
2 and once we have S 2 and C 2 then we get theta 2
45:59
as a tan 2.
46:04
S 2 C 2. So, this is the way how we can
46:10
get theta 2 and why we are going doing this because as I mentioned the
46:14
function A tan 2 A tan 2 denotes a 4 quadrant version of arc tan
46:20
function ok. It allows us to recover angles over the entire range of minus pi
46:25
to pi. So, it will clearly tell between pi and minus pi what is the
46:30
value ok. and
46:36
how is it doing this a tan 2 function so if suppose it a tan
46:40
2 x y so if you take a tan 2
46:42
x comma y so it will look at the
46:48
values of x and y and then decide which coordinate lies so if x and
46:54
y are 0 then it is indefinite x is greater than 0 y is equal
46:58
to 0 then a tan 2 is 0 then x greater than less than to
47:03
0 then eta n 2 is 0 then x greater than less than 0 sorry
47:08
yeah less than 0 and y is 0 then eta n 2 is pi and
47:12
if y is less than 0 then minus pi eta n 2 is 0 it
47:16
lies between 0 and minus pi if y greater than 0 then it is between
47:20
pi and 0 and pi so this way it clearly tells you which quadrant it
47:25
lies between 0 and minus pi or minus pi and 0 and pi or 0
47:30
and minus pi. So, this way you will be able to get.
47:37
the theta clearly defined within this 4 quadrants. So, that is why
47:43
we go for a tan 2 function instead of going for a
47:49
cos inverse or a sin inverse or simple a tan function. So, this is the
47:54
way how we need to get theta 2. So, we will get theta 2 using
47:58
the a tan 2 function. So, S 2 is plus or minus
48:04
square So, s2 is plus or minus square root of 1 minus c2 square and
48:09
theta 2 is a tan 2 s2 c2 and now we can see because there
48:14
will be two values for s2 you can get two values for s2 so one
48:18
is for plus and one is minus now you will be getting two values for
48:22
theta 2 also you will get theta 2 for one value of s2 and theta
48:26
2 for another value of s2. Now if both the values are actually lying within
48:30
the joint limits of the manipulator then you have to take both the values as
48:35
a solution. join limits of the manipulator then you have to take both the values
48:38
as a solution and if one is outside the join limit then you can eliminate
48:44
and then proceed to select the find the next join angle. But if
48:49
both are in the join limits somehow both happens to be in the join limit
48:55
that shows that there can be 2 ways theta 1 value and theta 2 in
49:00
this case and you have to use both the values for solving the next join
49:04
angle. So, you will be getting multiples. both the values for solving the next joint
49:08
angle. So, you will be getting multiple solution that way. So, that is how do
49:12
you get, who you get the theta 2. Now you need to solve for theta
49:16
1. So, you have to substitute for this P x value P x L 1
49:21
C 1 plus L 2 C 1 2 that relationship and then solve it for
49:25
the joint angle next joint angle, ok. So, we will
49:31
take a more complex one and then go to the.
49:37
solution, okay this one I just wanted to tell you how do you use the
49:43
the tricks to solve for the joint angles. So, we will see look at the
49:48
solving for theta 1 and other joint, I mean if you have more joint angles
49:52
how do you solve. So, we will take more complex problems and then try to
49:55
solve it, okay. So, this is the the 3 degree of freedom
50:01
case. So, we assume that there is another joint here which actually So, we assume
50:07
that there is another joint here it is actually projecting out in this manipulator is
50:12
projecting out from the plane and with the distance d3 and then you have this
50:17
other joints 1, 2 here joint 1, joint 2 and you
50:23
have another joint ok. So, here since it is
50:29
projecting out and there is no other thing so, the orientation will be given by
50:34
this so, always the axis is always vertical. be given by this. So, always the
50:39
axis is always vertical. So, you will be having nx, sx, ny, sy and
50:44
001, 001 as the orientation matrix. The orientation of the tool will be always in
50:50
this format, nx, ny, sx, sy and the position will be px, py, pz.
50:56
So, px, py is the position this, pz is because of the D3 which is
51:00
projecting up. Now, if you have to solve this problem,
51:06
we will see. So, first we will see. So, first If you have to solve
51:09
this problem we will see, so first we will assign the coordinate frame x0, y0,
51:14
x1, y1 and x2, y2 and then the tool tip will be
51:20
having the final coordinate position x3 which is actually projecting out.
51:26
So, you can see P z will be always d3 because it is projecting out
51:31
and then it is actually rotating, so it will be d3 distance P z. So,
51:38
is that, so you can actually find out the parameters here
51:44
the dh parameter, so first we need to solve the
51:49
forward kinematics, so to solve the forward kinematics we will find out the parameters
51:55
a, d, alpha and theta, so here is l1, l2 is a and
52:00
d3 is this is 3 and then alpha is 0 because all the joints are
52:06
axis are parallel and the. joints are axis are parallel
52:11
and theta is a variable so theta 1 theta 2 their variables.
52:17
Now if you write this forward relationship using the transformation matrix you
52:23
will be able to find out the forward relationship or the arm matrix it will
52:29
be like this so your p x will be l 1 c 1 plus l
52:32
2 c 1 2 as we saw in the previous case also p y will
52:36
be l 1 s 1 plus l 2 s 1 2 and p z will
52:39
be d 3. will be L 1 S 1 plus L 2 S 1 2
52:42
and P z will be D 3. So, this will be the position vector for
52:48
the tool for this coordinate frame position will be given by this relationship L 1
52:53
C 1 L 2 S 2 L 1 S 1 plus L 2 S 2
52:56
1 2 and D 3. Now, the orientation will be given by this 3
53:02
the matrix C 1 2 3 minus S 1 2 3 S 1 2 3
53:06
C 1 2 3 0 0 1 and you have this 3.
53:15
equation Px, Py, Pz and Nx, Ny, Sx, Sy. So, you have 4
53:21
plus 3, 7 equations are there what you need to solve is theta 1, theta
53:26
2 and theta 3, you need to solve for theta 1, theta 2, theta 3.
53:31
So, you have this 3 equation plus 2 equations here, so 5 equations are there.
53:36
So, we can actually solve it easily and we will write
53:42
this. one relationship now. So, Px
53:48
we will write Px is equal to this Py is equal to this Pz is
53:53
equal to this and then we will write Nx is equal to C 1 2
53:59
3 Ny is equal to S 1 2 3 etcetera
54:04
ok. And similarly Sx is equal to minus S 1 2 3 Sy is equal
54:09
to C 1 2 3. So, this way we will write this relationship. . equal
54:13
to C 1 2 3. So, this way we will write this relationship and
54:19
then we will try to solve it. So, as we saw in the previous case
54:22
also, so P x will be getting L 1 C 1 plus L 2 C
54:26
1 2 P y is L 1 S 1 plus L 2 L 1 S
54:29
1 2. So, if you square and add them you will be able to get
54:32
theta 2. So, theta 2 can be solved and
54:38
so theta 2 can be solved using this method and then theta 1 2 3
54:42
can be solved using this relation. be solved using this method and then theta 1
54:46
2 3 can be solved using this relationship because you have C 1 2 3
54:51
and S 1 2 3. So, you can actually use that one to find out
54:54
A tan 2 C 1 2 3 and S 1 2 3 you will be
54:58
getting theta 1 2 3. So, theta 1 2 3 can be solved and theta
55:04
2 can be solved in these two. So, theta 2 can be solved directly from
55:09
here and theta 1 2 3 can be solved from here that we we saw
55:13
how to get theta 2 in the previous case. can be solved from here that
55:16
we saw how to get theta 2 in the previous case and theta 1, 2,
55:20
3 can be easily solved from here. Now the question is how do you get
55:23
1 and 3? So these are the relationship you have Nx,
55:29
Sx, Ny, Sy and Px, Py. So we have this 6 equations written here.
55:36
Since Pz is equal to constant we did not write that as a separate equation.
55:41
Now squaring and adding 5 and 6 we get theta 2. So we know C
55:45
2 can be obtained. During and adding 5 and 6 we get theta 2. So,
55:48
we know C2 can be obtained and by using the same method that we discussed
55:53
in the previous example, we can get theta 2 as A tan 2 S2
55:59
C2. So, theta 2 can be obtained. Now, using the other equation we will be
56:04
able to, so this one I already explained how do you get, how do you
56:08
use A tan to get the theta 2. We
56:15
actually solve this 5 and 6 for theta 1. So, now
56:20
theta 1 is to be solved, so theta 1 cannot be directly solved. So, we
56:25
need to have a substitution here. So, what we do? We do a substitution here
56:30
saying that P x is equal to K 1 C 1 minus K 2 S
56:34
1 and P y is equal to K 1 S 1 plus K 2 C
56:39
1 where K 1 is equal to L 1 plus L 2 C 2 and
56:43
K 2 is equal to L 2 C 2. So, we will make a substitution.
56:46
plus L 2 C 2 and K 2 is equal to L 2 C 2.
56:49
So, we will make a substitution like this K 1 is equal to L 1
56:53
plus L 2 C 2 and K 2 is equal to L 2 S 2
56:58
and when you do this substitution then we can write P X is equal to
57:03
K 1 C 1 minus K 2 S 1. So, the previous P X equation
57:06
can be expressed like this because of this substitution and then
57:12
we write down we are down we are again
57:18
substitute k1 is equal to r cos gamma k2 is equal to r sin gamma
57:23
where r is equal to k1 plus k2 k1 square plus k2 square root and
57:28
gamma is a tan 2 k2 k1 so this kind of a substitution is needed
57:33
in order to solve for s1 because we have this the
57:39
relationship px is equal to l1 c1 plus l2 c12 so to solve that one
57:45
we need to have a substitution So, to solve that one we need to have
57:49
a substitution like this and when you do the substitution we will get it as
57:54
P x by R is equal to cos gamma cos theta 1 minus sin gamma
57:58
sin theta 1 and P y by R is equal to cos gamma sin theta
58:02
1 plus sin gamma theta 1 and from there we can get cos gamma plus
58:08
theta 1 as P x by R sin gamma plus theta 1 as P y
58:11
by R and since we know gamma. So, gamma is actually given as.
58:18
gamma so gamma is actually given as a tan 2 k 2 k
58:24
1 and k 2 and k 1 are known because k 2 is known l
58:27
2 s 2 k 1 is l 1 plus l 2 c 2 both are
58:30
known we will be able to get gamma and then we will get cos gamma
58:34
plus theta 1 as p x by r and the n sine gamma plus theta
58:37
1 as p y by r and using these two relationship we will be able
58:41
to get cos the theta 1 as so gamma plus theta 1 can be
58:47
obtained as a tan 2 p a So, gamma plus theta 1 can be obtained
58:51
as A tan 2 P y by R P x by R and so A
58:55
tan 2 is P y by P x, you can R is constant. So, you
58:59
can write gamma plus theta 1 is A tan 2 P y P x and
59:04
therefore, theta 1 is A tan 2 P y P x minus A tan 2
59:09
K 2 K 1, K 2 and K 1 are known and therefore, theta 1
59:13
can be solved. So, this is the way how we can get theta 1 is
59:17
solved and once theta 1 is solved then theta 2, theta 1 is solved and
59:20
theta 2 is solved. We can get theta 1 sold and once theta 1 is
59:23
sold then theta 2 is already sold and we can get theta 1 2 3.
59:26
So, theta 1 2 3 can be obtained as at n 2 n y n
59:29
x as I mentioned and theta 3 can be obtained as theta 2 1 1
59:34
2 3 minus theta 1 minus theta 2. So, this is the way how we
59:38
can solve. So, we have solved for theta 2 theta 1 and theta 3 here.
59:43
So, all the joint angles have been solved for the this particular robot. So, this
59:49
is the way how we solve the
59:55
inverse kinematics problem for manipulators. So, you may find it little bit difficult
1:00:01
that you have to do lot of substitution here. So, how do we know what
1:00:05
kind of substitution to be made and this can actually be solved by a I
1:00:09
mean can be addressed by a different method where we do not really solve all
1:00:14
these we will use some standard trigonometric equations and then we can solve it. So,
1:00:18
we will discuss So, we will discuss that in the
1:00:23
next class how can we use standard methods to solve the inverse kinematics without going
1:00:29
for too many substitutions. We will discuss that the method of solving
1:00:35
in a simple way and we will see few more examples in the next class.
1:00:40
Thank you.
Here to help you learn
Sign in to keep a private conversation with your course tutor.
Ask me anything about the material…
Sign in to chat