So, when we use a mechanism there is an input
or a set of inputs which are actuated and
an output. Now, we need to relate these inputs
to the output. There are various requirements
for example, if I ask, if I need this output
what should be my inputs this is one kind
of relation I see; or if I specify the inputs
what should be the or what will be the output.
So, in today’s lecture we are going to look
at these issues.
This problem is known as the displacement
analysis problem. We are going to define and
look at problem of forward and inverse kinematics.
So, displacement analysis has these 2 problems
forward kinematics and inverse kinematics
and we are going to restrict ourselves today
to this 4R chains forward kinematics of a
4R chain.
So, displacement analysis as I just now mentioned,
that we like to know the input output relation
we know that a mechanism transforms the actuator
inputs to certain motion outputs there can
be multiple inputs, but usually there is one
output. So, this input output relations is
what is the subject matter of displacement
analysis.
So, inputs are the actuator displacements
for example, in case of a rotary motor what
is the angle by which the motor rotates. In
case of a hydraulic actuator it will be what
will be the throw or extension of the hydraulic
actuator. So, these are the inputs. The output
would be in terms of the link displacement.
So, output link displacement this could be
an angle, it could be position and orientation
like in a robot, combination therefore, of
linear and angular displacements. So, these
are the outputs or output.
Determination of this displacement input output
relation is what we are going to study under
displacement analysis. So, let us look at
this example. So, here I have an example of
scissor that is used or a clamp maybe it is
used for laparoscopic surgery so we have the
surgeons finger operating, this handle, this
handle can be considered to be fixed. So,
when I change this angle when the input angle
input link moves by this much angle from this
configuration to this dashed configuration
how much is the output motion of the clamps.
This is one kind. Here I have shown you the
landing gear mechanism of an aircraft, if
I expand this actuator then as I have shown
you this rotates this link rotates the turnery
and that folds the wheel or the wheel ink.
So, the question is how much should this actuator
expand. So, that the wheel gets completely
folded.
Now, in case of robots remember robots are
mechanisms with degrees of freedom 2 or more.
Now, as soon as you have 2 or more degrees
of freedom you have that many actuators, and
you can control the displacement of the output
of the robot. So, for example, you can control
the motion in x direction and the motion in
y direction let us say. So, 2 degrees of freedom,
I can control these two.
Now, successive because these two are independently
controllable, I can if I want to go from this
point to this point, I can choose to go like
this or I can choose to go like this or I
can choose to go in this manner, so successive
displacements of the output generates a path.
Now, in case of robots therefore, this displacement
analysis is about finding the actuator inputs
so that it can generate a certain path.
So, the path is of the output link or the
end effector. Let us look at this example
of an excavator we know that this has got
2 degrees of freedom we can ask the question,
if I want to take this been in this path how
should I actuate how should I actuate how
should I actuate the hydraulic actuator. So,
that the bin travels in this path.
So, the displacement analysis in the case
of robots it is a little more complicated
because it affords this freedom I can choose
my path I can choose a different path or when
I am dumping I might choose another path.
So, the question is what should be the input
actuation, same case for this robot puma robot.
If I want to have this end-effector move in
a certain path how I should move the angles
of these motors so that the end-effector moves
along this path.
Now, there are two problems in displacement
analysis as I was mentioning. The first problem
is given the input; that means, given the
actuator motion it could be angle, it could
be throw off the hydraulic actuator, given
this input what will be the output. So, for
example, if I say that this angle should be
say 0 degree and this should be 90 degree
where is my hand this is called the forward
kinematics problem or the direct kinematics
problem.
So, let us see this. So, forward kinematics
problem, given the actuator inputs find the
output displacement. So, where is the output?
As I mentioned this like before if I give
this displacement where is this link, if I
give displacement of this much where is this
wheel link this is the forward kinematics
problem.
Similarly, in this parallel kinematic machine
if I specify these are the actuators if I
specify this actuator through this actuator
through and there is another actuator at the
bottom if I specify these 3 actuators where
is the end point the, end-effector point.
So, that is the forward kinematics problem.
The second problem is that of the inverse
problem, so inverse kinematics problem. For
a specified output displacement find the actuator
inputs this is very relevant, if I want to
position for example, this chair to the standing
position I am specifying this position what
should be the throw of this actuator that
is the inverse kinematics problem. Or if I
want to specify the location of the bin 
at a certain position and orientation maybe
a certain position let us say what should
be 
the actuator inputs. So, this is the inverse
kinematics problem.
Now, let us plan our study of displacement
analysis. So, as I have planned, we will first
discuss constrained mechanisms you know that
constraint mechanisms are mechanisms with
1 degree of freedom. So, we are going to study
displacement analysis of constraint mechanisms
we will start with that subsequently will
go to robots. So, we will look at open chain
robots and closed chain robots.
So, today we will start with the analysis
displacement analysis the forward kinematics
analysis of a 4R chain. So, we are going to
start with constraint mechanisms and under
constraint mechanisms we are going to discuss
2 kinematic chains, a 4R and a 3R1P in this
lecture we are going to discuss 4R chain the
forward kinematics of it. So, here I have
shown a 4R chain. So, what is the problem
let us see.
So, the forward kinematic problem kinematics
problem for a 4R chain is given theta 2 which
is the input which I call the input. So, given
this find theta 4 the output, this is the
forward kinematics problem for the 4R chain.
So, this is what we are going to study.
Let me draw the coordinate system that I choose.
So, theta 2 is this angle, theta 4 is this
angle and we can also have theta 3 as a byproduct
of a calculation. But we are primarily interested
in finding a relation between theta 2 and
theta 4; that means, given theta 2 what is
theta 4.
So, here I have marked 2 points P and Q these
are the two hinges. So, coordinates of point
P in this coordinate system is l 2 cos theta
2 and l 2 sine theta 2. So, this is the x
coordinate 
and this is the y 
coordinate of point P. Similarly I can write
coordinates of point Q.
So, in order to write that I must add this
l 1 along x, so l 1 plus l 4 cos theta 4 which
is, so l 1 plus l 4 cos theta 4 is the x coordinate
of point Q and l 4 sine theta 4 you can see
from the figure is the y coordinate of point
Q. So, therefore, this link length l 3, link
length l 3 can be expressed as l 3 square
is equals to as you can see here x Q minus
y Q whole square x cube sorry this is x Q
minus x P whole square plus y Q minus y P
whole square and that is l 3 square, that
I have written out.
Now, if you open this up 
if you open this up then what do you have.
So, l 3 square is equals to l 1 square plus,
now l 4 square cos square theta 4 and from
here I will have l 4 square sine square theta
4, so it is l 4 square. Similarly l 2 square
cos square theta 2 l 2 square sine square
theta 2 will come in addition there therefore,
this will become l 2 square. Now, the cross
terms 2 l 1 l 4 cos theta 4 which I will write
as C theta 4 minus 2 l 1, l 2 cos theta 2,
C theta 2 and minus 2 l 2 l 4 cos theta 4
cos theta 2 and one cross term from the second
square, that will be minus 2 l 2 l 4 sine
theta 4 S theta 4 is sine theta 4 and S theta
2 is sine theta 2. So, this is what you can
get.
Now, I can rearrange, I can rearrange it like
this sine theta 4 times. So, let me see what
are the sine theta 4 terms. So, here I have
the sine theta 4 terms, this becomes 2 l 2
l 4 sine theta 2. Then I will look at the
cos theta 4 terms, so I have cos theta 4 this
is one term, this is one term, that is it.
So, I can write, this comes with, this term
I have taken to the left hand side so that
this I have written positive.
So, I must take all terms to the left hand
side - cos theta 4 2 l 1, this will come with
a negative sign to l 1 l 4 and plus 2 l 2
l 4 cos theta 2 and that is equal to l 1 square
plus l 4 square plus l 2 square minus l 3
square, I am bringing l 3 square to the right
hand side minus 2 l 1 l 2 cos theta 2. So,
this is what I have. Now if I do a little
bit of simplification then I can write it
as A sine theta 4 plus B cos theta 4 is equal
to C where ABC are functions of theta 2 as
you can see.
So, let me formally show you this, step.
So, A sine theta 4 plus B cos theta 4 equal
to C I have done some simplifications. So,
A is sine theta 2 and B has these expressions
and C has this expression. So, what is our
goal now? Goal is to solve this. Why? Because
I am given theta 2 if I am given theta 2 I
know a I know B I know C they involve theta
2 I know them. What I have to find? I have
to find out theta 4. So, I have to essentially
solve this equation. So, I have to solve this
equation to solve theta 4.
Now, we are going to do it in a manner which
can be computerized. So, in a computer as
you know that these trigonometric functions
will have two solutions, double solutions.
So, we are going to revise an approach which
will take care of this thing and we are going
to get both the solutions so how to do that.
By the way you can relate theta 3 as tangent
theta 3. So, you can see this, this is theta
3. So, tangent of theta 3 is this distance
divided by this distance and this distance
is y Q minus, y Q minus y P by x cube minus
x P that is tangent theta 3. So, t theta 3
stands for tan theta 3 and you can just substitute
these expressions and find that this is what
it is.
So, we can once I know theta 4, once I have
solved for theta 4 because theta 2 is already
known once I have solved for theta 4 from
here I can substitute here and get theta 3.
So, that is our plan. So, right now this is
our plan solving this equation in a manner
which can be computerized we want to get all
the possible solutions.
So, solution of A sine theta 4 plus B cos
theta 4 equal to C, here we make a substitution
x is equal to tan theta 4 by 2, now how does
that help. Now, tan theta 4 by 2 can be used
to write sine theta 4 by 2 like this which
is a standard because 2 times tangent of theta
4 by 2 by 1 plus tangent square theta 4 by
2 that is this expression on the right hand
side is equal to.
Now, if I write tan tangent theta 4 by 2 as
sine theta 4 by 2 and cosine theta 4 by divided
by cosine theta 4 by 2 then you can very easily
see that, this is sine theta 4 by 2 divided
by cosine theta 4 by 2 divided by now here
it becomes sine square theta 4 by 2 plus cos
square theta 4 by 2 which is 1, divided by
cos square theta 4 by 2. And that turns out
to be 2 sine theta 4 by 2 and this goes to
the numerator and cancels off with 1 cos theta
4 by 2. So, this only leaves 1 cos theta 4
by 2. So, 2 sine theta 4 by 2 into cos theta
4 by 2 is sine theta 4.
In a similar manner this cos theta 4 by 2,
so if I look at the right hand side then 1
minus tan squared theta 4 by 2 by 1 plus tan
squared theta 4 by 2. Now, again I write tan
theta 4 by 2 as sine theta 4 by 2 divided
by cos theta 4 by 2. So, in the numerator
I have cos square theta 4 by 2, minus sine
square theta 4 by 2 divided by cos square
theta 4 by 2 and on the denominator I will
also get 1 by cos square theta 4 by 2, so
this becomes 1, now cos square theta 4 by
2 minus sine square theta 4 by 2 is cos theta
4. So, we have looked at these two expressions.
Now, if I substitute this in case of sine
theta 4 by 2 this expression and in case of
cosine theta 4 by 2 this expression then I
get this equation which I can simplify this
is very easy step I leave it to you to show
that you get this quadratic equation in x.
Remember x is tangent theta 4 by 2 tan theta
4 by 2 is x. Now you know that the quadratic,
I mean quadratic equation has this, these
are the roots of a quadratic equation there
are two roots of the quadratic equation which
can express explicitly.
So, this is what we are going to look at next.
So, this was the quadratic equation that we
obtain the solutions which is essentially
tan t theta 4 by 2, so x is tan theta 4 by
2. So, you know this solution of quadratic
equation roots of a quadratic equation, so
you have it in this form. And you also remember
that we have these ABC expressed previously.
So, these are the definitions of ABC in terms
of theta 2 and the other link lengths. So,
I can find out x and hence I can find out
tan theta 4 by 2 in terms of theta 2. So,
let us do that.
So, tan theta 4 by 2 is this expression in
terms of ABC. So, there are these two possible
solutions theta 41 and theta 42, theta 41
and theta 42 with here you have this plus
minus so I have taken one by one. So, here
I have taken the minus and here I have taken
the root with the positive sign and I do tan
inverse.
Now, this tan inverse is quite powerful. In
most softwares in programming languages this
tan inverse is given in terms of a function
called atan2. So, once I have theta 4 and
theta 41 and theta 42 I can solve for theta
3. So, for these two solutions theta 41 and
theta 42 I have 2 solutions of tan theta 3
or theta 3.
Now, this tan inverse is to be or the inversion
of tan for inversion of tan to get the correct
quadrant of the angle you need to use this
function atan2 this is available in most programming
languages and in softwares numerical softwares
atan2 or sometimes also known as arctan . And
it gives it has 2 arguments y and x, so it
calculates, atan2 y comma x is actually nothing
but tangent inverse, tan inverse y divided
by x. What it does extra? It looks at the
sign of the numerator and the denominator
and there by decides, so sine of numerator
and denominator. So, it looks at the sign
of the numerator and denominator and thereby
decides the quadrant. So, this is very powerful.
So, it will tell you the correct quadrant
of the angle.
As you know that in the first quadrant everything
is positive, in the second quadrant sine is
positive which means that the numerator if
it is positive and the denominator if it is
negative, then it must be in the second quadrant.
In the third quadrant both sine and cosine,
are negative and therefore, tangent is positive.
So, if you have y also negative and x also
negative then it will give in the third quadrant.
And if you have in the 4th quadrant cosine
is positive and sine is negative. So, if it
sees that the denominator is positive while
the numerator is negative, it will give the
angle in the 4th quadrant. So, this function
does all that automatically for you. So, you
did not worry about the quadrant. So, you
should explore this function atan 2 y comma
x.
Let us look at the graphical picture, the
geometric interpretation of the two solutions.
Now, theta 2 is specified, as you know theta
2 is specified we want to find out theta 4
now this hinge therefore, can rotate because
theta l 4 is specified l 4 is fixed, so this
theta 4 can be any angle such that this hinge
lies on this circle. Since this hinge is fixed
because theta 2 is fixed, this hinge is fixed;
therefore, on the link l 3 can rotate with
this as the center on this circle. Now, these
two circles have two intersections, this is
one intersection this is the other intersection.
So, you can assemble the mechanism in this
configuration the black one or this red one.
Now, whether these two are distinct assembly
modes that will be decided by whether this
mechanism is a Grashof chain or not, but you
can assemble the mechanism in two ways like
this. So, these are the two solutions that
we are obtaining. So, 4 has two solutions.
So, this is one solution and this is the other
solution. So, you can see that one is in the
first quadrant the other is in the third quadrant.
So, this will be done automatically by the
atan 2 function. So, this is the graphical
picture, this is how we can understand the
solution.
To summarize we have looked at the displacement
analysis of mechanisms in general and define
the forward and inverse kinematics problems.
And here today we have looked at the forward
kinematics of a 4R kinematic chain, the constraint
kinematic chain. So, with that I will close
this lecture.
