When a collaborative robot hands you a cup of coffee, it needs to move its end-effector smoothly through space at a controlled velocity. But the robot’s motors operate in joint space, spinning individual joints at angular rates. The Jacobian matrix is the bridge between these two worlds, translating joint velocities into end-effector velocities and vice versa. It also reveals dangerous configurations where the robot loses the ability to move in certain directions, and it provides the mathematical foundation for force control in human-robot collaboration. #robotics #jacobian #velocity-kinematics
🎯 Learning Objectives
By the end of this lesson, you will be able to:
Derive the Jacobian matrix for serial robot manipulators Core Theory
Compute forward and inverse velocity mappings between joint space and task space Analysis
Detect singularities and interpret their physical meaning Critical
Visualize manipulability ellipsoids using singular value decomposition Advanced
Apply the pseudoinverse method for redundant manipulators Practical
Map end-effector forces to joint torques using the Jacobian transpose Force Control
🔧 Real-World Engineering Challenge: Collaborative Robot with Force-Limited Operation
A collaborative robot on a manufacturing line must hand components to a human worker. Safety regulations (ISO/TS 15066) require that contact forces never exceed 150 N at the end-effector. The robot controller needs to continuously monitor how joint torques translate into end-effector forces, and it must detect configurations where the robot could inadvertently generate excessive forces due to mechanical advantage near singularities. The Jacobian matrix provides exactly this capability: it maps between joint-space quantities (velocities, torques) and task-space quantities (end-effector velocities, forces) in real time.
System Challenge: Safe Velocity and Force Control
Critical Engineering Questions:
Why the Jacobian Is Essential for Collaborative Robots
In traditional industrial robots behind safety cages, singularity avoidance and force control are important but not safety-critical in the same way. Collaborative robots operate in shared workspaces with humans, so the consequences of uncontrolled motion or unexpected forces are immediate and potentially dangerous. The Jacobian provides the mathematical framework for: (1) real-time velocity monitoring to ensure smooth, predictable motion, (2) force limiting by mapping joint torques to end-effector forces, (3) singularity detection to prevent loss of control, and (4) manipulability analysis to plan paths through high-dexterity configurations.
Collaborative Robot Design Challenge
Design Goal: Implement Jacobian-based velocity and force control for a collaborative 2R planar robot, with extensions to redundant 3R configurations.
Key Requirements:
Velocity Mapping: Compute end-effector velocity from joint rates in real time
Trajectory Tracking: Generate joint velocities for straight-line end-effector paths
Singularity Monitoring: Detect and avoid configurations where control degrades
Force Safety: Ensure end-effector forces stay within ISO/TS 15066 limits
📚 Fundamental Theory
What is the Jacobian?
The Jacobian is a matrix of partial derivatives that describes how small changes in one set of variables produce changes in another set. In robotics, the Jacobian relates joint velocities to end-effector velocities. Think of it as a “gear ratio matrix” that changes with the robot’s configuration.
Simple Analogies:
Bicycle Gear Ratio
On a bicycle, the gear ratio determines how pedal rotation speed translates to wheel rotation speed. The Jacobian is the robotic equivalent, but instead of a single ratio, it is an entire matrix because the robot has multiple joints and the end-effector moves in multiple directions. And unlike a fixed gear ratio, the Jacobian changes as the robot moves.
Puppet Strings
A puppeteer pulls strings (joint velocities) to make a puppet’s hand move (end-effector velocity). The relationship between string pulls and hand motion depends on the puppet’s current pose. Some poses make the hand easy to move in all directions; others make certain directions difficult or impossible. The Jacobian captures exactly this configuration-dependent relationship.
Mathematical Definition
For a general -DOF robot with forward kinematics , where is the joint variable vector and is the task-space vector, the Jacobian matrix is defined as:
The velocity relationship is then:
where is the vector of joint velocities and is the end-effector velocity vector.
Full Derivation: 2-Link Planar Robot (2R)
Let us derive the Jacobian step by step for a 2R planar robot with link lengths and , and joint angles and .
Step 1: Forward Kinematics Equations
The end-effector position in terms of the joint angles is:
Here, is measured from the positive -axis, and is the relative angle of link 2 with respect to link 1.
Step 2: Compute Partial Derivatives
We need four partial derivatives to build the Jacobian.
Partial derivatives of :
Partial derivatives of :
Detailed differentiation walkthrough
Consider . Differentiating with respect to : the first term gives by the chain rule. The second term gives because appears inside . Now differentiating with respect to : the first term has no dependence, so it vanishes. The second term gives . The same logic applies to the equations using derivatives of .
Step 3: Assemble the Jacobian Matrix
Combining all four partial derivatives into matrix form:
Problem: Given joint velocities and , find end-effector velocity .
Method: Direct matrix multiplication.
This is always straightforward because the Jacobian is computed from the current configuration and the multiplication is a simple linear operation.
When to use: Monitoring the actual end-effector velocity from measured joint encoder rates. This is critical for collaborative robots to verify that the end-effector is not moving too fast near a human worker.
Problem: Given a desired end-effector velocity , find the required joint velocities and .
Method: Solve the linear system by inverting the Jacobian (when it is square and non-singular).
For the 2R robot, the inverse of the Jacobian is:
When to use: Trajectory tracking, where you specify a desired path in task space (such as a straight line) and need to compute the corresponding joint velocities at each time step.
Numerical Example
Let us work through a complete numerical example to solidify the concepts. Consider a 2R robot with m, m, at configuration , . The joints are moving at rad/s and rad/s.
Compute trigonometric values:
, so ,
, so ,
Build the Jacobian:
Forward velocity mapping:
The end-effector speed is m/s.
Compute the determinant:
Since , the robot is not at a singularity and the inverse velocity mapping is well-defined.
Inverse velocity example: Suppose we want m/s, m/s (pure horizontal motion). Then:
Singularity Analysis
Singularities are configurations where the Jacobian loses rank, meaning the robot cannot generate end-effector velocities in certain directions regardless of how fast the joints move. Detecting and avoiding singularities is essential for safe robot operation.
Determinant of the Jacobian
For the 2R robot, the determinant is:
Expanding and simplifying using the identity :
Step-by-step determinant simplification
Starting from the expanded determinant:
The terms cancel:
Now apply the subtraction formula:
With and :
Therefore:
Singular Configurations
The singularity condition occurs when , which means or .
Configuration: Both links are collinear, pointing in the same direction.
Physical meaning: The end-effector is at the maximum reach . At this boundary, the robot cannot move radially outward because it is already fully stretched. Both joints can only produce tangential (circular) motion. One degree of freedom in task space is lost.
Consequence for collaborative robots: Near full extension, even small radial velocity demands require extremely large joint velocities, which is dangerous. The controller must slow down or redirect the trajectory well before reaching this configuration.
Configuration: Link 2 folds back on link 1, so the end-effector is at minimum reach .
Physical meaning: The robot is at its inner workspace boundary. Similar to the extended case, radial motion toward the base is impossible. If , the end-effector reaches the base and the entire arm collapses to a point, losing all directional control.
Consequence for collaborative robots: Folded configurations can cause rapid, unpredictable accelerations when the robot tries to “unfold.” Force monitoring must be especially vigilant near these poses.
Manipulability Ellipsoids
The manipulability ellipsoid provides a geometric visualization of the robot’s velocity capability at any configuration. If all joints move at unit speed (), the set of achievable end-effector velocities forms an ellipsoid in task space. The shape and size of this ellipsoid reveal directional preferences and overall dexterity.
The ellipsoid is determined by the singular value decomposition (SVD) of the Jacobian:
where contains the singular values, defines the principal directions in task space, and defines the principal directions in joint space.
Key properties:
The semi-axes of the ellipsoid have lengths equal to the singular values
The directions of the semi-axes are the columns of
The manipulability index is (for square Jacobians)
The condition number measures isotropy ( is perfectly isotropic)
Interpreting the Manipulability Ellipsoid
Large, circular ellipsoid: The robot can move the end-effector equally well in all directions. This is the ideal configuration for collaborative tasks.
Elongated ellipsoid: The robot moves easily along the major axis but poorly along the minor axis. The task should be oriented along the major axis if possible.
Degenerate (flat) ellipsoid: One singular value is near zero, indicating proximity to a singularity. The robot effectively loses one DOF. Avoid this configuration.
Pseudoinverse for Redundant Robots
When a robot has more joints than task-space dimensions (e.g., a 3R planar robot controlling 2D position), the system is redundant. There are infinitely many joint velocity solutions for any desired end-effector velocity. The Moore-Penrose pseudoinverse provides the minimum-norm solution, and the null space allows additional objectives like singularity avoidance or joint limit avoidance.
For a redundant robot with Jacobian (), the pseudoinverse is:
The general solution to is:
where is an arbitrary vector, and projects it onto the null space of .
3-Link Planar Robot Example:
For a 3R robot with link lengths and joint angles :
The Jacobian is :
where and .
The null space has dimension , meaning one DOF of internal motion can reconfigure the arm without moving the end-effector. This extra freedom is used for:
Singularity avoidance: Choose to maximize
Joint limit avoidance: Choose to push joints away from their limits
Obstacle avoidance: Choose to move the elbow away from obstacles
Force and Torque Mapping
The Jacobian also relates end-effector forces to joint torques through the principle of virtual work. If the end-effector exerts a force on the environment, the required joint torques are given by the Jacobian transpose.
This relationship is the dual of the velocity mapping. While velocity maps forward through , force maps backward through .
Force Mapping for Collaborative Safety
ISO/TS 15066 Compliance:
Given a maximum allowable end-effector force N, the controller must ensure:
Or equivalently, limit joint torques such that the resulting end-effector force stays safe. Near singularities, small joint torques can produce large end-effector forces along certain directions, making force monitoring especially critical.
Python Code: Jacobian Computation and Velocity Mapping
import numpy as np
defjacobian_2r(theta1, theta2, L1, L2):
"""
Compute the Jacobian matrix for a 2R planar robot.
print(f"Minimum |det(J)| during motion: {np.min(np.abs(det_hist)):.4f}")
🎯 System Application: Collaborative Robot Force Limiting
Now let us apply everything we have learned to the original collaborative robot challenge. The robot must track a handoff trajectory while continuously monitoring that end-effector forces remain within the 150 N safety limit specified by ISO/TS 15066.
Force-Limited Trajectory Execution
The control loop at each time step:
Measure the current joint angles from encoders and joint torques from torque sensors.
Compute the Jacobian for the current configuration.
Estimate end-effector force using . If , reduce joint torques proportionally.
Check singularity proximity via . If below threshold, activate damped least-squares and reduce speed.
Compute desired joint velocities via (or pseudoinverse for redundant robots).
Clamp joint velocities to respect actuator limits and safety speed constraints.
Command the clamped joint velocities to the motor controllers.
Force Monitoring Example
For our 2R robot at the numerical example configuration (, ), suppose the joint torques are Nm and Nm. The end-effector force is:
Using the Jacobian inverse computed earlier:
The force magnitude is N, well within the 150 N limit at this configuration.
🛠️ Design Guidelines
Jacobian Computation
Practice: Compute the Jacobian symbolically first, then implement numerically. Verify against finite-difference approximations during development.
Frequency: The Jacobian must be recomputed at every control cycle (typically 1 kHz for collaborative robots).
Singularity Management
Detection: Monitor or the minimum singular value .
Response: Use damped least-squares ( to ) near singularities. Reduce speed. Never allow the robot to pass through a singularity at full speed.
Redundancy Exploitation
When available: Use the null space for secondary objectives such as joint limit avoidance, singularity avoidance, or obstacle avoidance.
Priority: Primary task (end-effector motion) always takes precedence. Null-space motion must not interfere with the primary task.
Force Safety
Mapping: Use to convert force limits into joint torque limits.
Configuration-dependent: Force limits on joint torques must be updated at every control cycle because the Jacobian changes with configuration.
Practical Checklist
Derive the Jacobian analytically for your specific robot geometry. Validate against numerical differentiation.
Map your workspace for singularity locations. Mark these on the trajectory planner’s obstacle map.
Set singularity thresholds based on your application’s speed and force requirements.
Implement damped least-squares as a fallback for near-singular configurations.
Test force mapping at multiple configurations, especially near workspace boundaries.
For redundant robots, implement null-space optimization with appropriate secondary objectives.
📋 Summary
Key Concepts Covered
The Jacobian matrix maps joint velocities to end-effector velocities through
Forward velocity mapping is always straightforward (matrix multiplication)
Inverse velocity mapping requires (square) or (redundant) and fails at singularities
Singularities occur when ; for the 2R robot, this means
Pseudoinverse gives the minimum-norm solution for redundant robots, with null-space freedom for secondary objectives
Force mapping uses and is the dual of velocity mapping
Collaborative safety requires continuous Jacobian-based force monitoring, especially near singularities
What Comes Next
In Lesson 5, we will build on the Jacobian to plan smooth trajectories in both joint space and task space, using polynomial interpolation and velocity profiles to execute pick-and-place operations with the collaborative robot.
Comments