In inverse kinematics, for a given tool position a unique solution

INVERSE KINEMATICS:
Just as in direct kinematics, we find the position and orientation of the tool of a robotic
manipulator for a given vector of joint variables; the reverse procedure of determining
the joint variables given a desired or known tool position and orientation is addressed in
inverse kinematics.
In inverse kinematics, for a given tool position a unique solution comprising a unique
set of joint variables may not exist.
The equations relating the tool configuration and the joint variables are in general nonlinear and so not always conform to a closed form solution.
Multiple solutions may exist.
Infinitely many solutions may exist, especially in the case of kinematically redundant
robots.
There might not be any solution at all, if suppose the tool tip is outside the work
envelope or the manipulator demands infeasible joint rotations.
There are two approaches to the inverse kinematics problem:
To find a closed form solution using algebra or geometry.
To find a numerical solution by a successive approximation algorithm.
Although it is highly desirable to go for the first approach, it is not always possible to
find a closed form solution for arbitrary robot architecture. However, most of the
industrial robots do have a fairly known tool configuration and this paves the way for
using the first approach.
The algebraic approach involves finding the joint angles through algebraic
transformation and relations whereas the geometric approach involves finding the same
through geometrical relations and heuristics by analyzing the structural geometry of the
robot.
Since the finding of a closed form solution in joint angles is a tool-configuration
dependent task, the methods for finding the same for some specific robot architectures
are presented below:
Three-link planar arm:
Here, we have to find the joint angles θ1,θ2,θ3 corresponding to a given end-effector’s
position and orientation.
For a planar motion, the position and orientation of the end-effector can be specified by
the origin of Frame4, i.e. (px,py), and the orientation of the frame attached to the endeffector with respect to the X1-axis,i.e.angle Φ. These are the inputs we have with us.
The solutions are then obtained using two different approaches as follows:
Algebraic Solution:
We have from the forward kinematics of the figure:
X4
ϕ
End  effector , P  p x , p y 
Y4
θ3
a3
X3
Y3
Wrist , W  wx , wy 
a2
θ2
Y2
X2
β
α
a1
θ1
X1
  1   2  3
px  a1c1  a2c12  a3c123
p y  a1s1  a2 s12  a3 s123
To further simplify the problem, the end-effector is oriented after its wrist W is
positioned. The coordinates of W are wx and wy. The position relations are now
reformulated as
wx  px  a3c  a1c1  a2c12
wy  p y  a3 s  a1s1  a2 s12
Squaring the two sides, we get
w 2x + w 2y = a12 + a 22 + 2a1a 2c2
which yields
w12  w22  a12  a22
c2 
2a1a2
A solution exists when -1≤c2≤1.This certifies that the given point (px, py) is inside the
reachable workspace of the arm.
Hence, s2= ±
1  c22
where the positive sign signifies the elbow-up posture and the negative-sign the elbowdown posture.
Hence,
2  a tan 2( s2 , c2 )
where “atan2” is a function which computes the value of “tan-1( )” in the appropriate
quadrant. If a point lies in the first and third quadrants, the argument y/x provides the
result corresponding to the first quadrant whereas –y/-x gives results that lie in the
third quadrant.
Now, θ1 is found in the following way:
wx  (a1  a2 c2 )c1  a2 s1 s2
wy  (a1  a2 c2 )s1  a2 c1 s2
Then
s1 
(a1  a2c2 ) wy  a2 s2 wx
c1 

(a1  a2c2 ) wx  a2 s2 wy
Where

  a12  a22  2a1a2c2  wx2  wy2
Therefore,
1  a tan 2( s1 , c1 )
Finally, we have
3    1  2
The Geometric solution has a better pictorial understanding and hence is useful to
study.
Here, the orientation angle is given by
  1  2  3
And the coordinates of the origin of Frame 3 are computed as follows:
wx  px  a3c  a1c1  a2c12
wy  p y  a3c  a1c1  a2 s12
The application of the cosine theorem to the angle formed by the links a1,a2 and the
segment connecting points O1 and W gives
wx2  wy2  a12  a22  2a1a2 cos(  2 )
The two admissible configurations of the triangles are shown in the figure above.
Observing cos(
 2 )   cos 2  c2 , one readily obtains
w 2x + w 2y = a12 + a 22 + 2a1a 2c2
Thus the existence of the triangle guarantees the following
wx2  wy2  a1  a2
This condition is not satisfied if the given point W is outside the arm’s reachable
workspace.
Based on the assumption of admissible solutions, the angle θ2 is obtained as
 2  cos 1 (c2 )
where the elbow-up posture is obtained with θ2 in between -  and 0 and the elbowdown posture is obtained for theta between 0 and  . To find θ1 we use
  a tan 2( wy , wx )
wx2  wy2 cos   a1  a2c2
where the determination of angles  and  depends on the sign of
Simplifying the above equations, we get
wx
and
wy
  cos
Here

2
2
2
2
w

w

a

a
x
y
1
2
1
2a1 wx2  wy2
should be within 0 and  in order to preserve the existence of the triangle
Hence,
1    
Where 1 is positive for  2  (  ,0) and is negative for  2  (0,  )
Finally, 3 is computed using
 3 = 3
   1  2
An anthropomorphic articulated Arm:
X3
Z1
31
1
2
a2
 2
21
a3
End  effector, pw
X1, X 2
Z2
 3 2 
Suppose we have an end-effector position pw and we want to find out the joint variables
1 , 2 and 3 . The forward kinematics for the arm is given as
c1c23
s c
T   1 23
  s23

 0
c1s23
 s1s23
c23
0
 s1 c1 (a2c2  a3c23 ) 
c1 s1 (a2c2  a3c23 ) 
0 (a2 s2  a3 s23 ) 

0
1

The kinematic relation for pw as obtained from the fourth column gives
1  a tan 2( p y , px )
px  c1 (a2c2  a3c23 )
Where
p y  s1 (a2c2  a3c23 )
But here another admissible solution for 1 is
1    a tan 2( p y , px )
When  2 is equal to   2 ,  2 being one of the solutions corresponding to 1 .
Once 1 is known, the remaining architecture is planar with regard to  2 and 3 . Hence,
exploiting the solution for the 3-link planar arm, we get
3  a tan 2(s3 , c3 )
And
c3 
px2  p y2  pz2  a22  a32
2a2 a3
s3   1  c32
2  a tan 2( s2 , c2 )
Where
s2 
c2 
(a2  a3c3 ) pz  a3 s3 px2  p y2

(a2  a3c3 ) px2  p y2  a3 s3 pz

Where   px2  py2  pz2
Now the inverse problem of this arm admits four solutions. Two of them are as depicted
above, whereas one of the other two is the mirror image of the figure about Z1 -axis,
followed by a rotation about Z 2 -axis to reach pw . The fourth solution is the mirror image
of the last two links about X1 from its latest configuration.
A wrist:
Now for a wrist as shown in the figure below, whose kinematic relations are given by:
 c1c2 c3  s1s3
s c c  c s
T  1 2 3 1 3

s2c3

0

c1c2 s3  s1c3
c1s2
 s1c2 s3  c1c3
 s1s2
 s2 s3
c2
0
0
0
0 
0

1
Z1
Z1
X3, X4
X3, X4
3
2
D
2
D
Z2
X1, X2
C
1
A
B
3
Z2
Z2
C
A
X1, X2
1
B
Suppose we want to find the joint variables 1 , 2 and 3 corresponding to a given endeffector orientation Q with the following form:
 q11 q12
Q   q21 q22
 q31 q32
q13 
q23 
q33 
Now we can compute the solutions of the joint angles directly using
1  a tan 2( q23 , q13 )
 2  a tan 2( q132  q232 , q33 )
 3  a tan 2(  q32 , q31 )
for  2 between 0 and  . Now if each joint is allowed to rotate 180 , there are two
possible solutions for the last three joint displacements. Since each of the above three
relations involve the arctangent function, the angle for 1 may have two values, which
are 180 apart. The two configurations corresponding to the two solutions are as in
figure below.
Let i(1) and  i( 2) be the first and second solutions with
i(1)   i( 2) . They are related by
 i( 2) = i(1) +  ,  i( 2) =  2(1) , and 3(2)  3(1)  
Thus for  2 between  and 0
1  a tan 2(q23 , q13 )
 2  a tan 2( q132  q232 , q33 )
3  a tan 2(q32 , q31 )
In general, a 6-DOF wrist partitioned robot has a total of eight inverse kinematics
solutions for the position analysis.