Singularity Analysis and Manipulability
Singularities are not edge cases — every arm has them and any controller that ignores them will eventually drive the robot through one.
🎯 By the end you'll understand
Why singularities emerge from rank deficiency of the Jacobian — not from geometry alone. The two canonical singularity types for a 6-DOF arm (wrist and shoulder), what they look like physically, and why they cause different controller failures. How the SVD of J produces the manipulability ellipsoid and what that ellipsoid tells you about the arm's capabilities. The condition number as a singularity proximity metric. Why damped least squares (DLS) fixes the velocity explosion at the cost of tracking accuracy — and how to tune that tradeoff. And the critical failure mode: C-space planners that route through a singularity without the velocity controller knowing.
KEY INSIGHTThe arm loses a dimension — and the velocity controller panics
A singularity is not a broken configuration. It is a mathematically coherent state in which the arm has painted itself into a corner: it can no longer independently control all task-space degrees of freedom.
From the previous lesson you know the Jacobian J maps joint velocities q̇ to end-effector velocity ẋ via ẋ = J q̇. Invert that — q̇ = J⁻¹ ẋ — and you have the velocity inverse kinematics controller that drives every real-time arm. Now ask: what happens when J loses rank? The inverse does not exist, or becomes arbitrarily large. A tiny desired end-effector velocity requires infinite joint velocities. The motors saturate, the safety stop triggers, the controller fails. This happens at specific configurations called singularities, and every serial arm has them.
Singularity is not primarily a planning problem. It is a velocity control problem. A path that avoids all obstacles and satisfies all joint limits can still pass through a singularity, causing the velocity controller to command physically impossible joint speeds. C-space planners (like RRT or PRM) have no natural awareness of Jacobian rank — they work in configuration space where singularities are not obstacles. The burden of singularity avoidance falls on the controller, not the planner, unless you explicitly design the planner to be singularity-aware.
CORE CONCEPTRank deficiency of J: the mathematical anatomy of a singularity
For a 6-DOF serial arm, the Jacobian J is a 6×6 matrix (six task-space velocities, six joint velocities). When J is full rank (rank 6), its determinant is nonzero and a unique inverse exists: for any desired ẋ, there is exactly one q̇ that achieves it. This is the arm's generic state — most configurations are nonsingular.
At a singularity, rank(J) < 6. The determinant det(J) = 0. The matrix J maps joint-velocity space into a proper subspace of task-space — fewer than six dimensions are reachable. The end-effector has lost one or more degrees of freedom of instantaneous motion. The column space of J has shrunk.
Concretely: to move the end-effector along the lost direction, the controller would need to command joint velocities that are infinite. In practice, the computed q̇ = J⁺ ẋ (using the pseudoinverse) does not go to infinity instantly — it grows as σ_min → 0, blows through motor saturation limits, and triggers hardware faults. The closer the configuration to a singularity, the more aggressively joint velocities must grow to achieve a given task-space velocity.
The singular values of J tell the exact story. By the Singular Value Decomposition (SVD):
J = U Σ Vᵀ where U ∈ ℝ⁶ˣ⁶ and V ∈ ℝ⁶ˣ⁶ are orthogonal matrices (bases for task-space and joint-space respectively), and Σ = diag(σ₁, σ₂, …, σ₆) contains the non-negative singular values in decreasing order: σ₁ ≥ σ₂ ≥ … ≥ σ₆ ≥ 0. The pseudoinverse is J⁺ = V Σ⁺ Uᵀ where Σ⁺ = diag(1/σ₁, …, 1/σ₆). When σ₆ → 0, the corresponding 1/σ₆ → ∞. The arm is at a singularity exactly when σ_min = 0.
Each singular value σᵢ represents how much end-effector velocity you can produce per unit of joint velocity in the corresponding direction. σ₁ (largest) represents the easiest direction of motion; σ_min (smallest) represents the hardest. When σ_min is small but nonzero, you are near a singularity: producing motion in that direction costs enormous joint velocity. When σ_min = 0, that direction is instantaneously locked — no finite joint velocity can produce it.
HOW IT WORKSThe two canonical singularities of a 6-DOF arm
For a standard 6-DOF serial arm with a spherical wrist (joints 4, 5, 6 intersecting at a point — the configuration used in virtually all industrial arms from KUKA to UR series), two families of singularity dominate. Every 6-DOF serial arm has both.
Wrist singularity — axes 4 and 6 align
The wrist singularity occurs when joint 5 (the wrist bend joint) is at 0° — the arm is fully straight through the wrist. In this state, joint 4's rotation axis and joint 6's rotation axis are collinear (both aligned with the forearm). Their combined effect on end-effector orientation is now degenerate: rotating joint 4 by Δθ₄ and joint 6 by −Δθ₄ produces zero net end-effector rotation. Two joints do the same thing. The Jacobian columns for joints 4 and 6 become linearly dependent, and rank(J) drops by 1.
Physical consequence: when near the wrist singularity, producing a rotation about the wrist's z-axis requires enormous simultaneous counter-rotations of joints 4 and 6. This is the singularity most commonly encountered in welding and assembly tasks where the arm must work in a straight-ahead configuration.
Shoulder singularity — wrist center on joint 1 axis
The shoulder singularity (also called the overhead singularity) occurs when the wrist center point lies on the axis of joint 1 (the base rotation joint). This happens when the arm reaches directly overhead or directly below, or when it is fully extended or retracted in certain configurations. In this state, joint 1 rotation produces no change in wrist center position — it only spins the arm in place. The corresponding Jacobian column for joint 1 is in the null space of the position part of J, and rank drops.
Physical consequence: producing a wrist-center velocity perpendicular to joint 1's axis while at this singularity requires joint 1 to rotate at infinite speed. This is the singularity most likely to be hit when a trajectory planner finds a "short" path that routes over the top of the workspace.
Elbow singularity — arm fully extended or retracted
When the arm is fully extended (or fully retracted — maximum or minimum reach), the elbow joint's contribution to end-effector velocity becomes linearly dependent on other joints. This is less common in practice than wrist or shoulder singularities, but significant in high-reach applications. The workspace boundary is, in a sense, a locus of elbow singularities — you cannot move radially outward when already at maximum extension.
Advertisements for robot arms sometimes claim a "singularity-free" workspace. What this means, carefully read, is that the singularities lie outside the commonly used portion of the workspace — not that they do not exist. Every 6-DOF serial arm has a wrist singularity at q₅ = 0° and a shoulder singularity when the wrist center lies on the base axis. These configurations always exist. The practical question is whether your task trajectories approach them, not whether they can be wished away.
CORE CONCEPTThe manipulability ellipsoid: SVD as a visual language
Yoshikawa's manipulability measure (1985) turns the SVD of J into a geometric object you can see and reason about. The key insight: consider all joint velocity vectors q̇ with unit norm (‖q̇‖ = 1). What set of end-effector velocities ẋ = J q̇ do they produce? By the SVD, this set is an ellipsoid in task-space, whose semi-axes are the columns of U scaled by the singular values σᵢ.
Yoshikawa defined a scalar manipulability index:
w = √det(J Jᵀ) = σ₁ · σ₂ · σ₃ · σ₄ · σ₅ · σ₆
This is the volume of the manipulability ellipsoid (up to a constant factor). When any σᵢ → 0, the product → 0 and w → 0. At a singularity, w = 0 exactly. Far from singularities, w is large. This gives a single scalar that you can monitor in real time as a proximity measure.
Caution: w combines all singular values multiplicatively, so a large σ₁ can mask a very small σ₂. For control purposes, σ_min is the more informative quantity — it tells you the worst-case direction, not the average.
DEFINITIONCondition number: the singularity proximity alarm
The condition number of J is the ratio of its largest to smallest singular value:
κ(J) = σ₁ / σ_min
For a well-conditioned Jacobian, κ ≈ 1: all directions are equally easy. As κ grows, the arm becomes increasingly anisotropic. At a singularity, σ_min = 0 and κ = ∞. In practice, κ > 50 is commonly taken as a warning threshold and κ > 200 as a critical threshold requiring active intervention. The exact thresholds depend on the task, the arm, and the damping strategy used.
The condition number has a clean physical interpretation: if there is a small error δẋ in the desired end-effector velocity (due to sensor noise, trajectory interpolation error, or quantization), the resulting error in joint velocities is amplified by κ(J). At κ = 100, a 1 mm/s error in task-space velocity corresponds to a 100 mm/s error in joint velocity in the worst-case direction. At κ = 1000, it is 1 m/s — well above most arm velocity limits.
| κ(J) | Interpretation | Action |
|---|---|---|
| < 20 | Well-conditioned, low anisotropy | Normal operation |
| 20–50 | Moderate anisotropy | Monitor, reduce task-space velocity |
| 50–200 | Near-singular — warn | Reduce velocity, activate DLS |
| > 200 | Critical — approaching singularity | DLS with large λ or halt trajectory |
| ∞ | Singularity — rank deficient | Stop; replanning required |
SEE ITSingular-value explorer: drive the arm toward a wrist singularity
The slider below moves the arm from a generic configuration (q₅ = 60°, well away from the wrist singularity) toward the wrist singularity (q₅ = 0°, joints 4 and 6 fully aligned). Watch σ_min → 0 as the manipulability ellipsoid flattens and the condition number alarm activates. Then toggle damped least squares (DLS) and see how it bounds joint velocity at the cost of tracking error.
Notice the key tradeoff when DLS is active: as you approach the singularity, the maximum joint velocity is capped — but the end-effector no longer tracks the commanded velocity exactly. The DLS controller sacrifices tracking accuracy to avoid saturation. This is the fundamental tradeoff: tracking fidelity vs. kinematic feasibility. With λ² = 0.001, the damping is light and tracking is accurate far from singularity but joint velocity still grows large near it. With λ² = 0.1, the damping is aggressive — joint velocity is always bounded, but there is meaningful tracking error even away from singularity.
IN PRACTICEDamped least squares: the standard singularity-robust controller
The standard solution to singularity-induced velocity explosion is the damped least squares (DLS) inverse, also called the Levenberg-Marquardt regularization in the robotics literature:
J_dls⁺ = Jᵀ (J Jᵀ + λ²I)⁻¹
This always exists and is always finite, even when J is singular. The parameter λ² (lambda squared) is the damping factor. It can be interpreted as: "I am willing to accept a joint-velocity solution with cost ‖q̇‖² weighted by λ², to avoid the tracking error that comes from working near singularities."
In terms of singular values, the DLS inverse replaces each 1/σᵢ with σᵢ/(σᵢ² + λ²). When σᵢ >> λ, the factor ≈ 1/σᵢ (near-identical to pseudoinverse). When σᵢ << λ, the factor ≈ σᵢ/λ² → 0 (joint velocity is suppressed rather than exploding). The transition happens around σᵢ ≈ λ.
| σᵢ range | DLS factor σᵢ/(σᵢ²+λ²) | Behavior |
|---|---|---|
| σᵢ >> λ | ≈ 1/σᵢ | Pseudoinverse — exact tracking |
| σᵢ ≈ λ | ≈ 1/(2λ) | Transition — some damping, some tracking |
| σᵢ << λ | ≈ σᵢ/λ² | Heavily damped — joint velocity suppressed, tracking error grows |
| σᵢ = 0 | = 0 | Singularity — joint velocity is zero, not infinite |
Choosing λ²: there is no universally correct λ². Wampler (1986) and Nakamura and Hanafusa (1986) both proposed the DLS approach independently, and the λ-selection question has been discussed ever since. Common practice:
Fixed λ²
Simple but suboptimal. Choose λ² that bounds joint velocity to hardware limits in the worst case. The arm is damped even away from singularities, causing unnecessary tracking error during normal operation.
Variable λ² (Sugihara 2009)
λ² varies with σ_min: λ² = 0 when σ_min > ε (no damping, exact tracking), and λ² scales up as σ_min falls below threshold ε. The common form: λ² = (1 − (σ_min/ε)²) · λ_max² when σ_min < ε. This gives exact tracking away from singularities and smooth onset of damping as you approach them. Most production implementations use this.
Task-priority formulations
For redundant arms (7-DOF), you can use the null space to avoid singularities actively — commanding joint motion that moves away from singularity configurations while maintaining the primary task. This requires a well-defined secondary objective and is computationally more expensive. Not applicable to the 6-DOF arm in FollowBot's configuration.
import numpy as np def dls_ik(J: np.ndarray, x_dot: np.ndarray, lambda_sq: float = 0.0, sigma_threshold: float = 0.05, lambda_max_sq: float = 0.01) -> np.ndarray: """ Damped-least-squares velocity IK with variable damping. J : 6×n Jacobian (n joints) x_dot : 6-vector of desired end-effector velocity [v; ω] Returns q_dot : n-vector of joint velocities """ U, S, Vt = np.linalg.svd(J, full_matrices=False) sigma_min = S[-1] # Variable damping: ramp up as we approach singularity if sigma_min < sigma_threshold: ratio = sigma_min / sigma_threshold eff_lam_sq = (1.0 - ratio**2) * lambda_max_sq else: eff_lam_sq = 0.0 # DLS singular-value filter: σ / (σ² + λ²) S_dls = S / (S**2 + eff_lam_sq) # Reconstruct q_dot = V Σ_dls⁺ Uᵀ x_dot q_dot = Vt.T @ np.linalg.diag(S_dls) @ U.T @ x_dot return q_dot, sigma_min, S[0] / (sigma_min + 1e-12)
Three things to notice. First, the SVD is computed every control cycle — this is O(n³) but for n=6 it is microseconds on modern CPUs. Second, the variable λ² starts at zero (exact pseudoinverse) and ramps up only as σ_min approaches the threshold. This gives the clean behavior: exact tracking normally, graceful degradation near singularity. Third, the function returns σ_min and κ(J) for logging — your singularity monitor needs these to raise alarms and publish diagnostic topics.
FOLLOWBOTSingularity monitor for FollowBot's arm
FollowBot's 6-DOF arm uses the DH parameters derived in Lesson 2.3 to compute its Jacobian at every control cycle. The Stage 2 milestone includes a live singularity monitor: a ROS 2 node that publishes σ_min and κ(J) as diagnostic topics and raises a latched alarm when the arm approaches a dangerous configuration.
FollowBot's arm controller must include: (1) the Jacobian computed from current joint states at 50 Hz; (2) the DLS velocity IK replacing the naive pseudoinverse; (3) a diagnostic publisher on /arm/jacobian_diag with fields σ_min, κ, w (manipulability), and dls_active; (4) an alarm that latches to WARN when κ > 50 and CRITICAL when κ > 200, with a recovery behavior that commands the arm to a safe configuration away from singularity.
The two singularities FollowBot's arm will most commonly encounter in person-following tasks:
- Wrist singularity: when the arm reaches forward to hand an object to a person directly ahead, q₅ naturally approaches 0° (wrist fully aligned). The singularity monitor must detect κ > 50 and activate DLS before the arm crosses q₅ = 5°.
- Shoulder singularity: when the arm reaches overhead to gesture or signal, the wrist center can approach the joint 1 axis. The global path planner should be configured to penalize configurations with κ > 30 — this requires feeding back the condition number into the cost function of the Cartesian planner.
import rclpy from rclpy.node import Node import numpy as np from sensor_msgs.msg import JointState from std_msgs.msg import Float32MultiArray, String class SingularityMonitor(Node): def __init__(self): super().__init__('singularity_monitor') self.create_subscription( JointState, '/arm/joint_states', self.cb, 10 ) self.pub_diag = self.create_publisher(Float32MultiArray, '/arm/jacobian_diag', 10) self.pub_alarm = self.create_publisher(String, '/arm/singularity_alarm', 10) def compute_jacobian(self, q): # Replace with your DH-derived Jacobian computation raise NotImplementedError('Provide DH Jacobian') def cb(self, msg: JointState): q = np.array(msg.position[:6]) J = self.compute_jacobian(q) _, S, _ = np.linalg.svd(J, full_matrices=False) sigma_min = S[-1] kappa = S[0] / (sigma_min + 1e-12) w = float(np.prod(S)) # manipulability index diag = Float32MultiArray() diag.data = [float(S[0]), float(sigma_min), float(kappa), w] self.pub_diag.publish(diag) alarm = String() if kappa > 200: alarm.data = 'CRITICAL' elif kappa > 50: alarm.data = 'WARN' else: alarm.data = 'OK' self.pub_alarm.publish(alarm) def main(): rclpy.init() rclpy.spin(SingularityMonitor()) rclpy.shutdown()
WEAKNESSWhere singularity handling bites in practice
This is the most common singularity failure in production arms. A C-space planner (RRT, PRM, or a simple joint-space interpolator) finds a kinematically valid path from A to B — all joint limits satisfied, no collisions, smooth in configuration space. But the path passes through, or very close to, a Jacobian singularity. The planner has no concept of Jacobian rank — configuration space distances do not encode task-space controllability. The velocity controller, running the resulting trajectory, encounters σ_min → 0 and saturates. The arm either halts with a velocity-limit fault or, worse, lurches as the safety system engages asymmetrically across joints. Fix: either (1) add a singularity-avoidance cost to the planner (requires evaluating κ(J) during planning — expensive but correct), or (2) use DLS always (cheap but always incurs tracking error), or (3) post-process planned paths with a singularity-check pass before execution.
The damping factor λ² is not a deployment parameter to be set once and forgotten. Its appropriate value depends on σ_min (a variable), the task's tracking requirements (task-dependent), and the arm's velocity limits (hardware-dependent). An arm with tight velocity limits needs smaller λ² when well-conditioned (to avoid losing tracking accuracy unnecessarily) but larger λ² near singularities (to prevent saturation). Fixed λ² is always a compromise that is wrong in both regimes. Variable-λ DLS (Sugihara 2009) is the standard answer. Yet a large fraction of deployed arms use fixed λ² set during commissioning because it's simpler. If your arm tracks poorly during normal operation, check whether a too-large fixed λ² is the culprit.
Yoshikawa's manipulability index w = ∏σᵢ is taught first and sounds natural. But it hides dangerous configurations. Consider an arm with σ₁ = 2.0, σ₂ = 2.0, σ₃ = 2.0, σ₄ = 2.0, σ₅ = 2.0, σ₆ = 0.001: w ≈ 0.032. Now consider σ₁ = 0.2, σ₂ = 0.2, σ₃ = 0.2, σ₄ = 0.2, σ₅ = 0.2, σ₆ = 0.2: w ≈ 0.000064. The second arm (isotropic, all-equal) appears to have lower manipulability but its condition number is κ = 1 — it is perfectly well-conditioned. The first arm appears to have higher manipulability but κ = 2000 — it is near-singular and a single direction costs enormous joint velocity. For alarm purposes, monitor σ_min and κ, not w alone. Use w only as a general "away from singularity" scalar for visualization.
KEY INSIGHTHow this connects
- 2.4 · The Jacobian: Velocity Kinematics and the Spine of Robotics — this lesson is the direct extension of 2.4: the Jacobian was introduced as the linear map ẋ = J q̇; here we characterize what happens when J loses rank. The SVD factorization introduced here uses J directly as computed in 2.4.
- 2.6 · Inverse Kinematics: Closed-Form and Numerical Methods — IK solvers must handle singularities. Analytical IK has singularities embedded in its atan2 arguments (gimbal lock in Euler angles is the orientation singularity counterpart). Numerical IK iterates using the Jacobian inverse — DLS is the standard robustification. The next lesson formalizes both approaches with singularity handling built in.
Singularity analysis is where linear algebra makes contact with hardware failure. The SVD is not a mathematical abstraction here — it is the mechanism by which a Jacobian, evaluated in real time from joint encoder readings, determines whether the arm's velocity controller will saturate its motors in the next control cycle. Understanding this connection makes the subsequent study of IK, trajectory planning, and force control coherent rather than a collection of separate techniques.
GLOSSARYKey terms introduced
- Singularity (kinematic)
- A robot configuration at which the Jacobian J is rank-deficient. One or more directions of end-effector motion become instantaneously unreachable; the velocity inverse kinematics controller requires infinite joint velocities to produce motion in the lost direction.
- Wrist singularity
- The singularity occurring when joint 5 of a 6-DOF spherical-wrist arm is at 0°, causing joints 4 and 6 to become collinear. Their Jacobian columns become linearly dependent and rank(J) drops by 1.
- Shoulder singularity
- The singularity occurring when the wrist center of a 6-DOF arm lies on the axis of the base joint (joint 1). Joint 1 rotation produces no change in wrist center position, causing its Jacobian column to vanish from the position submatrix.
- Manipulability ellipsoid
- The set of all end-effector velocities producible by unit-norm joint velocities. Its semi-axes are the left singular vectors of J scaled by the singular values σᵢ. The volume of the ellipsoid is proportional to Yoshikawa's manipulability index w = ∏σᵢ.
- Condition number κ(J)
- The ratio σ_max / σ_min of the Jacobian's largest and smallest singular values. A scalar measure of proximity to singularity: κ = 1 means isotropic (ideal), κ → ∞ means singular. Used as a real-time alarm threshold in singularity monitors.
- Damped least squares (DLS)
- A singularity-robust velocity IK method that replaces the pseudoinverse J⁺ with Jᵀ(JJᵀ + λ²I)⁻¹. The damping factor λ² bounds joint velocity near singularities at the cost of end-effector tracking accuracy.
- Singular value decomposition (SVD)
- The factorization J = UΣVᵀ of the Jacobian into orthogonal matrices U, V and a diagonal matrix Σ of singular values. Used to compute the pseudoinverse (J⁺ = VΣ⁺Uᵀ), the manipulability ellipsoid, and the condition number.
ACTIVE RECALLCheck your understanding
Answer in your own words first, then reveal.
1A 6-DOF arm is executing a Cartesian trajectory and the velocity controller suddenly commands 800°/s on joint 5. The hardware limit is 180°/s. The safety stop triggers. Which quantity would have warned you this was coming, and how?›
The condition number κ(J) = σ_max / σ_min would have warned you. As σ_min → 0, the pseudoinverse term 1/σ_min → ∞, and joint velocities in the corresponding direction grow proportionally. Monitoring κ during trajectory execution — and raising an alarm when κ > 50, then activating DLS when κ > 200 — gives lead time before hardware limits are reached. A 800°/s command indicates κ is of order 800/ω_task ≈ hundreds, meaning you were well past the warning threshold. The singularity monitor publishing to /arm/singularity_alarm should have latched CRITICAL and triggered a velocity reduction or trajectory abort before saturation.
2Explain what the wrist singularity looks like physically for a standard 6-DOF arm, and why joint axes aligning causes rank loss in J.›
The wrist singularity occurs when q₅ = 0°: the arm is fully straight through the wrist. In this configuration, joints 4 and 6 both rotate about the same physical axis (the forearm longitudinal axis). Their Jacobian columns — both encoding angular velocity about that axis — are identical (or scalar multiples of each other). Linearly dependent columns reduce rank(J) by 1. Physically, rotating joint 4 by +Δθ and joint 6 by −Δθ simultaneously produces zero net end-effector motion — two joints cancel each other with no task-space result. This means one dimension of task-space angular velocity (rotation about the wrist's local z-axis) requires joint 4 and 6 to spin in opposite directions at theoretically infinite rate to produce a finite net motion — the textbook definition of a singularity.
3Why can a C-space path planner (like RRT) find a "valid" path that still causes the velocity controller to fail at execution time?›
C-space planners work in configuration space where distance is measured in joint angles, and validity is defined by joint limit constraints and collision checks. They have no concept of Jacobian rank — a configuration is either feasible (in bounds, collision-free) or not. A path that smoothly interpolates from q_start to q_goal in joint space may pass arbitrarily close to a singularity without any of the planner's validity checks noticing. At execution time, the velocity controller receives joint-angle waypoints and computes q̇ = J⁻¹ ẋ at each step. Near the singularity, J is ill-conditioned, 1/σ_min is large, and the computed q̇ exceeds hardware limits. The planner never computed J and had no way to predict this. Fix: either augment the planner's cost function with a Jacobian-conditionality penalty (expensive), or add a post-planning singularity check pass, or use DLS always in the controller.
4Damped least squares reduces joint velocity near singularities. What does it sacrifice, and how does variable-λ DLS address this tradeoff?›
DLS sacrifices end-effector tracking accuracy. The DLS factor σ/(σ² + λ²) is always smaller than the pseudoinverse factor 1/σ, so the arm moves less than commanded in every direction, not just the singular direction. With fixed λ², even when the arm is far from singularity (all σᵢ large), tracking is degraded because the denominator inflates unnecessarily. Variable-λ DLS (Sugihara 2009) addresses this by setting λ² = 0 when σ_min > ε (tracking is exact — identical to pseudoinverse) and ramping λ² up as σ_min falls toward zero. This gives the best of both worlds: exact tracking in the nonsingular workspace interior, with a smooth onset of damping only when the singularity is being approached. The cost is that λ² must be computed each control cycle (requiring the SVD, which is already needed to monitor σ_min).