← Back to curriculum

Kinematics

Inverse kinematics: redundancy and numerical methods

Analytic vs numerical IK, Jacobians, null-space motion, and practical pitfalls near singularities.

~70 min read + exercises

Inverse kinematics: redundancy and numerical methods

Inverse kinematics answers: given a desired tool pose, what joint angles achieve it? This lesson covers existence, uniqueness, redundancy, and practical numerical approaches.

Figure

Many configurations, one target

Inverse kinematics is many-to-oneThe same end-effector target can usually be reached by multiple joint configurations.targetTwo valid solutionselbow downelbow up
A 2-link planar arm can reach almost every point in its workspace two different ways (elbow up / down). 7-DOF arms offer infinite continuous solutions.

Learning objectives

  • Explain why IK can have no solution, one solution, or many solutions.
  • State the role of the Jacobian in differential IK.
  • Describe null-space motion and one use for it.

Prerequisites

  • Forward kinematics lesson.
  • Partial derivatives at a “conceptual calculus” level.

Step 1 — IK as solving nonlinear equations

Let f(q)\mathbf{f}(\mathbf{q}) be the tool pose (or position) as a function of joints. IK seeks q\mathbf{q} such that

f(q)=g\mathbf{f}(\mathbf{q}) = \mathbf{g}^\ast

for a commanded goal g\mathbf{g} in task space.

Nonlinear + periodic joints ⇒ complicated solution sets.

Checkpoint: For a redundant arm, why is “pick any solution” underspecified?


Step 2 — Analytic IK vs numerical IK

Analytic: closed-form solutions exist for some architectures (e.g. many 6R arms with spherical wrists) — fast and predictable.

Numerical: iterate with gradients/Jacobians — general but can get stuck, oscillate, or violate joint limits without care.

Exercise: When would you prefer numerical IK even if analytic IK exists?


Step 3 — The Jacobian relates joint rates to tool velocity

Let x\mathbf{x} be a task-space representation (e.g. tool position in R3\mathbb{R}^3 or a minimal orientation parameterization).

x˙J(q)q˙\dot{\mathbf{x}} \approx \mathbf{J}(\mathbf{q})\, \dot{\mathbf{q}}

where J\mathbf{J} is the Jacobian (matrix of partial derivatives).

For small steps, differential IK uses:

ΔqJΔx\Delta \mathbf{q} \approx \mathbf{J}^{\dagger}\, \Delta \mathbf{x}

with J\mathbf{J}^{\dagger} a pseudoinverse (Moore–Penrose or damped).

Checkpoint: What does a singular configuration imply about J\mathbf{J}?


Step 4 — Damped least squares (avoiding blow-ups)

Near singularities, naive pseudoinverses can produce enormous joint velocities. Damping trades off task error vs joint velocity magnitude:

Δq=J(JJ+λ2I)1Δx\Delta \mathbf{q} = \mathbf{J}^\top (\mathbf{J} \mathbf{J}^\top + \lambda^2 \mathbf{I})^{-1} \Delta \mathbf{x}

You do not need to memorize the formula — you need to know why damping appears in real controllers.


Step 5 — Redundancy and null-space projections

If J\mathbf{J} has more columns than rows (redundant), there exists a null space of joint velocities that do not change the task to first order:

Jq˙null0\mathbf{J}\, \dot{\mathbf{q}}_{\text{null}} \approx \mathbf{0}

You can use null-space motion to:

  • avoid joint limits,
  • minimize energy,
  • maintain manipulability.

Figure

Wiggle without moving the tool

Redundant arms can wiggle without moving the toolUse null-space motion to dodge joint limits, obstacles, or singular poses.fixed targetall three configurations reach the same tool pose
Several elbow positions reach exactly the same end-effector pose. The leftover degrees of freedom are the null space — useful for dodging joints limits or obstacles.

Exercise: Describe a secondary objective you might optimize in null space while keeping the tool pose fixed.


Check your understanding

  1. Why can IK have infinitely many solutions for a 7-DOF arm reaching a point in space?
  2. What is a kinematic singularity in one sentence?
  3. Why is IK harder than FK computationally in general?

Lab-style stretch goal (optional)

Implement Jacobian-transpose IK for a planar 3-link arm to follow a circle in the plane; log joint angles and task error per iteration.