You are on page 1of 6

Inverse Kinematics of Redundant Robots using Genetic Algorithms

J oey K. Parker
Ahmad R. Khoogar
Department of Mechanical Engineering
The University of Alabama
Tuscaloosa, AL 35487
Abstract
The inverse kinematic solution for redundant robots
is much more difficult than for conventional robots. The
extremely large number of feasible solutions for most
end-effector positions requires additional constraints for
proper selection. A genetic algorithm (GA) is presented in
this paper which allows additional constraints to be
specified easily. The GA is applied to a test problem in
which the maximum joint displacement in a point-to-point
positioning task is minimized.
Background
Most current general-purpose industrial robots have
six degrees of freedom since this is the minimum required
to both position and orient an object at an arbitrary
location. Redundant robots possess at least one degree of
freedom more than the minimum required for their
particular positioning task. The use of kinematically
redundant robots is expected to increase dramatically in
the future due to their increased flexibility. Some of the
extra capabilities include the ability to avoid internal
singularities or external obstacles while operating over
their entire workspace. In order for a redundant robot to
be useful, the proper planning of joint and link motion
must be accomplished. The forward kinematic equations
relating joint motions and link parameters of redundant
robots to the Cartesian coordinate workspace are easily
developed. Similarly, the inverse kinematic equations of
robots map the world coordinates to the joint coordinates,
i.e. given the position and orientation of the end-effector
the inverse kinematic equations must calculate the joint
variables which position and orient the end-effector as
desired. Mapping from the world coordinates to the joint
coordinates for a redundant robot is not one to one, i.e.
there may exist an infinite number of joint variable settings
which results in a given end-effector configuration. The
object here is to impose practical constraints on the joint
variables, such that an "optimum" solution for desired
performance is obtained. Several different approaches for
providing these additional constraints have been explored.
pseudoinverse of the jacobian matrix in order to solve the
inverse kinematic equations of a redundant robot. The
additional constraints for resolving the redundancy are
specified via an arbitrary vector in a homogeneous part of
The Resolved Motion method utilizes the
David E. Goldberg
Department of Engineering Mechanics
The University of Alabama
Tuscaloosa, AL 35487
the solution. An appropriate selection of this arbitrary
vector would guarantee the desired performance, Suh &
Hollerbach (1987), Dubey & Luh (1987), and Baillieul
(1987).
Baillieul(l985) also proposed the method of
Extended J acobian as a way to impose practical limits on
the number of choices of joint configurations for each
end-effector position and orientation, in which some
objective function is extremized. This method introduces a
modified J acobian matrix, called the Extended J acobian
matrix. The Extended J acobian is a square matrix which
contains the additional information necessary to extremize
an objective function. The inverse kinematic solutions are
realized through the inverse of the extended J acobian.
This method is some what simpler to implement than the
resolved motion method, however it should be noted that
the it is limited to the cases where there is only one degree
of redundancy.
inverse kinematics of redundant robots, using the
Lagrangian multiplier method. He derived the extra
equations which, together with the kinematic equations of
the robot, can fully specify the under-determined problem.
The main advantage of Lagrangian multiplier method is
that the solution is directly in terms of joint variables, while
when the Resolved motion method or the Extended
J acobian method is used, the joint variable velocities must
be integrated in order to obtain the joint variable settings.
a generalized solution to the inverse kinematics of robots.
This method uses the modified Newton-Raphson
technique for solving the system of nonlinear kinematic
equations regardless of whether the robot is redundant or
non-redundant. Their procedure is fairly robust and can
be used for a variety of robots. The major shortcoming of
this method is that in order for the solution to converge to
the desired point we must have a good initial guess. For
this reason the convergence of the system can not be
guaranteed.
Clearly each one of the above methods tends to
resolve the redundancy problem of a redundant robot by
imposing practical constraints on the inverse kinematic
solution. An interesting area of research concerning
redundant robots is the appropriate selection of these
additional constraints. One of the more widely used
measures of performance for resolving the redundancy is
Chang (1986) proposed a closed-form equation for
Goldenberg, Benhabib, and Fentor (1985) introduced
27 1
CH2750-8/89/0000/0271$01 .OO 0 1989 IEEE
the determinant of DT where J is the jacobian matrix and
superscript T denote the transpose. When this expression
is maximized the robot is in the most flexible configuration.
Dubey and Luh (1987) have introduced two measures of
performance, Manipulator Velocity Ratio (MVR), and
Manipulator Mechanical Advantage (MMA). They
defined the velocity ratio of a robot as the ratio of the
end-effector velocity vector Euclidean norm to the joint
velocity vector Euclidean norm. Maximizing this
expression would place the robot in a configuration at
which joint angle velocities are most realizable at the
end-effector. Manipulator Mechanical Advantage is the
other measure of performance introduced by Dubey and
Luh (1985) in which the force transmission of the robot is
considered. They defined MMA as the ratio of the
Euclidean norm of end-effector forces and moments, and
the Euclidean norm of joint variable forces. Maximizing
this expression would place the robot in a configuration at
which the force exertion capability of the robot is
maximized.
genetic algorithms (GAS), for solving the inverse
kinematics problem for redundant robots. There are
several features of GAS that make them attractive for this
problem. The "cost" or "fitness" function used to resolve
the redundancy has no requirements for continuity in the
derivatives, so virtually "any" cost function can be selected
for extremizing. There is no need to compute the jacobian
matrix which relates incremental joint motions to
incremental Cartesian motions. The GA solution needs
only the forward kinematic equations (which are easily
developed) and does not require any artificial constraints
on the joint angles. The joint rotation limits which are
present in any feasible robot design are handled directly, so
any solution determined by the GA is physically realizable.
Finally, the CA works with joint angles represented as
digital values (not continuous real numbers) which is more
representative for computer controlled robot systems.
In this paper we will introduce another technique,
What are Genetic Algorithms?
the mechanics of natural genetics and natural selection.
They combine an artificial survival of the fittest with
genetic operators abstracted from nature to form a
surprisingly robust search mechanismthat is suitable for a
variety of search problems (Goldberg, 1989). An excellent
survey of applications of genetic algorithms can be found in
Grefenstette (1985), Davis (1987), and Grefenstette
(1987).
Genetic algorithms are search procedures based on
How are GAS Different fromConventional Techniques?
methods of search and optimization in a number of ways:
To achieve their breadth, GAS differ fromtraditional
- GAS are blind.
- GAS use codings of control parameters.
- GAS use populations.
- GAS use randomized operators.
Many search methods use much knowledge and know-how
about their intended problem class to obtain solutions. For
example, calculus-based methods know their derivatives
(or how to approximate them) and parameter control
techniques know their assumed structural form. By
contrast, GAS are blind---they are indifferent to
problem-specific information and treat each problem as a
black box. This indifference to problem-specific
knowledge helps give GAS much of their breadth; if a
problem-solving technique is to be truly broad, it must
refuse to adopt a particular problem's structure. On the
other hand, if problem-specific information is rejected,
how can GAS achieve even a modicumof speed?
GAS achieve their relative efficiency by adapting
codings of the decision parameters---by adapting artificial
chromosomes---rather than by adapting the parameters
themselves. In practice the GA user codes the possible
solutions to the problem as a finite-length string (often a
bit string), and the GA processes successive populations of
these artificial chromosomes in successive generations. By
refusing to adopt a particular problem structure and by
exploiting similarities in codings, GAS can achieve greater
breadth of applicability and speed than would otherwise be
possible.
using local information to decide which point to explore
next. Unfortunately, local exploration from a single point is
a perfect prescription for becoming trapped on a false
optimum. By contrast, GAS use a
population-by-population approach, adhering to the old
adage that there is "safety in numbers." As such, GAS are
less likely to be fooled by false optima.
GAS use randomized operators instead of the more
usual deterministic transition rules. The use of chance to
achieve a directed result seems strange at first, but nature
contains many examples, and weshould not confuse the
randomization in GAS with a simple random walk: GAS are
no coin toss by a fancy name. GAS use randomchoice in a
highly exploitative search for improvement.
Together these four differences---blindness, codings,
populations, and randomized operators---contribute to the
GA methodology's relative robustness. In the next section,
weexamine the mechanics and power of a simple genetic
algorithm.
Many adaptive techniques work from point to point,
A Simple Genetic Algorithm
A simple GA consists of three operators:
- Reproduction
- Crossover
- Mutation
Reproduction is the survival of the fittest within the GA.
There are many ways to achieve effective reproduction.
Ranking, tournament, and proportionate reproduction
methods have all been used with success. One simple
proportionate scheme selects individual strings for
reproduction according to their fitness, where fitness is
defined as the nonnegative figure of merit being
maximized. When this is done, individuals with higher
272
fitness values have a higher probability of being selected
for mating and subsequent genetic action.
recombination operator. Simple crossover proceeds in
three steps. Two individual strings are picked using the
reproduction operator. A cross site along the string length
is selected uniformly at random, and position values are
swapped between the two strings following the cross site.
For example, starting with the two strings A=11111 and
B =00000, if the random selection of a cross site turns up a
3, we obtain two new strings A'= 11100 and B'= 00011
following crossover, and these strings are placed in the new
population.
Reproduction and crossover are surprisingly simple
operators, involving nothing more complex than random
number generation, string copying, and partial string
exchanges. Yet their combined action is responsible for
much of a genetic algorithm's search punch. To
understand this intuitively, we need only think in terms of
our own human processes of innovation. What is it weare
doing when we are being innovative or creative? Most
often we are combining notions that worked well in one
context with notions that worked well in another context to
form new, possibly better ideas of how to attack the
problem at hand. In the same way, GAS juxtapose many
different substrings (notions) through the combined action
of reproduction and crossover to form new strings (ideas).
innovation of GA search, what then is the role of the
mutation operator? In a binary-coded GA, mutation is the
occasional (with low probability) alteration of a bit position
(the changing of a 1 to a 0 and vice versa). By itself,
mutation is a simple random walk through the string space.
When used sparingly in combination with reproduction and
crossover, mutation is an insurance policy against the loss
of important genetic material at a particular position. The
low level of mutation used in most artificial genetic search
is evidence of the secondary importance of the operator
when compared to reproduction and crossover.
Crossover is a randomized yet structured
If reproduction and crossover provide most of the
Examde of GA Use with a Redundant Robot
As an example for demonstrating the use of GAS in
solving inverse kinematics problems, consider the robot
shown in Figure 1. This robot has four degrees of
freedom, which allows for arbitrary positioning of the
end-effector within the three-dimensional workspace. The
basic dimensions of this robot are taken from the PUMA
566 industrial robot arm (Unimation 1987). The second
"elbow" joint is placed along the "forearm" of the
conventional design. This four link redundant robot was
selected to demonstrate the capabilities of the GA
approach and it has no other special significance.
the use of the GA in point-to-point robot motion
programming. The redundant robot end-effector is
assumed to be at some initial position, pi =(Xi Yi Zi)T,
with the initial joint angles 8 i,i, 074, 83,i, and 84,i.
Two examples are given below which demonstrate
a1 =m . 4 mm (26.00 in)
a2 =431.8 mm (17.00 in)
4 =149.1 mm (5.87in)
a3 =254.0 mm ( I 0.00 in)
a4 =196.85 mm (7.75 in)
(j*
p-
Figure 1 - Kinematically Redundant Robot
The desired final position of the end-effector is specified
as Q =(Xf Yf Zf)T. The fitness function selected for GA
use combines the arm positioning error with an additional
term based on the joint angle displacements from the
initial position. The positioning error is easily calculated
as
Errorp =( (Xf-Xi)2 +(Yf-Yi)2 +(Zf-Zi)2)1/2
The additional rotational displacement is determined as
DisplacementMax =Max{ I Q 1,fS 1,i I , l@2,~-@2,i I,
This term selects the maximum individual joint rotation
from the initial position as a "cost." The two error terms are
combined into a single fitness function,
Fitness =Errorp +k * DisplacementM,
where the factor k scales the contributions from each term.
In this application the GA minimizes the fitness function
by forcing the positioning error to zero and the maximum
rotational displacement to a minimum value.
This type of fitness function matches the
conventional industrial robot controller approach for
coordinating joint motions. Trapezoidal or cubic spline
velocity profiles are often used for planning joint motions
between successive positions. The velocity profile is
limited by the acceleration capabilities of the individual
joint and the required joint displacement. Most simple
robot control algorithms assume a "worst-case"
acceleration capability, therefore the time required for a
joint to reach its final position depends on the joint
displacement. The scheduling algorithm which insures
smooth motion bases the total time for motion on the joint
which makes the largest displacement. The GA finds a
solution for the redundant robot which minimizes the
positioning error while also minimizing the maximumjoint
displacement.
Figure 1 can be easily developed using the
Denavit-Hartenberg notation (Fu, Gonzalez and Lee
Ie3,f-e3,i 1 7 l@4,f44,i I ?
The forward kinematic equations for the robot of
213
- Run 1
- Run 2
- Run 3
1987). A 40 bit string is selected or use in the GA where
the first 10 bits are assigned to joint 1, the second 10 bits
are assigned to joint 2, etc. The joint angles can then be
calculated from the values of their 10 bit string by the
following,
12
10
01 = -160" + (bit value/1024) * 320" 2 8
e2 = -225" + (bit value/1024)
* 270" 1
93 = -45" + (bit value/1024) * 270" w g 6
z 4
0
e4 =-45" +(bit value/1024) * 270"
These joint limitations also match the capabilities of the 0 5
PUMA 566 industrial robot (Unimation, 1987).
initially at the joint positions
2
For the first test case, the robot is assumed to be
0
0 5 10 15 20 25 30 35 40 45 50
Gener at i on e 1,i =+30.0 degrees,
02,i =-60.0 degrees,
63,i =+30.0 degrees, and
04,i =+60.0 degrees.
These joint angles correspond to a Cartesian position of
X =0.4506 m(17.74 inches),
Y =0.4323 m(17.02 inches),
Z = 1.0630 m(41.85 inches),
which is shown in Figure 1. The desired final position of
the robot is at a Cartesian position of
X =0.6858 m(27.00 inches),
Y =0.1524 m( 6.00 inches),
Z =0.6604 m (26.00 inches).
The population for each of the runs was 50 strings, and SO
generations were evaluated. The positioning error,
Errorp, for the best solution (minimal fitness) at each
generation is shown in Figure 2. The maximumjoint
displacement for each generation is shown in Figure 3. A
summary of the results for each of the three runs is shown
in Table 1.
Table 1 - Results for First Test Case
J oint Initial Final Value Final Value Final Value
Value (Runl ) (Run2) (Run2)
(degrees) (degrees) (degrees) (degrees)
1 +30.0 +8.75 +8.44 +8.44
2 -60.0 -45.44 -47.81 -48.08
3 +30.0 $14.59 +21.97 +23.29
4 +60.0 +47.02 +39.64 +39.64
MinimumErrorp 7.1 mm 6.7 mm 7.4 mm
(0.279 in) (0.262 in) (0.293 in)
DisplacementMax 21.3 deg. 21.6 deg. 21.6 deg.
The maximumjoint displacement, DisplacementM,,
found by the GA can be compared to the true optimal
solution. If the end-effector is assumed to be constrained
at the final position then 8 1,f is uniquely determined to be
Figure 2 - Position Error, Errorp, for First Test Case
0 5 10 15 20 25 30 35 40 45 50
Generation
Figure 3 - MaximumJ oint Displacement,
DisplacementMax, for First Test Case
+10.0 degrees and the last three links form a four-bar
mechanism. The four-bar mechanismcan then be
evaluated to determine the maximumjoint displacement of
15.0 degrees (from 0 1). Therefore joint 1 moves the
maximumamount of 20 degrees. The GA found a "good"
answer within 2 degrees of the best solution for this case.
Although the final positioning error, Errorp, is large
for all three runs, it is relatively small considering the
initial best solution shown in Figure 2. Future work will be
directed towards reducing this error to the level inherent in
the 10 bit encoding of the joint angles. The final
positioning error could also be easily reduced to zero by
employing the Newton-Raphson iteration technique
presented by Goldenberg, Benhabib and Fentor (1985).
This technique requires the computation of the jacobian
matrix, but since the solution provided by the GA is very
close to the final value only a single jacobian is usually
needed.
initially at the Cartesian position
For the second test case, the robot is assumed to be
274
X =-.0366 m (-1.44 inches),
Y =0.3615 m (14.23 inches),
Z = 1.1597 m (45.66 inches),
with a desired final position of the robot at
X =-.0254 m (-1.00 inches),
Y =0.3556 m (14.00 inches),
Z =0.6350 m (25.00 inches).
In this test problem the robot arm moves down
approximately 0.5 meters with only a small rotation about
joint 1. The results of this test problem are given in Figure
4 and Table 2.
- Run 1
_.I Run 2
- Run 3
Generat i on
Figure 4 - Position Error, Errorp, for Second Test Case
Table 2 - Results for Second Test Case
Value (Runl ) (Run2) (Run2)
(degrees) (degrees) (degrees) (degrees)
J oint Initial Final Value Final Value Final Value
1 -60.0 -61.56 -61.56 -60.94
2 -160.0 -208.92 -216.56 -215.24
3 +50.0 +83.15 +84.46 +85.78
4 +75.0 +132.98 +119.27 +120.59
Minimum Errorp 7.0 mm 2.2 mm 4.7 mm
(0.275 in) (0.085 in) (0.185 in)
DisplacementMax 58.0 deg. 56.6 deg. 55.2 deg.
For the second test problem the true minimum joint
displacement is 52.0 degrees for joint 2, which compares
favorably with the answers from Table 2.
Conclusions
Genetic Algorithms, which are robust
general-purpose optimization techniques, have been used
to solve the inverse kinematics problem for redundant
robots. The GA was used to position a robot at a target
location while minimizing the largest joint displacement
from the initial position. As currently implemented, GAS
are suitable for off-line programming of a redundant robot
in point-to-point positioning tasks. Although the final
positioning accuracy is not ideal, the simplicity and power
of the GA makes an interesting contribution to the field of
inverse kinematics.
Future Work
There are potentially several more uses of GAS in
redundant robot kinematics than have been presented in
this introductory paper. The current function which selects
the maximum joint displacement could easily apply
weighting factors for each joint. These weighting factors
could be based on average inertias and required torques
for each joint, or inertias and torques could be computed at
each generation. The minimization of joint angle
displacements could also be applied between several
successive points. The maximum total individual joint
displacement over all points could be used as the fitness
function. The results of the GA might be improved by
separating the positioning error (ideally zero) from the
additional "cost" functions. The GA approach might also
be applied to problems such as singularity and obstacle
avoidance.
Acknowledgments
Dr. Goldberg's contribution is based upon work
supported by the National Science Foundation under
Grant MSM-8451610. He also acknowledges support from
the Alabama Research Institute, the Digital Equipment
Corporation, and Texas Instruments Incorporated.
References
Baillieul, J., "Kinematic Programming Alternatives for
Redundant Maniuulators." Proc. IEEE International
Conference on Rdbotics a& Automation, I985
Baillieul, J ., "A Constraint Oriented Approach to Inverse
Problems for Kinematically Redundant
Manipulators," Proc. IEEE International Conference
on Robotics and Automation, 1987
Manipulators with Kinematic Redundancy," Proc.
IEEE International Conference on Robotics and
Automation, I986
Davis, L., ed., Genetic Algorithms and Simulated Annealing,
Morgan Kaufman Publishers, Los Altos, CA, 1987
Dubey, R. and J.Y.S. Luh, "Performance Measures and
their Improvement for Redundant Robots," Robotics
Theory and Application, ASME Winter Annual
Meeting, 1986
Fu, K.S., R.C. Gonzalez, and C.S.G. Lee, Robotics: Control,
Sensing, Visior?, and Intelligence. McGraw-Hill, 1987
Goldberg, D. E., Genetic algorithms in search, optimization,
and nuzchine learning. Reading, MA: Addison-
Wesley, 1989
Chang, P.H., "A Closed-Form Solution for the Control of
Goldenberg, A.A., B. Benhabib, and R.G. Fentor, " A
Complete Generalized Solution to the Inverse
Kinematics of Robots," IEEE Journal of Robotics and
Automation, 1985, Vol. RA-1, No. 1
Grefenstette, J.J., ed. Proceedings of an International
Conference on Genetic Algorithm and their
Applications, Carnegie-Mellon University, July 1985
(available from Lawrence Erlbaum Associates,
Hillsdale, NJ )
Applications: Proceedings of the Second International
Conference on Genetic Algorithm, MIT, July 1987
(available from Lawrence Erlbaum Associates,
Hillsdale, NJ)
Holland, J. H., Adaptation in natural and artificial systems.
Ann Arbor, MI: University of Michigan Press, 1975
Suh, N.C. and J.M. Hollerbach, "Local versus Global
Torque Optimization of Redundant Manipulators,"
Proc. IEEE International Conference on Robotics and
Automation, 1987
5521562 Equipment Manual #398AHl. Danbury, CT,
1987
Grefenstette, J.J., ed., Genetic Algorithms and their
Unimation Inc., Unimate PUMA Mark I I I Robot Models
276

You might also like