← Foundations of Low-Level Robot Control

Redundancy & Null-Space Control

Part 4 · Foundations of Low-Level Robot Control

A manipulator is redundant with respect to a task when it has more joint degrees of freedom than the task requires. This additional freedom can be used to pursue secondary objectives—such as posture regulation, joint-limit avoidance, obstacle avoidance, or manipulability optimization—while preserving the primary task.

Task redundancy

Redundancy means the robot has more joint degrees of freedom than are needed to specify the task. Consider a 7-DOF Panda performing a position-only task: the end-effector position has three coordinates, while the robot has seven joints:

$$\dot x = J(q)\,\dot q, \qquad J \in \mathbb{R}^{3\times 7}.$$

When $J$ has full row rank, infinitely many joint-velocity vectors produce the same end-effector velocity. Any velocity in the null space of $J$ can be added to a solution without changing the instantaneous task velocity:

$$J\,\dot q_\text{null}=0.$$

For a 3-DOF position task on a 7-DOF arm, this null space has four dimensions. The arm can therefore change its elbow, shoulder, and wrist configuration while keeping the end-effector position fixed. A controller can use this freedom to pursue secondary objectives, but it must still choose one joint velocity from the infinitely many task-equivalent solutions.

Position-only goal — 4-D null space

Position + orientation goal — 1-D null space

The end-effector remains fixed at the green marker while the joint configuration changes within the task null space. Left: a 3-DOF position task leaves $7-3=4$ unconstrained joint degrees of freedom. Right: a 6-DOF full-pose task leaves $7-6=1$ unconstrained degree of freedom, corresponding to elbow rotation about the shoulder–wrist axis.

Moore–Penrose and dynamically consistent inverses

For a general redundant arm, $J\in\mathbb{R}^{m\times n}$ with $n>m$, so the task equation $J\dot q=\dot x$ is underdetermined. Assuming $J$ has full row rank, the Moore–Penrose and dynamically consistent inverses select different task-equivalent joint velocities. The Moore–Penrose inverse minimizes the Euclidean joint-velocity norm, while the dynamically consistent inverse minimizes instantaneous kinetic energy.

Moore–Penrose: minimum joint-velocity norm

The Moore–Penrose solution minimizes the squared Euclidean magnitude of the joint-velocity vector while enforcing the desired task velocity:

$$\dot q_\mathrm{MP} =\underset{\dot q}{\operatorname{argmin}}\; \tfrac12\dot q^\top\dot q \quad\text{subject to}\quad J\dot q=\dot x$$

The resulting joint velocity is

$$\dot q_\mathrm{MP} =J^\top(JJ^\top)^{-1}\dot x =J^+\dot x$$
Show the Moore–Penrose derivation

The solution follows in three steps. Introduce an auxiliary vector $a\in\mathbb{R}^m$ that enforces the task constraint. It is only a temporary variable and is eliminated at the end:

$$\mathcal L(\dot q,a) =\tfrac12\dot q^\top\dot q+a^\top(\dot x-J\dot q)$$

1. Differentiate with respect to $\dot q$ and set the result to zero.

$$\frac{\partial\mathcal L}{\partial\dot q} =\dot q-J^\top a=0 \quad\Longrightarrow\quad \dot q=J^\top a$$

2. Enforce the task constraint. Substitute $\dot q=J^\top a$ into $J\dot q=\dot x$:

$$J(J^\top a)=\dot x \quad\Longrightarrow\quad JJ^\top a=\dot x \quad\Longrightarrow\quad a=(JJ^\top)^{-1}\dot x$$

3. Substitute $a$ back into $\dot q=J^\top a$.

$$\dot q_\mathrm{MP} =J^\top(JJ^\top)^{-1}\dot x =J^+\dot x$$

Dynamically consistent: minimum kinetic energy

The dynamically consistent solution instead minimizes the manipulator's instantaneous kinetic energy while enforcing the same desired task velocity:

$$\dot q_\mathrm{DC} =\underset{\dot q}{\operatorname{argmin}}\; \tfrac12\dot q^\top M(q)\dot q \quad\text{subject to}\quad J\dot q=\dot x$$

The resulting joint velocity is

$$\dot q_\mathrm{DC} =M^{-1}J^\top\Lambda\dot x =\bar J\dot x$$
Show the dynamically consistent derivation

The derivation uses the same three steps and the same auxiliary vector $a$:

$$\mathcal L(\dot q,a) =\tfrac12\dot q^\top M(q)\dot q+a^\top(\dot x-J\dot q)$$

1. Differentiate with respect to $\dot q$ and set the result to zero.

$$\frac{\partial\mathcal L}{\partial\dot q} =M\dot q-J^\top a=0 \quad\Longrightarrow\quad \dot q=M^{-1}J^\top a$$

2. Enforce the task constraint. Substitute $\dot q=M^{-1}J^\top a$ into $J\dot q=\dot x$:

$$J(M^{-1}J^\top a)=\dot x \quad\Longrightarrow\quad JM^{-1}J^\top a=\dot x \quad\Longrightarrow\quad a=(JM^{-1}J^\top)^{-1}\dot x=\Lambda\dot x$$

3. Substitute $a$ back into $\dot q=M^{-1}J^\top a$.

$$\dot q_\mathrm{DC} =M^{-1}J^\top\Lambda\dot x =\bar J\dot x$$

The dynamically consistent inverse therefore selects, among all joint velocities that produce the requested end-effector velocity, the solution with the lowest instantaneous kinetic energy.

$J^+$ — Euclidean min-norm

$\bar J$ — kinetic-energy min

Both controllers begin from the home configuration and execute the same commanded 180° end-effector yaw while maintaining a fixed end-effector position. With $J^+$, the rotation is distributed across the kinematic chain, producing substantial base and shoulder motion. With $\bar J$, the shoulder remains nearly stationary and the motion is concentrated in the wrist joints.

Dynamic decoupling

The minimum-kinetic-energy property explains which joint velocity $\bar J$ selects. At the torque level, the same inverse also constructs a projector that prevents a secondary torque from accelerating the primary Cartesian task. This property is called dynamic decoupling.

Kinematically, a null-space velocity satisfies $J\dot q_\text{null}=0$. Considering only the acceleration produced by an applied torque, the torque-dependent joint acceleration is

$$\ddot q_\tau = M^{-1}(q)\,\tau.$$

Its contribution to task-space acceleration is therefore

$$\ddot x_\tau=J\ddot q_\tau=JM^{-1}\tau$$

A null-space torque must satisfy $JM^{-1}\tau_\text{null}=0$. The dynamically consistent torque projector is constructed to satisfy this condition, ensuring that projected null-space torques produce zero acceleration in the primary task.

The corresponding torque null-space projector is

$$N_\tau(q)=I-J^\top(q)\bar J^\top(q)$$

Project a candidate secondary torque $\tau_0$ into the torque null space:

$$\tau_\text{null}=N_\tau\tau_0.$$

The task-space acceleration contribution from that torque is zero:

$$\ddot x_\text{null}=J\,M^{-1}\tau_\text{null} = 0.$$
Why null-space torques produce zero task acceleration

Ignoring other forces, the null-space torque contributes $\ddot q=M^{-1}N_\tau\tau_0$, so its task acceleration contribution is $JM^{-1}N_\tau\tau_0$. Expand $N_\tau=I-J^\top\bar J^\top$:

$$JM^{-1}N_\tau\tau_0 =JM^{-1}\tau_0 - JM^{-1}J^\top\bar J^\top\tau_0.$$

Since $\bar J=M^{-1}J^\top\Lambda$ and $M,\Lambda$ are symmetric, $\bar J^\top=\Lambda JM^{-1}$. Therefore the second term becomes

$$JM^{-1}J^\top\Lambda JM^{-1}\tau_0 =\Lambda^{-1}\Lambda JM^{-1}\tau_0 =JM^{-1}\tau_0.$$

It cancels the first term, leaving zero. The cancellation happens because $\Lambda$ is defined as $(JM^{-1}J^\top)^{-1}$. With the Euclidean projector $I-J^+J$, this cancellation generally does not occur.

The kinematic projector $I-J^+J$ ensures that a null-space velocity does not change the end-effector velocity:

$$J\dot q_\text{null}=0.$$

The dynamically consistent torque projector instead ensures that a secondary torque does not accelerate the primary task:

$$JM^{-1}\tau_\text{null}=0.$$

Only the second condition dynamically decouples a torque-level secondary objective from the primary task.

Null-space control in OSC

Define the desired task-space acceleration

$$a^\star=\ddot x_d-K_v\,\delta\dot x-K_p\,\delta x.$$

The OSC torque law for a redundant arm is then

$$\tau = \underbrace{J^\top\bigl[\Lambda\,a^\star + \mu + p\bigr]}_{\text{primary task}} \;+\; \underbrace{N_\tau(q)\,\tau_0}_{\text{null space}}.$$

The first term realizes the primary Cartesian acceleration developed in Part 2. The second projects a secondary joint-space torque through $N_\tau=I-J^\top\bar J^\top$, preventing it from contributing to the acceleration of the primary task in the ideal model. Common choices for $\tau_0$ include:

Scope and limitations

Example

The following three simulations apply the same full torque-level OSC law to the 7-DOF Panda:

$$\tau = J^\top[\Lambda a^\star + \mu + p] + N_\tau\tau_0.$$

All three begin from the same configuration and use the same Cartesian target, but each uses a different secondary objective.

The end-effector follows nearly identical Cartesian trajectories in the three simulations. The null-space motion differs, resulting in different elbow and wrist configurations over the course of the motion.

None  ·  $\tau_0 = 0$

Preferred posture

Avoid joint limits

The same primary task with three secondary objectives. The end-effector follows a nearly identical trajectory to the red target in all three simulations, while the elbow and wrist follow different null-space motions.

Joint-space and task-space gravity compensation

Gravity compensation can be expressed in joint space as $\tau_g = g(q)$ or in task space as $\tau_g = J^\top p(q)$, where $p(q)$ is the task-space gravity term. When $J$ is square and nonsingular, these formulations produce the same joint torque. For the 7-DOF Panda position task considered here, $J$ has a four-dimensional null space; consequently, task-space compensation cannot represent the complete gravity torque vector.

Task-space gravity compensation on a redundant arm

Every torque of the form $J^\top p$ lies in the range of $J^\top$. For a redundant arm, this subspace does not contain every possible joint torque. The remaining gravity component lies in the dynamically consistent torque null space, giving

$$g(q)=J^\top p(q)+g_\text{null}(q).$$

The first term compensates the component of gravity associated with the primary task. The second produces no acceleration in that task but can still cause motion within the null space.

Joint-space gravity compensation

The joint-space term $+g(q)$ compensates the complete gravity torque vector, including both its task-space and null-space components. On a redundant arm, task-space gravity compensation is incomplete unless the null-space component is compensated separately.

Model requirements

Gravity compensation remains model-dependent. Computing $g(q)$ requires link masses, center-of-mass locations, and kinematics. Computing $M(q)$ additionally requires rotational inertias, which are generally more difficult to identify and more sensitive to payload uncertainty.