Skip to the lesson
FixTheRobot Explore Robotics / Linear Algebra / M8 Jacobians and Robot Kinematics / M8-T9

Linear Algebra · Theory · M8

M8-T9 — Null-Space Control

A redundant arm can rearrange itself without moving its hand. The null-space projector lets you choose how, without breaking the primary task.

  • Lesson 9 of 10
  • Module 8: Jacobians and Robot Kinematics
  • Jacobians and kinematics
  • About 9 minutes to read

A seven-joint arm holds its gripper still while the elbow swings out of the way. The mathematics is the null space of Module 3 meeting the pseudoinverse of Module 6: any joint motion in the null space of the Jacobian leaves the hand alone, so we can spend that freedom on a secondary goal.

Learning objectives

After this lesson, you should be able to:

  • Describe the null space of the Jacobian as the set of self-motions that do not move the hand.
  • Build the projector N = I − J⁺J and verify its properties (symmetric, idempotent, J N = 0).
  • Use q̇ = J⁺ṗ + N z to pursue a secondary objective such as joint-limit avoidance without affecting the hand.
  • Explain priority between tasks and the limits of the method (near singularities, task conflict).

Introduction and motivation

A collaborative robot welds a seam with its hand pose fixed by the task. Meanwhile its elbow drifts toward a joint limit, then toward a human. The arm has seven joints for a six-dimensional task, so one extra freedom exists. Null-space control uses that freedom to keep the elbow away from the limit while the weld torch never deviates: two behaviours at once, one safe, one productive, with a strict priority.

The intuition

If the arm has more joints than the task has dimensions, there are joint motions that do nothing to the hand: the null space of J. Add any such motion to a valid solution and it is still valid. The projector I − J⁺J takes an arbitrary wish z in joint space and removes the part that would disturb the hand, keeping only the harmless part. The result is the nearest allowed motion to what you wanted.

Two tasks, two subspacesThe joint velocity is split into a part that produces the hand motion, lying in the row space of the Jacobian, and a part in the null space that produces no hand motion. The projector I minus J plus J selects the second part from any secondary command z.primary taskq̇ₚ = J⁺ ṗin the row space of J + secondary taskq̇ₙ = (I − J⁺J) zin the null space of J: hand stays put J q̇ = J J⁺ ṗ + J (I − J⁺J) z = ṗ + 0 z can be any joint-space wish: stay away from limits, keep the elbow up, avoid an obstacle.
Primary task through J⁺, secondary task through the null-space projector.

Interactive figure. A three-joint planar arm whose hand stays fixed on a point while a slider moves the joints along the null space of the Jacobian. The readout shows the Jacobian, the null direction and a check that the hand does not move. This figure needs JavaScript to be interactive.

Geometric and physical interpretation

Geometric view. In joint-velocity space the set of velocities giving hand velocity ṗ is a flat subspace (a line for one redundant joint), parallel to the null space and offset from the origin. J⁺ṗ is its point nearest the origin; adding null-space vectors slides along the flat. The projector N = I − J⁺J is the orthogonal projection onto the null space, exactly the projections of Module 4. Physical view. Moving along the null space is the self-motion of the arm: elbow up to elbow out with the hand fixed. It is a path in configuration space that never leaves the set of configurations with the same hand pose.

The mathematics

N = I − J⁺J
the null-space projector (n × n): symmetric, idempotent, with J N = 0.
z
an arbitrary joint-velocity vector expressing the secondary objective.
H(q)
a secondary cost to be minimised, e.g. distance from joint limits.
k
a gain scaling the secondary motion.

Control law

q̇ = J⁺ ṗ + ( I − J⁺J ) z

What it means. The first term achieves the hand velocity (minimum-norm). The second is the harmless part of the secondary wish z: it changes the joints but not the hand velocity.

Properties of the projector

N² = N,   Nᵀ = N,   J N = 0,   rank N = n − rank J

What it means. Applying it twice changes nothing; it keeps the component of z in the null space and removes the rest. Its rank is the number of redundant degrees of freedom.

Gradient descent on a secondary cost

z = − k ∇H(q),   e.g.  H = ½ Σᵢ ((qᵢ − qᵢ,mid)/(qᵢ,max − qᵢ,min))²

What it means. The null-space motion descends H as far as it can without disturbing the hand. With the cost above, joints are pulled towards the middle of their ranges.

q̇ = J⁺ṗ + (I − J⁺J)z: the hand velocity is exactly ṗ for any z, and z only rearranges the arm. N is the orthogonal projector onto null(J).

Step-by-step derivation: projector, hand-invariance and the cost decrease

  1. All solutions. Every solution of J q̇ = ṗ is q̇ = J⁺ṗ + w with w ∈ null(J) (Module 3, particular plus homogeneous).
  2. The projector. With the SVD J = UΣVᵀ, J⁺J = V(Σ⁺Σ)Vᵀ is the orthogonal projector onto the row space (the first r columns of V). Therefore N = I − J⁺J projects onto the orthogonal complement, the null space spanned by the remaining columns of V.
  3. Properties. Symmetry follows from that of J⁺J (Penrose condition 4). Idempotence: N² = I − 2J⁺J + J⁺JJ⁺J = I − J⁺J = N using J⁺JJ⁺ = J⁺. And J N = J − JJ⁺J = J − J = 0 by Penrose condition 1.
  4. Hand invariance. For any z, J(J⁺ṗ + Nz) = JJ⁺ṗ + 0 = ṗ if ṗ is reachable (in the column space), so the hand velocity is exactly the desired one: the secondary term cannot disturb it.
  5. Choosing z. We want to lower a cost H(q): the rate of change is Ḣ = ∇Hᵀ q̇ = ∇Hᵀ J⁺ṗ + ∇Hᵀ N z. With z = −k∇H, the second term is −k ∇Hᵀ N ∇H = −k ‖N∇H‖² ≤ 0 (since N is a symmetric projector, Nᵀ N = N): the null-space motion never increases H.
  6. Why not apply z directly? The raw gradient step q̇ = −k∇H would disturb the hand by −kJ∇H; projecting removes exactly that disturbance and keeps the rest. The price: the achievable decrease in H is only along the null space, ‖N∇H‖ rather than ‖∇H‖.
  7. Several priorities. A second task with Jacobian J₂ is executed in the null space of the first: q̇ = J₁⁺ṗ₁ + (J₂N₁)⁺(ṗ₂ − J₂J₁⁺ṗ₁). The first task is achieved exactly; the second as well as the remaining freedom allows.
  8. Singularities. Near a singularity of J, J⁺ is unreliable and the null space changes dimension abruptly, so use the damped inverse and a damped projector, or fall back to less aggressive secondary motion.

Closed-loop version. With feedback, q̇ = J⁺(ṗ_des + K e) + N z: the hand converges to the target while the elbow does the secondary job. The two terms are orthogonal in joint space (row space versus null space), so they do not fight.

A worked example: the projector and a secondary motion

Planar three-link arm with links 1.1, 0.8, 0.7 at q = (0°, 90°, 0°), J = [[−1.5, −1.5, −0.7], [1.1, 0, 0]].

  • The null direction. n = (0, −0.423, 0.906): check J n = (0.634 − 0.634, 0) = 0. The first joint does not move; the elbow and wrist counter-rotate.
  • The projector. N = I − J⁺J = [[0, 0, 0], [0, 0.179, −0.383], [0, −0.383, 0.821]], which is n nᵀ since the redundancy is one. Its trace is 1 = n − rank J.
  • Properties. N² = N to rounding (largest entry difference below 10⁻¹⁵), Nᵀ = N, J N = 0.
  • Secondary wish. We would like joint 2 to move back from 90° toward the middle of its range: z = (0, −0.5, 0) rad/s. With the hand fixed (ṗ = 0), q̇ = N z = (0, −0.0894, 0.1916) rad/s: joint 2 retreats at 0.089 rad/s and joint 3 compensates; the hand velocity is J q̇ = (0, 0).
  • Combined with a task. For ṗ = (0.4, 0.55) the primary part is (0.5, −0.630, −0.294); adding the same null term gives q̇ = (0.5, −0.719, −0.102), and J q̇ = (0.4, 0.55) still ✓.
  • Naive alternative. Applying z without projection moves the hand by J z = (0.75, 0) m/s: a large disturbance of the task, which the projector prevents.

Robotics application

Manipulators. Seven-axis collaborative arms use null-space motion for elbow position, joint-limit and obstacle avoidance, manipulability maximisation and posture control while the end effector tracks a trajectory.

Mobile manipulators. The base and arm together form a redundant system: the arm's task is primary and the base repositions in the null space of the arm to improve reach or manipulability.

UAVs. Over-actuated multirotors and aerial manipulators allocate thrust in the null space of the allocation matrix to minimise power or keep rotors away from saturation; see fault detection, isolation and recovery.

SLAM and calibration. A gauge freedom in a pose graph is a null direction of the information matrix; the solver moves in its row space and leaves the gauge to a prior; see pose graphs. The null-space idea also appears in IMU and GNSS fusion when an unobservable state is left unchanged.

Engineering implications and limitations

Practical rules

  • Always project the secondary term. A raw secondary command disturbs the hand; the projector guarantees it does not (as long as J is accurate).
  • Keep the secondary gain moderate. Large k produces fast self-motion that can excite dynamics and leave the linearisation region; recompute J every cycle.
  • Normalise joint-limit costs. Divide by the joint range so that different joints compare fairly (as in the cost above).
  • Use the damped pseudoinverse and a damped projector near singularities. The null space is ill-defined where rank changes.
  • Monitor the primary error. Linearisation and joint limits can still disturb the hand; if the error grows, reduce the secondary term.
  • Define priorities explicitly. Safety limits (collision, joint limits) usually take priority over comfort objectives; order the tasks accordingly.

Limits

The null space exists only if the arm is redundant for the task and not near rank loss. A secondary objective can only be pursued as far as the self-motion goes; if H has a minimum elsewhere on the self-motion manifold, the arm may settle at a local minimum, and global behaviour (switching elbow branches) needs planning.

Common misconceptions

“Null-space motion is free.”

It does not move the hand, but it moves joints: it uses energy, can hit joint limits and can excite flexible links.

“I − J⁺J is the identity minus a small correction.”

It is an orthogonal projector of rank n − rank J: it removes the whole row-space component of z.

“A non-redundant arm has a null space too.”

A square nonsingular J has a trivial null space (only zero). The null space appears when n > m or at singularities.

“The secondary task is always achieved.”

Only the component of the wish lying in the null space is realised; a wish orthogonal to it has no effect.

Engineering takeaways

  1. For a redundant arm, joint velocities in null(J) leave the hand fixed: self-motion.
  2. N = I − J⁺J is the orthogonal projector onto null(J): N² = N, Nᵀ = N, JN = 0, rank N = n − rank J.
  3. q̇ = J⁺ṗ + Nz achieves the hand velocity exactly for every z and uses z only for rearranging the arm.
  4. With z = −k∇H the null-space motion never increases H; joint-limit avoidance is the classic H.
  5. Close the loop, project the secondary term, and use damping near singularities.

References and further reading

Primary papers and authoritative documentation.

Knowledge check

Three conceptual questions. Write an answer, then reveal the explanation. Your answers stay in your browser.

Question 1

For J = [[1, 0, 1], [0, 1, 1]] find a null-space vector and the projector N, and test J N.

Explanation

n = (1, 1, −1)/√3 satisfies J n = (0, 0). N = n nᵀ = (1/3)[[1, 1, −1], [1, 1, −1], [−1, −1, 1]]. J N = (1/3)[[1 − 1, 1 − 1, −1 + 1], [1 − 1, 1 − 1, −1 + 1]] = 0 ✓.

Question 2

With the same J, ṗ = (2, 2) and secondary z = (1, 0, 0), compute q̇ = J⁺ṗ + Nz and check the hand velocity.

Explanation

J⁺ṗ = (2/3, 2/3, 4/3). Nz = (1/3)(1, 1, −1). q̇ = (1, 1, 1). J q̇ = (1 + 1, 1 + 1) = (2, 2) ✓: the hand velocity is unchanged by z.

Question 3

Why is the secondary gradient step z = −k∇H projected before it is added, and what does the projection cost?

Explanation

Without projection, J z moves the hand and breaks the primary task. The projector removes exactly that part. The cost is that only the null-space component of the gradient is used: the decrease of H is limited to ‖N∇H‖², possibly much less than a free gradient step.

What’s next

The last lesson of this module steps back to the general picture of redundant manipulators: how many extra degrees of freedom there are, what the self-motion manifold looks like, and the design choices that determine what a seven-joint arm is good for.

Next lesson

M8-T10 — Redundant Manipulators

Analyse an arm with more joints than task dimensions and choose among its infinitely many solutions.

Nothing below is required to finish this lesson.