Differential kinematics

Differential kinematics describes the relationship between joint velocities and the instantaneous linear and angular velocities of points and links in a robot manipulator.

For a robot with configuration

\[ \vec q= \begin{bmatrix} q_1 & q_2 & \cdots & q_n \end{bmatrix}^{T}, \]

the joint-velocity vector is

\[ \dot{\vec q}= \begin{bmatrix} \dot q_1 & \dot q_2 & \cdots & \dot q_n \end{bmatrix}^{T}. \]

The conventions used in this section follow Mathematical notation and conventions, Rotations, Homogeneous transformations, and Forward kinematics.

Geometric Jacobian

Moro uses the geometric Jacobian as the main differential-kinematics representation.

For the terminal frame, the geometric Jacobian satisfies

\[\begin{split} \boxed{ \begin{bmatrix} \vec v_{O_n}^{\,0}\\ \vec\omega_n^{\,0} \end{bmatrix} = J(\vec q)\dot{\vec q}. } \end{split}\]

Here,

  • \(\vec v_{O_n}^{\,0}\) is the linear velocity of the terminal origin,

  • \(\vec\omega_n^{\,0}\) is the angular velocity of the terminal link,

  • both quantities are expressed in the base frame \(\{0\}\).

For an \(n\)-degree-of-freedom robot,

\[ \boxed{ J(\vec q)\in\mathbb R^{6\times n}. } \]

The Jacobian is divided into linear and angular blocks:

\[\begin{split} \boxed{ J= \begin{bmatrix} J_v\\ J_\omega \end{bmatrix}, } \end{split}\]

where

\[ J_v\in\mathbb R^{3\times n} \]

and

\[ J_\omega\in\mathbb R^{3\times n}. \]

Therefore,

\[ \vec v_{O_n}^{\,0} = J_v(\vec q)\dot{\vec q}, \]

and

\[ \vec\omega_n^{\,0} = J_\omega(\vec q)\dot{\vec q}. \]

Geometric and analytical Jacobians

The geometric Jacobian should not be confused with an analytical Jacobian.

The geometric Jacobian maps joint rates directly to linear and angular velocity:

\[\begin{split} \begin{bmatrix} \vec v\\ \vec\omega \end{bmatrix} = J_G(\vec q)\dot{\vec q}. \end{split}\]

An analytical Jacobian instead maps joint rates to the time derivative of a chosen pose parametrization. For example,

\[\begin{split} \begin{bmatrix} \dot{\vec p}\\ \dot{\boldsymbol\eta} \end{bmatrix} = J_A(\vec q)\dot{\vec q}, \end{split}\]

where \(\boldsymbol\eta\) may represent Euler angles or another minimal orientation parametrization.

Important

id=”y1v91h” Angular velocity \(\vec\omega\) is not, in general, equal to the time derivative of a vector of Euler angles.

For this reason, the geometric and analytical Jacobians are different objects.

Moro’s main Jacobian interface refers to the geometric Jacobian.

Jacobian of an arbitrary point

Let \(P\) be a point rigidly attached to link \(k\).

Its position relative to frame \(\{k\}\) is

\[ \vec r_P^{\,k}. \]

The position of the same point with respect to the base frame is

\[ \tilde r_P^{\,0} = T_k^0 \tilde r_P^{\,k}. \]

The geometric Jacobian associated with this point is written as

\[\begin{split} \boxed{ J_P= \begin{bmatrix} J_{v,P}\\ J_{\omega,k} \end{bmatrix}. } \end{split}\]

It satisfies

\[\begin{split} \boxed{ \begin{bmatrix} \vec v_P^{\,0}\\ \vec\omega_k^{\,0} \end{bmatrix} = J_P(\vec q)\dot{\vec q}. } \end{split}\]

The upper block describes the linear velocity of the point \(P\).

The lower block describes the angular velocity of the rigid link \(k\) to which the point is attached.

Note

id=”psx3da” A geometric point does not possess an independent angular velocity. The angular block of \(J_P\) refers to the angular velocity of the rigid link containing the point.

Column-by-column construction

The geometric Jacobian can be constructed one column at a time using the joint axes and frame-origin positions obtained from forward kinematics.

Under the classic Denavit–Hartenberg convention used by Moro,

\[ \boxed{ \text{joint }i \text{ acts about or along }z_{i-1}. } \]

Therefore, the \(i\)-th Jacobian column depends on

\[ \vec z_{i-1}^{\,0} \]

and

\[ \vec r_{O_{i-1}}^{\,0}. \]

Revolute joint

For a revolute joint \(i\), the linear contribution to the velocity of a point \(P\) is

\[ \boxed{ J_{v,P,i} = \vec z_{i-1}^{\,0} \times \left( \vec r_P^{\,0} - \vec r_{O_{i-1}}^{\,0} \right). } \]

The angular contribution is

\[ \boxed{ J_{\omega,P,i} = \vec z_{i-1}^{\,0}. } \]

Thus,

\[\begin{split} \boxed{ J_{P,i} = \begin{bmatrix} \vec z_{i-1}^{\,0} \times \left( \vec r_P^{\,0} - \vec r_{O_{i-1}}^{\,0} \right) \\[2mm] \vec z_{i-1}^{\,0} \end{bmatrix}. } \end{split}\]

Prismatic joint

For a prismatic joint \(i\), the linear contribution is

\[ \boxed{ J_{v,P,i} = \vec z_{i-1}^{\,0}, } \]

while the angular contribution is zero:

\[ \boxed{ J_{\omega,P,i} = \vec 0. } \]

Therefore,

\[\begin{split} \boxed{ J_{P,i} = \begin{bmatrix} \vec z_{i-1}^{\,0}\\ \vec 0 \end{bmatrix}. } \end{split}\]

Joints that do not affect the point

If point \(P\) is attached to link \(k\), joints located after that link do not affect either the position of \(P\) or the orientation of link \(k\).

Therefore,

\[ \boxed{ i>k \quad\Rightarrow\quad J_{P,i} = \vec 0_{6\times1}. } \]

The complete point Jacobian may consequently be written as

\[\begin{split} J_{P,i} = \begin{cases} \begin{bmatrix} \vec z_{i-1}^{\,0}\times \left( \vec r_P^{\,0} - \vec r_{O_{i-1}}^{\,0} \right) \\ \vec z_{i-1}^{\,0} \end{bmatrix}, & \text{revolute},\ i\leq k, \\[6mm] \begin{bmatrix} \vec z_{i-1}^{\,0}\\ \vec 0 \end{bmatrix}, & \text{prismatic},\ i\leq k, \\[6mm] \vec 0, & i>k. \end{cases} \end{split}\]

End-effector Jacobian

The terminal geometric Jacobian is a special case of the point Jacobian.

Taking

\[ P=O_n \]

and

\[ k=n, \]

gives

\[ \boxed{ J=J_{O_n}. } \]

Thus, the end-effector Jacobian uses the same geometric construction as the Jacobian of any other point attached to the robot.

Linear Jacobian from forward kinematics

The linear block of the Jacobian can also be obtained by differentiating the forward-position map.

If

\[ \vec r_P^{\,0} = f_P(\vec q), \]

then

\[ \vec v_P^{\,0} = \frac{d}{dt}\vec r_P^{\,0}. \]

Applying the chain rule,

\[ \vec v_P^{\,0} = \frac{\partial\vec r_P^{\,0}} {\partial\vec q} \dot{\vec q}. \]

Therefore,

\[ \boxed{ J_{v,P} = \frac{\partial\vec r_P^{\,0}} {\partial\vec q}. } \]

This provides an alternative method for obtaining the linear Jacobian and is also useful for checking the geometric construction.

Angular velocity and rotation matrices

The angular block of the geometric Jacobian should not be obtained by simply differentiating an orientation parametrization.

For a rotation matrix

\[ R_i^0, \]

whose angular velocity is expressed in the base frame,

\[ \vec\omega_i^{\,0}, \]

the rotation-matrix derivative satisfies

\[ \boxed{ \dot R_i^0 = [\vec\omega_i^{\,0}]_\times R_i^0. } \]

Equivalently,

\[ \boxed{ [\vec\omega_i^{\,0}]_\times = \dot R_i^0(R_i^0)^T. } \]

This relationship shows why angular velocity is a geometric quantity distinct from the derivatives of Euler angles or other orientation coordinates.

In practice, for serial manipulators the angular Jacobian is naturally constructed from the joint axes.

Differential motion

For a small joint displacement

\[ \delta\vec q, \]

the corresponding first-order Cartesian displacement is approximately

\[ \delta\vec x \approx J(\vec q)\delta\vec q. \]

Similarly, in velocity form,

\[ \dot{\vec x} = J(\vec q)\dot{\vec q}, \]

where \(\dot{\vec x}\) represents the geometric velocity composed of linear and angular components.

This local linear approximation is one of the main reasons why the Jacobian plays a central role in robot motion analysis and numerical inverse kinematics.

Task Jacobians in Moro

For many applications the full six-component twist is not the relevant task. Moro therefore defines a task Jacobian by selecting rows from the end-effector geometric Jacobian.

The canonical component ordering is

\[ (v_x,v_y,v_z,\omega_x,\omega_y,\omega_z). \]

If a task selects components indexed by a row set \(\mathcal I\), then

\[ J_{task}=J[\mathcal I,:]. \]

Task selection does not change the underlying geometric convention: all selected linear and angular velocity components remain expressed in the base frame \(\{0\}\).

Moro provides the presets linear, angular, and twist, and also accepts explicit ordered subsets such as ("vx", "vy", "wz"). Explicit order is part of the task definition.

Forward Cartesian velocity

For a selected task, forward differential kinematics is

\[ \boxed{ \dot x_{task}=J_{task}(q)\dot q. } \]

This operation is direct: no inverse or optimization is involved. In Moro, cartesian_velocity() preserves exact SymPy arithmetic when all symbols have been resolved.

Velocity-level inverse kinematics

The inverse velocity problem seeks a joint velocity \(\dot q\) that realizes a desired task velocity \(\dot x_d\):

\[ J_{task}(q)\dot q\approx\dot x_d. \]

Because \(J_{task}\) may be square, rectangular, redundant, overdetermined, or rank deficient, Moro uses SVD-based generalized inverse methods rather than an ordinary matrix inverse.

Moore–Penrose pseudoinverse

The default solver uses

\[ \boxed{ \dot q=J^\dagger\dot x_d. } \]

For

\[ J=U\Sigma V^T, \]

the pseudoinverse is formed using reciprocal nonzero singular values above the numerical rank threshold.

For redundant systems, the pseudoinverse returns the minimum-norm joint velocity. For overdetermined systems, it returns the least-squares solution.

Rank deficiency is not itself an error: a requested velocity may still lie in the attainable task subspace.

Damped least squares

Near singular configurations, pseudoinverse solutions can require very large joint velocities. Moro also provides damped least squares:

\[ \boxed{ J_\lambda^\dagger = V\,\mathrm{diag}\!\left( \frac{\sigma_i}{\sigma_i^2+\lambda^2} \right)U^T, } \]

with \(\lambda>0\) supplied explicitly by the user.

Damping reduces amplification of small singular values, trading exact task tracking for smaller and numerically better-behaved joint velocities.

Residual and success

After solving, Moro defines the achieved task velocity as

\[ \dot x_a=J\dot q, \]

and the residual as

\[ \boxed{ r=\dot x_d-\dot x_a. } \]

The solver reports success when

\[ \|r\|_2\leq\texttt{tol}. \]

Thus, success is a task-achievement statement. It is deliberately independent from rank and condition number.

Joint-velocity saturation

Optional joint-velocity limits are applied component-wise after the unconstrained solution:

\[ \dot q_i=\operatorname{clip}(\dot q_i^\star,\dot q_{i,min},\dot q_{i,max}). \]

After clipping, the achieved velocity and residual are recomputed from the returned joint velocity. Moro 0.5.0 does not solve a constrained least-squares redistribution problem after saturation.

Numerical singularity and manipulability metrics

Moro 0.5.0 analyzes local kinematic capability from the selected task Jacobian, not necessarily from all six rows of the geometric Jacobian.

For

\( J_{task}\in\mathbb R^{m\times n}, \)

the compact singular-value decomposition is

\( J_{task}=U\Sigma V^T, \)

with

\( \sigma_1\ge\sigma_2\ge\cdots\ge\sigma_r\ge0, \qquad r=\min(m,n). \)

The same SVD policy is shared by velocity inverse kinematics and all public singularity/manipulability functions.

Singular values and numerical rank

singular_values() returns the compact spectrum as a SymPy column matrix. No zero padding is added.

With automatic rank classification, Moro uses

\( \tau=\max(m,n)\,\epsilon\,\sigma_{max}. \)

The numerical rank is

\( \operatorname{rank}(J)=\#\{\sigma_i>\tau\}. \)

jacobian_rank(..., tol=...) and is_singular(..., tol=...) may instead use a user-supplied positive absolute singular-value threshold.

Task-dependent singularity

Moro classifies the selected task as singular when

\( \boxed{ \operatorname{rank}(J_{task})<\min(m,n). } \)

This definition applies to square, redundant, and overdetermined Jacobians. Singularity is therefore a property of the chosen local task mapping, not an absolute label independent of task.

Condition number

For a numerically full-rank selected Jacobian,

\( \kappa(J)=\frac{\sigma_{max}}{\sigma_{min}}. \)

If the automatic rank policy classifies the matrix as rank deficient, condition_number() returns infinity.

Note

id=”condition-vs-explicit-rank-tol” condition_number() always uses the automatic internal threshold. Therefore is_singular(..., tol=1e-4) can be True while condition_number() remains large but finite.

For a regular one-dimensional task there is only one singular value, so the condition number is exactly one. This does not imply high absolute motion capability.

Yoshikawa velocity manipulability

For an explicitly selected task, Moro exposes the Yoshikawa velocity manipulability

\( w(q)=\sqrt{\det(JJ^T)}. \)

When \(m\le n\), the implementation uses the singular values directly:

\( \boxed{ w=\prod_{i=1}^{m}\sigma_i. } \)

If the task is rank deficient under the automatic threshold, Moro returns exactly 0.0 rather than a small roundoff-dependent positive value.

When \(m>n\), \(JJ^T\) is necessarily singular, so the \(m\)-dimensional Yoshikawa volume is also zero:

\( m>n\quad\Rightarrow\quad w=0. \)

This does not imply that is_singular() must be true. An \(m\times n\) Jacobian with \(m>n\) may still have full column rank \(n=\min(m,n)\).

Units and scale

Manipulability is scale sensitive. Translational rows, angular rows, revolute coordinates, and prismatic coordinates generally carry different units.

Moro 0.5.0 does not introduce characteristic-length normalization or automatic weighting. Reduced translational or angular tasks are therefore often easier to interpret physically than a mixed full-twist manipulability value.

Metrics answer different questions

Metric

Main question

rank / is_singular()

Has the selected task lost independent local directions?

condition number

How anisotropic or sensitive is the local mapping?

manipulability

What is the scale of the velocity-volume generated by the task Jacobian?

A large condition number is not identical to singularity, and zero manipulability is not globally equivalent to is_singular=True because of the \(m>n\) case.

Jacobian rank

The rank of the Jacobian indicates the number of independent instantaneous Cartesian velocity directions that the robot can generate.

For

\[ J\in\mathbb R^{6\times n}, \]

the rank satisfies

\[ \operatorname{rank}(J) \leq \min(6,n). \]

The maximum attainable rank depends on the robot structure and on the task being considered.

A configuration is singular when the relevant Jacobian loses rank relative to its maximum attainable value:

\[ \boxed{ \operatorname{rank}J(\vec q) < \operatorname{rank}_{\max}J. } \]

This definition applies whether or not the Jacobian is square.

Important

id=”g1r24w” The condition \(\det J=0\) can only be used directly when the relevant Jacobian is square. Rank provides the more general definition of a kinematic singularity.

Physical meaning of singularities

At a singular configuration, the manipulator loses the ability to generate one or more independent instantaneous Cartesian motions.

For some desired velocity

\[ \vec V_d, \]

there may be no joint velocity satisfying

\[ J\dot{\vec q} = \vec V_d. \]

Near a singularity, generating motion in certain Cartesian directions may also require very large joint velocities.

These effects are important in:

  • velocity control,

  • trajectory planning,

  • numerical inverse kinematics,

  • manipulability analysis.

Task-dependent singularities

The relevant Jacobian depends on the task.

For a full spatial pose task, the geometric Jacobian

\[ J\in\mathbb R^{6\times n} \]

may be the appropriate object.

For a position-only task, the relevant relationship is

\[ \vec v_P^{\,0} = J_{v,P}\dot{\vec q}, \]

and singularity analysis may instead focus on

\[ J_{v,P}\in\mathbb R^{3\times n}. \]

Thus, a configuration may be singular with respect to one task while retaining useful motion capabilities for another.

Null space

Joint velocities satisfying

\[ \boxed{ J(\vec q)\dot{\vec q}=0 } \]

belong to the null space of the Jacobian.

Such joint motions produce zero instantaneous velocity for the task represented by \(J\).

For redundant manipulators, nonzero null-space motions may exist even away from singular configurations.

These motions can later be exploited for secondary objectives, although null-space control is outside the scope of this section.

Example: planar 2R manipulator

Consider the planar 2R manipulator introduced previously.

Its terminal position is

\[\begin{split} \vec r_{O_2}^{\,0} = \begin{bmatrix} a_1\cos q_1+a_2\cos(q_1+q_2)\\ a_1\sin q_1+a_2\sin(q_1+q_2)\\ 0 \end{bmatrix}. \end{split}\]

For planar position analysis, only the \(x\) and \(y\) components are needed:

\[\begin{split} \vec p= \begin{bmatrix} x\\ y \end{bmatrix}. \end{split}\]

The linear Jacobian is obtained by differentiation:

\[ J_v = \frac{\partial(x,y)} {\partial(q_1,q_2)}. \]

Therefore,

\[\begin{split} \boxed{ J_v = \begin{bmatrix} -a_1\sin q_1-a_2\sin(q_1+q_2) & -a_2\sin(q_1+q_2) \\ a_1\cos q_1+a_2\cos(q_1+q_2) & a_2\cos(q_1+q_2) \end{bmatrix}. } \end{split}\]

Thus,

\[\begin{split} \begin{bmatrix} \dot x\\ \dot y \end{bmatrix} = J_v \begin{bmatrix} \dot q_1\\ \dot q_2 \end{bmatrix}. \end{split}\]

The same result can be obtained from the geometric construction using the two joint axes.

Singular configurations

For this \(2\times2\) position Jacobian,

\[ \det J_v = a_1a_2\sin q_2. \]

The Jacobian loses rank when

\[ \sin q_2=0, \]

that is,

\[ \boxed{ q_2=0 \quad\text{or}\quad q_2=\pi \pmod{2\pi}. } \]

At these configurations, the two links are collinear.

The manipulator loses one independent instantaneous direction of motion in the plane.

This illustrates the direct relationship between the algebraic rank of the Jacobian and the physical geometry of the robot.

Differential kinematics in Moro

The Robot class exposes the main geometric Jacobian quantities directly.

End-effector Jacobian

The complete geometric Jacobian of the end effector is available through

robot.J

Mathematically,

\[ \boxed{ \texttt{robot.J} \longleftrightarrow J_{O_n}. } \]

Internally, this is the Jacobian of the origin of the final frame.

Jacobian of an arbitrary point

For a point \(P\) attached to link \(i\), Moro provides

robot.J_point(point, i)

where point contains the local coordinates

\[ \vec r_P^{\,i}. \]

The returned matrix is the complete geometric Jacobian

\[\begin{split} \boxed{ J_P = \begin{bmatrix} J_{v,P}\\ J_{\omega,i} \end{bmatrix}. } \end{split}\]

The point coordinates are transformed internally to the base frame before constructing the Jacobian columns.

Center-of-mass Jacobians

For the center of mass \(C_i\) of link \(i\), Moro provides

robot.J_cm_i(i)

which corresponds to

\[\begin{split} J_{C_i} = \begin{bmatrix} J_{v,C_i}\\ J_{\omega,i} \end{bmatrix}. \end{split}\]

The linear and angular blocks are also available separately:

robot.Jv_cm_i(i)
robot.Jw_cm_i(i)

corresponding to

\[ J_{v,C_i} \]

and

\[ J_{\omega,i}, \]

respectively.

These quantities are particularly useful in the dynamic formulation of serial manipulators.

Summary of conventions

The main differential-kinematics conventions used by Moro are:

Concept

Convention

Main Jacobian type

Geometric Jacobian

Jacobian size

\(6\times n\)

Structure

\(J=[J_v^T\ J_\omega^T]^T\)

Velocity relation

\([\vec v^T\ \vec\omega^T]^T=J\dot{\vec q}\)

Expression frame

Base frame \(\{0\}\)

Revolute linear column

\(\vec z_{i-1}^{\,0}\times(\vec r_P^{\,0}-\vec r_{O_{i-1}}^{\,0})\)

Revolute angular column

\(\vec z_{i-1}^{\,0}\)

Prismatic linear column

\(\vec z_{i-1}^{\,0}\)

Prismatic angular column

\(\vec 0\)

Joint after link \(k\)

Zero column for a point on link \(k\)

Linear Jacobian

\(J_{v,P}=\partial\vec r_P^{\,0}/\partial\vec q\)

End-effector Jacobian

Robot.J

Arbitrary-point Jacobian

Robot.J_point(point, i)

Singular configuration

Loss of Jacobian rank

Differential kinematics provides the local relationship between joint motion and Cartesian motion and forms the mathematical basis for singularity analysis, velocity control, and Jacobian-based inverse kinematics.