Jacobian PDF
Jacobian PDF
Jacobian PDF
The Math
Most mechanisms of interest to computer animation are too complex to allow an analytic solution. For these, the
motion can be incrementally constructed. At each time step, the best way to change each joint angle in order to
direct the current position and orientation of the end effector toward the desired configuration is computed. The
computation is preformed by forming the Jacobian matrix which is a matrix of partial derivatives.
In order to explain the Jacobian from a strictly mathematical point of view, consider the six arbitrary functions of
EQ 1, each of which is a function of six independent variables. Given specific values for the input variables, the
xis, each of the output variables, the yis, can be computed by its respective function.
y 1 = f 1(x 1, x 2, x 3, x 4, x 5, x 6)
y 2 = f 2(x 1, x 2, x 3, x 4, x 5, x 6)
y 3 = f 3(x 1, x 2, x 3, x 4, x 5, x 6)
. (EQ 1)
y 4 = f 4(x 1, x 2, x 3, x 4, x 5, x 6)
y 5 = f 5(x 1, x 2, x 3, x 4, x 5, x 6)
y 6 = f 6(x 1, x 2, x 3, x 4, x 5, x 6)
The differentials of yi can be written in terms of the differentials of xi using the chain rule. The generates EQ 2.
. Y = F(X ) (EQ 3)
∂F
δY = ------- ⋅ ∂X (EQ 4)
∂X
∂F
The 6x6 matrix of partial derivatives, ------- , is called the Jacobian and is a function of the current values of the xi.
∂X
The Jacobian can be thought of mapping the velocities of X to the velocities of Y (EQ 5). At any particular point
in time, the Jacobian is a linear function of the xi’s. At the next instant of time, X has changed and so has the linear
transformation represented by the Jacobian.
Y˙ = J (X ) ⋅ Ẋ (EQ 5)
In applying the Jacobian to a linked appendage, the input variables, xis, become the joint angles and the output vari-
ables, yis, become the end effector position and orientation. In this case, the Jacobian relates the velocities of the joint
angles to the velocities of the end effector position and orientation (EQ 6).
V = J (θ)θ̇ (EQ 6)
V is the vector of linear and rotational velocities and represents the desired change in the end effector. The desired
change will be based on the difference between its current position/orientation to that specified by the goal configura-
tion. These velocities are vectors in three-space so each has an x, y, and z component (EQ 7). θ̇ is a vector of joint
angles velocities and are the unknowns of the equation (EQ 8). J, the Jacobian, is a matrix which relates the two and
is a function of the current pose (EQ 9).
T
V = [ v x, v y, v z, ω x, ω y, ω z ] (EQ 7)
T
θ̇ = [ θ˙1, θ˙2, θ˙3, …, θ˙n ] (EQ 8)
∂v x ∂v x ∂v x
…
∂ θ1 ∂ θ2 ∂ θn
∂v x ∂v x ∂v x
J = ∂ θ1 ∂ θ2 … ∂ θn (EQ 9)
… … … …
∂ω z ∂ω z ∂ω z
…
∂ θ1 ∂ θ2 ∂ θn
Each term of the Jacobian relates the change of a specific joint with a change in the end effector. The rotational
change in the end effector, ω , is merely the velocity of the joint angle about the axis of revolution at the joint under
consideration. The linear change in the end effector is the cross product of the axis of revolution and a vector from the
Zi x (E-Ji)
ωι ω
Zi E Zi Zi
Ji E-Ji E
Ji
E - end effector
Ji - ith joint
Zi - ith joint axis
ωι - angular velocity of ith joint
The desired angular and linear velocities are computed from the difference between the current configuration of
the end effector and the desired configuration. The angular and linear velocities of the end effector induced by
the rotation of a specific joint axis are determined by the computations shown in Figure 1. The problem is to
determine the best linear combination of velocities induced by the various joints that would result in the desired
velocities of the end effector. By posing the problem in matrix form, the Jacobian is formed.
In assembling the Jacobian, it is important to make sure that all of the coordinate values are in the same coordi-
nate system. It is often the case that joint specific information is given in the coordinate system local to that joint.
In forming the Jacobian matrix, this information must be converted into some common coordinate system such
as the global inertial coordinate system or the end effector coordinate system. Various methods have been devel-
oped for computing the Jacobian based on attaining maximum computational efficiency given the required infor-
mation in local coordinate systems but all methods produce the derivative matrix in a common coordinate
system.
A Simple Example
Consider the simple three revolute joint, planar manipulator of Figure 2. In this example the objective is to move the
end effector, E, to the goal position, G. The orientation of the end effector is of no concern in this example.
P1
L1
θ2 L3
E
θ1 θ3
L2
(0,0) P2
The axis of rotation of each joint is perpendicular to the figure, coming out of the paper. The effect of an incremental
rotation, gi, of each joint can be determined by the cross product of the joint axis and the vector from the joint to the
end effector, Vi (Figure 3). Notice that the magnitude of the gi’s is a function of the distance between the locations of
the joint and the end effector.
g1
g2
g3
V2
V1 V3
(G – E )x ( ( 0, 0, 1 ) × E ) x ( 0, 0, 1 ) × ( E – P1 ) x ( 0, 0, 1 ) × ( E – P2 ) x θ˙1
( G – E ) y = ( ( 0, 0, 1 ) × E ) y ( 0, 0, 1 ) × ( E – P1 ) y ( 0, 0, 1 ) × ( E – P2 ) y ⋅ θ˙2 (EQ 10)
( G – E )z ( ( 0, 0, 1 ) × E ) z ( 0, 0, 1 ) × ( E – P1 ) z ( 0, 0, 1 ) × ( E – P2 ) z θ˙ 3
Once the Jacobian has been computed, then an equation in the form of EQ 11 must be solved.
V = J θ̇ (EQ 11)
In the case that J is square, the inverse of the Jacobian is needed to compute the joint angle velocities given the
end effector velocities.
–˙1
J V = θ̇ (EQ 12)
If the inverse of the Jacobian (J-1) does not exist, then the system is said to be singular for the given joint angles.
A singularity occurs when a linear combination of the joint angle velocities cannot be formed to produce the
desired end effector velocities. As a simple example of such a situation, consider a fully extended, planar arm
with a goal position somewhere on the forearm. In such a case, a change in each joint angle would produce a vec-
tor perpendicular to the desired direction. Obviously, no linear combination of these vectors could produce the
desired motion vector. Unfortunately, determining all of the singularities of a system cannot be determined sim-
ply by visually inspecting the possible geometric configurations of the linkage.
g1
Motions
g2 induced by
joint
g3 articulation
Joint1 Joint2 Joint3
desired motion
Problems with singularities can be reduced if the manipulator is redundant - when there are more degrees of freedom
than there are constraints to be satisfied. In this case, the Jacobian is not a square matrix and there are an infinite num-
ber of solutions to the inverse kinematics problem. Because the Jacobian is not square, a conventional inverse does
not exist. Instead, the pseudo inverse, J+, can be used (EQ 13).
V = J θ̇
T T
J V = J J θ̇
(EQ 13)
T –1 T T –1 T
( J J ) J V̇ = ( J J ) J J θ̇
+
J V = θ̇
EQ 13 works because a matrix multiplied by its own transpose will be a square n by n matrix.
+ T –1 T T T –1
J = (J J ) J = J (J J )
is called the pseudo-inverse of J. It maps the desired velocities of the end effector to
the required velocities of the joint angles.
+
J V = θ̇
T T –1
J ( J J ) V = θ̇ (EQ 14)
T –1
β = (J J ) V
T
( J J )β = V (EQ 15)
T
J β = θ̇ (EQ 16)
Gaussian elimination can be used to solve EQ 15 for β. This can then be substituted into EQ 16 to solve for θ̇ .
The pseudo inverse solution computes one of many possible solutions. This solution minimizes joint angle rates. The
configurations produced, however, do not necessarily correspond to what might be considered natural poses. In order
to better control the kinematic model, a control expression can be added to the pseudo inverse Jacobian solution. The
control expression is used to solve for control angle rates with certain attributes. The added solution contributes noth-
ing to the desired end effector motion. The form for the control expression is shown in EQ 17. It is shown that expres-
sion does not add anything to the velocities (EQ 18)
+
θ̇ = ( J J – I )z (EQ 17)
As a consequence, the control expression can be combined with the pseudo inverse Jacobian solution so that the
given velocities are still satisfied.
In order to bias the solution toward specific joint angles, H is defined as in EQ 19 where θ i are the current joint
angles, θ ci are the desired joint angles, α i are the desired angle gains, and ψ is the ψ th norm (for ψ even). z is
equal to the gradient of H, ∇H (EQ 20).
∑ α ⋅ (θ – θ
ψ
H = i i ci ) (EQ 19)
i=1
∑ α ⋅ (θ – θ
dH ψ–1
z = ∇ θ H = ------- = ψ ci )
dθ i i (EQ 20)
i=1
The desired angles and gains are input parameters. The gain indicates the relative importance of the associated
desired angle. The higher the gain, the stiffer the joint. If the gain for a particular joint is high, then the solution
will be such that the joint angle quickly approaches the desired joint angle.
The control expression is added to the solution indicated by the conventional pseudo inverse of the Jacobian (EQ
21). If all gains are zero, then the solution will reduce to the conventional pseudo inverse of the Jacobian.
+ +
θ̇ = J V + ( J J – I )∇ θ H (EQ 21)
+ +
θ̇ = J V + ( J J – I )∇ θ H
+ +
θ̇ = J V + J J ∇ θ H – I ∇ θ H
+
θ̇ = J ( V + J ∇ θ H ) – ∇ θ H (EQ 22)
T T –1
θ̇ = J ( J J ) ( V + J ∇ θ H ) – ∇ θ H
T T –1
θ̇ = J [ ( J J ) ( V + J ∇ θ H ) ] – ∇ θ H
T –1
In order to solve this, set β = ( J J ) ( V + J ∇ θ H ) so that EQ 22 becomes EQ 23. Use Gaussian elimination to solve
for β in EQ 24. Substitute the solution for β into EQ 23 to solve for θ̇
T
θ̇ = J β – ∇ θ H (EQ 23)
T
V + J ∇ θ H = ( J J )β (EQ 24)
Simple Euler integration can be used at this point to update the joint angles. At the next time step, the Jacobian has
changed so the computation must be preformed again and another step taken. This process repeats until the end effec-
tor reaches the goal configuration within some acceptable (i.e., user defined) tolerance.