Redundancy & Null-Space 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
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
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:
- Posture control: $\tau_0 = -K_q(q - q_\text{rest}) - D_q\dot q$, regulating the arm toward a preferred joint configuration.
- Joint-limit avoidance: $\tau_0 = -\nabla_q U(q)$, where $U(q)$ increases near the joint limits.
- Manipulability maximization: $\tau_0 = K_m\nabla_q w(q)$, where $w(q)=\sqrt{\det(JJ^\top)}$ is the Yoshikawa manipulability index.
- Obstacle avoidance: $\tau_0 = -\nabla_q U_\text{obs}(q)$, where $U_\text{obs}(q)$ increases as a link approaches an obstacle.
Scope and limitations
- Applicable beyond OSC. The dynamically consistent inverse and torque projector are not limited to OSC; they can also be used with other torque-level controllers, including Cartesian impedance control.
- Requires an accurate inertia model. The dynamically consistent projector depends on $M(q)$. Errors in payload, inertial parameters, or joint-flexibility models weaken the decoupling and allow secondary torques to affect the primary task. The Moore–Penrose projector avoids this model dependence, but it does not dynamically decouple torque commands.
- Requires regularization near singularities. When $J$ loses row rank, $JM^{-1}J^\top$ becomes singular, so the undamped forms of $\Lambda$ and $\bar J$ are undefined. Damped inverses remain bounded near singularities but no longer provide exact task–null-space decoupling.
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.
- No secondary objective. The primary task is controlled without an additional null-space objective.
- Preferred posture. The secondary controller regulates the joints toward a preferred configuration without contributing to the acceleration of the primary task.
- Avoid joint limits. The secondary controller keeps the joints away from their limits.
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
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.
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.