30% off your first 3 months

Get the deal

The Jacobian: how joint speeds become hand speed

by DuckyHelperNov 12, 20265 min read
Robotics

TL;DR:

  • The Jacobian is a matrix of partial derivatives that turns joint speeds into hand speed: v = J(θ) · θ̇.

  • It depends on the arm's current joint angles, so it must be recomputed as the arm moves.

  • At a singularity (for a two-link arm, fully straight or folded) the determinant is zero and some hand directions cannot be reached.

You want the hand of a robot arm to move along a table at 0.1 m/s. The motors, though, only understand joint speeds. Which joint speeds make the hand move that way? The answer is not fixed: it depends on how the arm is bent right now. The Jacobian is the tool that captures this.

Partial derivatives in plain words

Forward kinematics gives the hand position from the joint angles: x = f(θ₁, θ₂), y = g(θ₁, θ₂). A partial derivative asks: if I change only one joint a tiny bit and hold the others still, how much does the hand coordinate change? For instance, ∂x/∂θ₁ is the change in x per radian of joint 1.

The Jacobian collects all of these into a table, one row per hand coordinate and one column per joint. Because the changes are small and add up, the hand velocity is the sum of the contributions of each joint: v = J · θ̇.

A planar arm has link lengths L₁ = 0.4 m and L₂ = 0.3 m. The hand position is:

x = L1·cos θ1 + L2·cos(θ1 + θ2)
y = L1·sin θ1 + L2·sin(θ1 + θ2)

Taking partial derivatives gives the Jacobian:

J = [ −L1·sin θ1 − L2·sin(θ1+θ2)    −L2·sin(θ1+θ2) ]
    [  L1·cos θ1 + L2·cos(θ1+θ2)     L2·cos(θ1+θ2) ]

Take θ₁ = 30° and θ₂ = 60°, so θ₁ + θ₂ = 90°.

  1. Trig values: sin 30° = 0.5, cos 30° = 0.8660, sin 90° = 1, cos 90° = 0.

  2. Hand position (a check on the setup): x = 0.4 × 0.866 + 0.3 × 0 = 0.3464 m, y = 0.4 × 0.5 + 0.3 × 1 = 0.5 m.

  3. Jacobian entries: J₁₁ = −0.4 × 0.5 − 0.3 × 1 = −0.5, J₁₂ = −0.3 × 1 = −0.3, J₂₁ = 0.4 × 0.866 + 0.3 × 0 = 0.3464, J₂₂ = 0.3 × 0 = 0.

  4. Let the joints move at θ̇₁ = 0.5 rad/s and θ̇₂ = −0.2 rad/s.

  5. Hand velocity: ẋ = (−0.5)(0.5) + (−0.3)(−0.2) = −0.25 + 0.06 = −0.19 m/s, and ẏ = (0.3464)(0.5) + 0 × (−0.2) = 0.1732 m/s.

  6. Speed of the hand: √(0.19² + 0.1732²) = √(0.0361 + 0.0300) = √0.0661 ≈ 0.257 m/s.

Check it independently with a tiny step. Advance the joints by 0.01 s of motion: θ₁ = 30° + 0.5 × 0.01 rad = 30.2865° and θ₂ = 60° − 0.002 rad = 59.8854°. The new sum is 90.1719°. Then x ≈ 0.4 cos 30.2865° + 0.3 cos 90.1719° = 0.3454 − 0.0009 = 0.3445 m, a change of about −0.0019 m from 0.3464 over 0.01 s, which is −0.19 m/s. It matches the Jacobian.

The same matrix works in reverse. To move the hand at a chosen velocity, solve θ̇ = J⁻¹ v. If you want the hand to move at (0.1, 0) m/s, a controller computes the inverse at this posture and sends the joint speeds. Because J changes with the posture, this is recomputed many times per second.

Singularities

The determinant of this Jacobian is det J = L₁ L₂ sin θ₂. At our posture, 0.4 × 0.3 × sin 60° = 0.12 × 0.866 = 0.1039. Check against the entries: (−0.5)(0) − (−0.3)(0.3464) = 0.1039. Same.

When θ₂ = 0° (arm fully stretched) or 180° (folded back), sin θ₂ = 0 and the determinant is zero. This is a singularity. At it, the matrix cannot be inverted, and the arm cannot move the hand along the direction of the straight arm, however fast the joints turn. Near it, the determinant is tiny: at θ₂ = 5° it is 0.12 × 0.0872 ≈ 0.0105, about one tenth of its value at 60°, so asking for a hand velocity in the hard direction needs joint speeds roughly ten times higher. A controller that does not account for this may command extreme speeds as the arm straightens.

Safety: Near a singularity a small command can demand very fast joint motion. Limit joint speeds in the controller, stay away from fully stretched postures when moving along their direction, test at low speed, and keep clear of the arm's reach with the emergency stop at hand.

Where it goes wrong

  • Stale Jacobian. It must be recomputed from the current angles.

  • Wrong frame. The velocity is in the base frame. If the target is in another frame, convert it first, as in coordinate frames and transforms.

  • Degrees in the trig functions when your code expects radians.

  • Inverting near singularity. Use a damped or pseudo-inverse and clamp joint speeds.

  • Redundant arms. With more joints than hand coordinates, J is not square, and there are many solutions.

  • Only velocities. The Jacobian is exact for velocity and only an approximation for finite steps.

How real robots use it

Arm controllers use the Jacobian to move the hand in straight lines, to apply a force at the hand by choosing joint torques (τ = Jᵀ F), and to follow trajectories like those in smooth trajectories for robot arms. The joint angles it needs come from position sensors, discussed in absolute and incremental position sensing.

Try it yourself

Write the forward kinematics in a spreadsheet and nudge θ₁ by 0.001 rad. The change in x divided by 0.001 is your estimate of ∂x/∂θ₁. Compare it with −L₁ sin θ₁ − L₂ sin(θ₁ + θ₂). Then set θ₂ to 3° and see how close to zero the determinant gets.

Frequently asked questions

Why is it called a matrix of partial derivatives?

Each entry is the rate of change of one hand coordinate with respect to one joint angle, with the other joints held fixed.

Can I avoid singularities?

Planners keep paths away from them where possible, and controllers slow down near them. You cannot remove them, because they come from the arm's geometry.

Get started

DuckyHelper can
do more

It sees your screen and works in any app you use. Try it for 10 minutes, no card.

Get it for Mac, Windows or Linux

Share

Questions and jobs

Do anything

Ask it a question or hand it a job, in any app.

Doing jobs for you is in early access on Mac. Asking works on Mac, Windows and Linux.