Jacobian Velocity Analysis and Singularities
What You'll Learn
- 1Differentiate the forward model to obtain the geometric Jacobian
- 2Map joint rates to end-effector velocity and invert the map for resolved-rate control
- 3Detect singular configurations from the determinant and singular values
- 4Quantify how fast joint rates grow as the arm approaches a singularity
The Jacobian is the single most reused object in robot mechanics: it turns joint speeds into tool speed, tool forces into joint torques, and iteration steps in inverse kinematics, and its rank tells you where the machine will refuse to move in a chosen direction. A configuration where that rank drops is a singularity, and the failure is not subtle: commanded joint speeds diverge while the tool crawls. This lesson builds the Jacobian for a 2R arm, evaluates it numerically, and measures the speed blowup as the elbow straightens.
Theory and Foundations
Differentiate the forward kinematics with respect to time. Each partial derivative of the tool position with respect to one joint coordinate is a column of the Jacobian, so for an -task with joints the Jacobian is an by matrix that may be rectangular.
For the 2R planar arm with task vector , differentiation of and gives a square 2 by 2 Jacobian.
The determinant collapses to a product that exposes the whole structure of the problem: the arm can translate the tool in any direction exactly when the two links are not parallel.
A zero determinant means at least one Cartesian direction is locally unreachable at any finite joint speed, which is the definition of a singularity. Away from it, the quality of transmission is summarized by the manipulability, the volume of the velocity image of a unit sphere of joint rates.
For a square Jacobian this reduces to , and the condition number , built from the singular values of , tells you whether one direction is being favored over another even when the determinant is still comfortably nonzero.
Resolved-rate control runs the map backwards, using the inverse Jacobian to convert a desired tool velocity into joint commands.
Production solvers replace the plain inverse with the damped transpose form so the command stays bounded when the determinant approaches zero.
The same matrix with a transpose in front also maps task forces to joint torques, which is why a stiff Cartesian force controller and a stiff position controller share one implementation.
Key Formulas
Worked Examples
| Singularity | Joint condition | Signature | Effect on control |
|---|---|---|---|
| Elbow stretch | theta 2 = 0 | det J = 0 | radial motion blocked |
| Elbow fold | theta 2 = 180 deg | det J = 0 | workspace collapses to a disk edge |
| Wrist lock | axes 4 and 6 align | rank of wrist block drops | two axes spin together |
| Shoulder alignment | tool axis through base axis | column sum cancels | yaw becomes ambiguous |
| Workspace boundary | target at full reach | smallest singular value to zero | speed along the ray lost |
Real-World Examples
- Six-axis welding robots - The wrist singularity appears whenever axes 4 and 6 coincide, and controllers interpolate the two coupled joints rather than let one of them reverse at several hundred degrees per second.
- Force control at full stretch - A polishing arm held at 0.02 manipulability cannot build normal force in the stretched direction, so paths are planned to keep the elbow between 20 and 140 deg.
- Resolved-rate teleoperation - Damped least squares with around 0.05 keeps a master-slave arm responsive while preventing joint spikes when the operator drives toward the boundary.
- ISO 10218 speed limits - Reduced-speed modes cap tool velocity near singular configurations so a rate spike cannot exceed the certified stopping distance.
đĄWatch the determinant, not the position
Evaluating the Jacobian in Code
Build the two columns once in a function and every downstream routine can share them: velocity mapping, force mapping, and the Newton correction all read the same object. Keep the determinant beside it rather than recomputing it later, because for a square Jacobian the determinant is the manipulability and the cheapest singularity monitor available. The habit worth forming during commissioning is to print that determinant next to any joint-rate command: a value drifting down toward one thousandth says the pose is approaching a fold well before the tool visibly slows.
import math
def jacobian_2r(q1, q2, L1, L2):
s1, c1 = math.sin(q1), math.cos(q1)
s12, c12 = math.sin(q1 + q2), math.cos(q1 + q2)
J = [[-L1 * s1 - L2 * s12, -L2 * s12],
[ L1 * c1 + L2 * c12, L2 * c12]]
det = L1 * L2 * math.sin(q2)
return J, det
J, det = jacobian_2r(math.radians(30), math.radians(60), 0.40, 0.30)
qdot = [1.0, -0.5]
vx = J[0][0] * qdot[0] + J[0][1] * qdot[1]
vy = J[1][0] * qdot[0] + J[1][1] * qdot[1]
print(round(det, 4), round(vx, 3), round(vy, 3)) # 0.1039 -0.35 0.346
Sweeping Manipulability Across the Workspace
A single pose says almost nothing about how usable an arm is; a sweep does. Step the elbow angle through its range, record the determinant at each pose, and the ratio between the best and worst readings becomes a planning constraint, so paths that would drive manipulability below a floor are rejected before the trajectory generator samples them. For this two-link arm the sweep also proves the shape of the problem, since the determinant depends on the elbow angle alone and the shoulder angle never enters it.
import math
L1, L2 = 0.40, 0.30
best, worst = 0.0, (1.0, None)
for i in range(1, 180): # theta2 from 1 to 179 degrees
w = abs(L1 * L2 * math.sin(math.radians(i))) # w equals |det J| here
best = max(best, w)
if w < worst[0]:
worst = (w, i)
print(round(best, 3), round(worst[0], 5), worst[1], round(best / worst[0]))
# 0.12 0.00209 179 57
Common Mistakes
Checking reach instead of conditioning
Fix: Reachability only bounds the radius; conditioning is det J = L1 L2 sin theta 2, which vanishes at interior poses too.
Inverting J without a damping term
Fix: Use J transpose times (J J transpose plus lambda squared I) inverse so commands stay finite as the determinant approaches zero.
Comparing raw determinant values across arms
Fix: The determinant carries length units, so compare only Jacobians with the same link lengths, or use the dimensionless condition number.
Key Takeaways
- The Jacobian is the time derivative of forward kinematics: x dot equals J q dot, with one column per joint.
- For a 2R arm det J = L1 L2 sin theta 2, so the arm is singular at full stretch and at full fold only.
- Manipulability w = sqrt of det (J J transpose) measures dexterity and falls to zero at a singularity.
- Near theta 2 = 2 deg the same 0.3 m/s tool speed needs 46.9 rad/s at the elbow against 1.0 rad/s at a healthy pose.
Frequently Asked Questions
Is a singularity always at the edge of the workspace?
No. Elbow stretch and fold are interior configurations with a perfectly reachable tool position, yet there. Workspace boundary and singularity are separate conditions that happen to coincide for some tasks.
What does the Jacobian say about forces?
Its transpose maps task forces to joint torques, , so a Jacobian that is nearly rank deficient also means certain tool forces cannot be produced without very large joint torques.
Why does manipulability use a determinant?
The determinant of is the squared volume of the image of a unit joint-rate ball, so it measures how much of the task space a given joint-speed budget can reach; it collapses to zero exactly when rank is lost.
Interview Questions
Q1: Compute det J for L1 = 0.5 m, L2 = 0.4 m at theta 2 = 90 deg.
det J = L1 L2 sin theta 2 = 0.5 x 0.4 x 1 = 0.20, in square meters for a position task.
Q2: What happens to resolved-rate control when det J reaches zero?
The inverse diverges, so joint rate commands go to infinity; solvers switch to damped least squares or slow the requested tool speed to zero in the blocked direction.