23 May 2026
What Is the Jacobian?
The Jacobian is the matrix that relates joint-space velocities to the end-effector's Cartesian velocity (its twist) [1]:
For an -DOF arm with a 6-D task space, . For planar arms, the twist reduces to and . Because depends on , the mapping changes as the robot moves — which is what makes Jacobian-based control non-trivial.
A 2-DOF Planar Arm
Consider the simplest non-trivial case: two revolute joints in the plane. The kinematic chain below shows the two links , and the joint angles , .
DH Parameters
The Denavit–Hartenberg convention [2] parameterises each joint with four numbers. For a planar arm all link offsets and twist angles are zero:
| Joint | θ (variable) | d | a (link length) | α |
|---|---|---|---|---|
| 1 | θ₁ | 0 | l₁ | 0 |
| 2 | θ₂ | 0 | l₂ | 0 |
Forward Kinematics
Composing the two joint transforms gives the end-effector position:
At , with , the homogeneous transform is:
⎣
⎦
End-effector frame at θ₁ = 0.4 rad, θ₂ = 0.2 rad
Deriving the Jacobian
Differentiating and with respect to and , and stacking the orientation row , yields the geometric Jacobian:
where , , , .
Singularities
The arm loses a degree of freedom when . For the position rows (dropping orientation), . This is zero when or — the arm is fully extended or fully folded. Near these configurations the inverse Jacobian blows up and joint velocities become unbounded for any Cartesian motion.
Velocity Mapping
The plot below shows simulated joint velocities , fed through to produce end-effector velocities , over time. Note how the Cartesian speed oscillates with the arm configuration even when joint speeds are smooth.
Jacobian Transpose Control
The Jacobian transpose lets you convert a desired end-effector force into joint torques without inverting . This is used in impedance control and gravity compensation:
For resolved-rate motion control — driving the arm to a goal in Cartesian space — the damped least-squares pseudo-inverse avoids singularity blow-up:
- 1Input: goal pose p_goal, current config q, damping λ
- 2repeat
- 3p ← forward_kinematics(q)
- 4e ← p_goal − p // task-space error
- 5J ← jacobian(q)
- 6J† ← Jᵀ · inv(J·Jᵀ + λ²·I) // damped pseudo-inverse
- 7q̇ ← J† · Kp · e // resolved-rate law
- 8q ← q + q̇ · Δt
- 9until ‖e‖ < ε
Implementation
import numpy as np
def jacobian(q: np.ndarray, l: np.ndarray) -> np.ndarray:
"""Geometric Jacobian for an n-DOF planar revolute arm."""
n = len(q)
J = np.zeros((3, n))
cum = np.cumsum(q)
for i in range(n):
suffix_cos = sum(l[j] * np.cos(cum[j]) for j in range(i, n))
suffix_sin = sum(l[j] * np.sin(cum[j]) for j in range(i, n))
J[0, i] = -suffix_sin
J[1, i] = suffix_cos
J[2, i] = 1.0
return J
def damped_pinv(J: np.ndarray, lam: float = 0.01) -> np.ndarray:
JJT = J @ J.T
return J.T @ np.linalg.inv(JJT + lam**2 * np.eye(JJT.shape[0]))Null Space and Redundancy
When the arm is redundant: there is a whole family of joint configurations that achieve the same end-effector pose. The null space of spans the self-motions that leave the end-effector stationary. These extra degrees of freedom can be used to avoid joint limits or obstacles:
where projects any vector onto the null space of . Choosing for some penalty function (joint-limit proximity, manipulability measure) exploits redundancy without disturbing the primary task.
References
- [1]Spong, M. W., Hutchinson, S., & Vidyasagar, M. Robot Modeling and Control. 2006.
- [2]Siciliano, B. et al. Robotics: Modelling, Planning and Control. 2009.