Chapter 16: Parallel Robot Kinematics and Dynamics

Lesson 2: Constraint-Based Jacobians

This lesson develops the Jacobian structure of parallel robots starting from their holonomic constraint equations. We characterize the constraint Jacobian, show how it induces mappings between actuator rates and platform twist, and work out a concrete planar 3-RPR example. Both algebraic properties (rank, null space) and practical computation (symbolic and numerical) are discussed, with multi-language implementation sketches.

1. Conceptual Overview of Constraint-Based Jacobians

For serial manipulators, the Jacobian is usually derived from a forward kinematics map \( \mathbf{x} = f(\mathbf{q}) \), where \( \mathbf{q} \) denotes joint coordinates and \( \mathbf{x} \) a task-space pose or twist. Parallel robots are fundamentally different: the motion of the end-effector (moving platform) is defined implicitly by closure constraints linking the platform pose and all leg joint coordinates.

Let \( \mathbf{q} \in \mathbb{R}^{n} \) denote the vector of (actuated) leg joint coordinates and \( \mathbf{x} \in \mathbb{R}^{m} \) the generalized coordinates of the moving platform (typically position and orientation parameters). The parallel mechanism geometry can be encoded by a system of holonomic constraints

\[ \boldsymbol{\Phi}(\mathbf{q}, \mathbf{x}) = \mathbf{0}, \quad \boldsymbol{\Phi} : \mathbb{R}^{n+m} \to \mathbb{R}^{k}. \]

The constraint-based Jacobian is obtained by linearizing these equations:

\[ \mathbf{J}_c(\mathbf{q},\mathbf{x}) = \begin{bmatrix} \dfrac{\partial \boldsymbol{\Phi}}{\partial \mathbf{q}} & \dfrac{\partial \boldsymbol{\Phi}}{\partial \mathbf{x}} \end{bmatrix} \in \mathbb{R}^{k \times (n+m)}. \]

For small motions around a regular configuration, admissible velocities \( \dot{\mathbf{q}}, \dot{\mathbf{x}} \) satisfy the linearized constraint

\[ \underbrace{\frac{\partial \boldsymbol{\Phi}}{\partial \mathbf{q}}}_{\mathbf{J}_q} \dot{\mathbf{q}} + \underbrace{\frac{\partial \boldsymbol{\Phi}}{\partial \mathbf{x}}}_{\mathbf{J}_x} \dot{\mathbf{x}} = \mathbf{0}. \]

From this relation we derive various Jacobian mappings: actuator-space to platform-space, and conversely, platform twist to actuator rates. These mappings play the same conceptual role as the Jacobian in serial robots but are obtained from the constraint structure, not from an explicit forward kinematics function.

flowchart TD
  G["Geometric model: base, platform, legs"] --> C["Write constraints: Phi(q,x)=0"]
  C --> D["Differentiate: J_q dq + J_x dx = 0"]
  D --> S["Solve linear system for mappings"]
  S --> JF["Jacobian J_f: xdot = J_f qdot"]
  S --> JI["Jacobian J_i: qdot = J_i xdot"]
  JF --> A["Velocity and statics analysis"]
  JI --> A
        

2. Holonomic Constraint Formulation in Parallel Robots

For fully parallel manipulators (e.g. Stewart platforms, 3-RPR planar platforms), each kinematic leg forms a closed loop with the platform and the base. Its geometry yields one or several algebraic constraint equations. Stacking all leg constraints gives the vector function \( \boldsymbol{\Phi}(\mathbf{q},\mathbf{x}) \).

We assume that internal passive joint coordinates have already been eliminated by geometry, so \( \mathbf{q} \) collects the actuated joint coordinates (prismatic strokes or active rotations). For a typical fully constrained parallel robot with \( n = m \) actuators and an \( m \)-DOF platform, the number of independent constraint equations is commonly \( k = m \).

In this setting, the configuration is implicitly defined as all \( (\mathbf{q},\mathbf{x}) \) satisfying

\[ \boldsymbol{\Phi}(\mathbf{q},\mathbf{x}) = \mathbf{0}, \quad \operatorname{rank} \left( \frac{\partial \boldsymbol{\Phi}}{\partial \mathbf{q}}, \frac{\partial \boldsymbol{\Phi}}{\partial \mathbf{x}} \right) = k \]

at regular configurations. Here the rank condition ensures independent constraints near the configuration.

The instantaneous configuration space is given by

\[ \mathcal{V} = \left\{ (\dot{\mathbf{q}}, \dot{\mathbf{x}}) \in \mathbb{R}^{n+m} \;\middle|\; \mathbf{J}_q \dot{\mathbf{q}} + \mathbf{J}_x \dot{\mathbf{x}} = \mathbf{0} \right\}. \]

Linear algebra shows that the dimension of this space is \( n + m - k \). In regular regions of the workspace, this agrees with the system's DOF obtained earlier from constraint counting in Chapter 4 and from Lagrangian constrained dynamics in Chapter 15.

3. Differentiation of Constraints and Instantaneous DOF

We now formalize the velocity-level constraint relation by differentiating the holonomic constraints with respect to time. Assuming \( \boldsymbol{\Phi} \) is continuously differentiable, the chain rule gives

\[ \frac{d}{dt}\boldsymbol{\Phi}(\mathbf{q},\mathbf{x}) = \frac{\partial \boldsymbol{\Phi}}{\partial \mathbf{q}}\dot{\mathbf{q}} + \frac{\partial \boldsymbol{\Phi}}{\partial \mathbf{x}}\dot{\mathbf{x}} = \mathbf{0}. \]

Define the partitioned Jacobians

\[ \mathbf{J}_q(\mathbf{q},\mathbf{x}) = \frac{\partial \boldsymbol{\Phi}}{\partial \mathbf{q}} \in \mathbb{R}^{k \times n}, \quad \mathbf{J}_x(\mathbf{q},\mathbf{x}) = \frac{\partial \boldsymbol{\Phi}}{\partial \mathbf{x}} \in \mathbb{R}^{k \times m}. \]

The linearized constraint is then

\[ \mathbf{J}_q \dot{\mathbf{q}} + \mathbf{J}_x \dot{\mathbf{x}} = \mathbf{0}, \quad \mathbf{J}_c = \begin{bmatrix} \mathbf{J}_q & \mathbf{J}_x \end{bmatrix}. \]

Let \( n_{\text{tot}} = n + m \). From linear algebra, the set of solutions of \( \mathbf{J}_c \mathbf{v} = \mathbf{0} \), \( \mathbf{v} = (\dot{\mathbf{q}},\dot{\mathbf{x}}) \), is a linear subspace of dimension

\[ \dim \ker(\mathbf{J}_c) = n_{\text{tot}} - \operatorname{rank}(\mathbf{J}_c). \]

Assuming \( \operatorname{rank}(\mathbf{J}_c) = k \), the instantaneous degrees of freedom are

\[ \text{DOF}_{\text{inst}} = n + m - k. \]

For a well-designed \( m \)-DOF parallel robot with \( n=m \) actuators and \( k=m \) independent constraints, we obtain \( \text{DOF}_{\text{inst}} = m \), as expected.

This provides a rigorous instantaneous analogue to the Grübler–Kutzbach formula derived earlier in Chapter 4, but here expressed directly in terms of the constraint Jacobian.

4. Actuator-to-Platform and Platform-to-Actuator Jacobians

In motion analysis and control, we require explicit mappings between actuator rates and the platform twist. Under mild regularity assumptions, the constraint relation yields two complementary Jacobian operators.

4.1 Actuator-to-platform Jacobian \( \mathbf{J}_f \)

Assume \( n = m = k \) and \( \mathbf{J}_x \) is invertible at the considered configuration. Then

\[ \mathbf{J}_q \dot{\mathbf{q}} + \mathbf{J}_x \dot{\mathbf{x}} = \mathbf{0} \quad\Rightarrow\quad \dot{\mathbf{x}} = - \mathbf{J}_x^{-1}\mathbf{J}_q \dot{\mathbf{q}}. \]

Define the forward Jacobian

\[ \mathbf{J}_f(\mathbf{q},\mathbf{x}) = - \mathbf{J}_x^{-1}(\mathbf{q},\mathbf{x}) \, \mathbf{J}_q(\mathbf{q},\mathbf{x}), \quad \dot{\mathbf{x}} = \mathbf{J}_f \dot{\mathbf{q}}. \]

This plays the role of the serial manipulator Jacobian: it maps actuator rates to the instantaneous platform twist. However, it is computed from the constraint Jacobians rather than from an explicit \( \mathbf{x} = f(\mathbf{q}) \).

4.2 Platform-to-actuator Jacobian \( \mathbf{J}_i \)

Conversely, if \( \mathbf{J}_q \) is invertible, the constraint relation implies

\[ \dot{\mathbf{q}} = - \mathbf{J}_q^{-1} \mathbf{J}_x \dot{\mathbf{x}} = \mathbf{J}_i(\mathbf{q},\mathbf{x}) \dot{\mathbf{x}}, \quad \mathbf{J}_i = - \mathbf{J}_q^{-1} \mathbf{J}_x. \]

This inverse Jacobian directly provides actuator rates necessary to achieve a desired platform twist. In fully parallel manipulators with \( n = m = k \), both \( \mathbf{J}_f \) and \( \mathbf{J}_i \) exist (outside singularities) and satisfy

\[ \mathbf{J}_f \mathbf{J}_i = \left(-\mathbf{J}_x^{-1}\mathbf{J}_q\right) \left(-\mathbf{J}_q^{-1}\mathbf{J}_x\right) = \mathbf{I}_m, \quad \mathbf{J}_i \mathbf{J}_f = \mathbf{I}_n. \]

Thus, \( \mathbf{J}_f \) and \( \mathbf{J}_i \) are matrix inverses of each other at regular configurations, and both are derived from the same underlying constraint Jacobian pair \( (\mathbf{J}_q,\mathbf{J}_x) \).

In Chapter 9, a related relation appears in statics: the wrench transmitted to the platform is mapped to actuator forces/torques via the transpose of the appropriate Jacobian. For parallel robots, the constraint-based Jacobian is therefore central to both kinematics and statics.

5. Example – Planar 3-RPR Parallel Manipulator

Consider a planar 3-RPR robot: each leg consists of a revolute joint at the base (R), an actuated prismatic joint (P), and a revolute joint (R) at the moving platform. We focus on a reduced model in which passive revolute joints are eliminated and only the prismatic strokes \( L_i \) appear explicitly.

5.1 Geometry and constraints

Let the base anchors be \( \mathbf{B}_i \in \mathbb{R}^2 \), and the platform attachment points (expressed in the platform frame) be \( \mathbf{P}_i \in \mathbb{R}^2 \) for \( i=1,2,3 \). Let \( \mathbf{p} = [x\;y]^\top \) denote the platform origin in the base frame, and let \( \varphi \) be its orientation about the plane normal.

The rotation matrix in the plane is

\[ \mathbf{R}(\varphi) = \begin{bmatrix} \cos\varphi & -\sin\varphi \\ \sin\varphi & \cos\varphi \end{bmatrix}. \]

The vector from base anchor \( \mathbf{B}_i \) to platform point \( \mathbf{P}_i \) expressed in the base frame is

\[ \mathbf{d}_i(\mathbf{q},\mathbf{x}) = \mathbf{p} + \mathbf{R}(\varphi)\mathbf{P}_i - \mathbf{B}_i \in \mathbb{R}^{2}. \]

The prismatic stroke \( L_i \) must satisfy \( \|\mathbf{d}_i\| = L_i \), giving the constraint equations

\[ \Phi_i(\mathbf{q},\mathbf{x}) = \mathbf{d}_i^\top \mathbf{d}_i - L_i^2 = 0, \quad i = 1,2,3, \]

where \( \mathbf{q} = [L_1\;L_2\;L_3]^\top \) and \( \mathbf{x} = [x\;y\;\varphi]^\top \). Stacking the constraints gives \( \boldsymbol{\Phi}(\mathbf{q},\mathbf{x}) \in \mathbb{R}^3 \).

5.2 Constraint Jacobians

We compute partial derivatives for each leg:

  • Derivative with respect to \( L_j \). Since \( \Phi_i = \|\mathbf{d}_i\|^2 - L_i^2 \), we obtain

    \[ \frac{\partial \Phi_i}{\partial L_j} = -2 L_i \,\delta_{ij}, \]

    so the matrix \( \mathbf{J}_q \) is diagonal:

    \[ \mathbf{J}_q = \frac{\partial \boldsymbol{\Phi}}{\partial \mathbf{q}} = -2 \, \operatorname{diag}(L_1, L_2, L_3). \]

  • Derivative with respect to \( x, y \). We have \( \Phi_i = \mathbf{d}_i^\top \mathbf{d}_i - L_i^2 \) and \( \partial \mathbf{d}_i / \partial x = [1\;0]^\top \), \( \partial \mathbf{d}_i / \partial y = [0\;1]^\top \). Thus

    \[ \frac{\partial \Phi_i}{\partial x} = 2 \mathbf{d}_i^\top \frac{\partial \mathbf{d}_i}{\partial x} = 2 d_{ix}, \quad \frac{\partial \Phi_i}{\partial y} = 2 d_{iy}, \]

    where \( d_{ix}, d_{iy} \) are components of \( \mathbf{d}_i \).
  • Derivative with respect to \( \varphi \). Using \( \mathbf{d}_i = \mathbf{p} + \mathbf{R}(\varphi)\mathbf{P}_i - \mathbf{B}_i \), we obtain

    \[ \frac{\partial \mathbf{d}_i}{\partial \varphi} = \mathbf{S}\mathbf{R}(\varphi)\mathbf{P}_i, \quad \mathbf{S} = \begin{bmatrix} 0 & -1 \\ 1 & 0 \end{bmatrix}, \]

    so

    \[ \frac{\partial \Phi_i}{\partial \varphi} = 2 \mathbf{d}_i^\top \frac{\partial \mathbf{d}_i}{\partial \varphi} = 2 \mathbf{d}_i^\top \mathbf{S}\mathbf{R}(\varphi)\mathbf{P}_i. \]

Collecting these into rows indexed by \( i \) gives \( \mathbf{J}_x \in \mathbb{R}^{3\times 3} \) as

\[ \mathbf{J}_x = \begin{bmatrix} 2d_{1x} & 2d_{1y} & 2\mathbf{d}_1^\top\mathbf{S}\mathbf{R}(\varphi)\mathbf{P}_1 \\ 2d_{2x} & 2d_{2y} & 2\mathbf{d}_2^\top\mathbf{S}\mathbf{R}(\varphi)\mathbf{P}_2 \\ 2d_{3x} & 2d_{3y} & 2\mathbf{d}_3^\top\mathbf{S}\mathbf{R}(\varphi)\mathbf{P}_3 \end{bmatrix}. \]

Assuming \( \det(\mathbf{J}_x) \neq 0 \), the actuator-to-platform Jacobian is

\[ \mathbf{J}_f = - \mathbf{J}_x^{-1} \mathbf{J}_q = 2 \mathbf{J}_x^{-1} \operatorname{diag}(L_1, L_2, L_3), \quad \dot{\mathbf{x}} = \mathbf{J}_f \dot{\mathbf{q}}. \]

This compact formula is often used in numerical simulation and motion planning for planar parallel mechanisms.

6. Computational Pipeline and Numerical Considerations

Evaluating constraint-based Jacobians numerically is straightforward once the geometric parameters and current configuration are known. The core steps involve computing the leg vectors, forming \( \mathbf{J}_q \) and \( \mathbf{J}_x \) from analytic expressions, and solving a small linear system.

flowchart TD
  IN["Input: geometry (B_i,P_i), q, x"] --> D1["Compute d_i = p + R(phi) P_i - B_i"]
  D1 --> JQ["Assemble J_q from dPhi/dq \n(often diagonal)"]
  D1 --> JX["Assemble J_x from dPhi/dx"]
  JX --> SOLV["Factor or invert J_x (or J_q)"]
  SOLV --> JF2["Compute J_f = - J_x^{-1} J_q"]
  SOLV --> JI2["Or J_i = - J_q^{-1} J_x"]
  JF2 --> CHECK["Check conditioning / rank"]
  JI2 --> CHECK
        

In implementations:

  • For small parallel robots, \( \mathbf{J}_x \) and \( \mathbf{J}_q \) are typically \( 3\times 3 \) or \( 6\times 6 \), so dense linear algebra (LU or QR factorization) is sufficient.
  • Near configurations where \( \mathbf{J}_x \) or \( \mathbf{J}_q \) becomes ill-conditioned, numerical inversion is unreliable and small errors in joint velocities can produce large twists. This phenomenon connects directly to singularities, which will be treated systematically in Lesson 3 for parallel mechanisms.
  • For analytic derivations (symbolic Jacobians), computer algebra systems such as SymPy (Python), the Symbolic Math Toolbox (MATLAB), or Mathematica can substantially reduce derivation effort and simplify expressions.

7. Python Implementation – 3-RPR Constraint Jacobian

We now implement the constraint-based Jacobian for the 3-RPR example in Python using sympy for analytic derivation and numpy for numerical evaluation.


import sympy as sp
import numpy as np

# Symbolic variables
x, y, phi = sp.symbols('x y phi', real=True)
L1, L2, L3 = sp.symbols('L1 L2 L3', positive=True)

# Geometry parameters (example values, change to your mechanism)
B1 = sp.Matrix([0.0, 0.0])
B2 = sp.Matrix([1.0, 0.0])
B3 = sp.Matrix([0.5, sp.sqrt(3) / 2])

P1 = sp.Matrix([0.0, -0.2])
P2 = sp.Matrix([0.2, 0.0])
P3 = sp.Matrix([-0.2, 0.0])

p = sp.Matrix([x, y])
R = sp.Matrix([[sp.cos(phi), -sp.sin(phi)],
               [sp.sin(phi),  sp.cos(phi)]])
S = sp.Matrix([[0, -1],
               [1,  0]])

def leg_vector(B, P):
    return p + R * P - B

d1 = leg_vector(B1, P1)
d2 = leg_vector(B2, P2)
d3 = leg_vector(B3, P3)

Phi1 = d1.dot(d1) - L1**2
Phi2 = d2.dot(d2) - L2**2
Phi3 = d3.dot(d3) - L3**2

Phi = sp.Matrix([Phi1, Phi2, Phi3])
q_vec = sp.Matrix([L1, L2, L3])
x_vec = sp.Matrix([x, y, phi])

Jq_sym = Phi.jacobian(q_vec)
Jx_sym = Phi.jacobian(x_vec)

print("J_q (symbolic):")
sp.pprint(Jq_sym)
print("\nJ_x (symbolic):")
sp.pprint(Jx_sym)

# Lambdify for numerical evaluation
Jq_fun = sp.lambdify((L1, L2, L3, x, y, phi), Jq_sym, 'numpy')
Jx_fun = sp.lambdify((L1, L2, L3, x, y, phi), Jx_sym, 'numpy')

def jacobians_3rpr(L_vals, pose):
    """
    L_vals: array-like [L1, L2, L3]
    pose:   array-like [x, y, phi]
    Returns J_f, J_q, J_x evaluated numerically.
    """
    L1v, L2v, L3v = L_vals
    xv, yv, phiv = pose
    Jq = np.array(Jq_fun(L1v, L2v, L3v, xv, yv, phiv), dtype=float)
    Jx = np.array(Jx_fun(L1v, L2v, L3v, xv, yv, phiv), dtype=float)

    # Solve for J_f = - J_x^{-1} J_q
    Jx_inv = np.linalg.inv(Jx)
    Jf = - Jx_inv @ Jq
    return Jf, Jq, Jx

if __name__ == "__main__":
    L_vals = [0.8, 0.9, 0.85]
    pose = [0.1, 0.2, 0.1]
    Jf, Jq, Jx = jacobians_3rpr(L_vals, pose)
    print("J_f =\n", Jf)
      

This approach cleanly separates symbolic derivation and numerical evaluation. In practice, symbolic expressions can be exported to optimized code for embedded implementations.

8. C++ Implementation – Eigen-Based Jacobian Computation

In C++, the Eigen library offers convenient tools for small dense matrices. The code below computes \( \mathbf{J}_q \), \( \mathbf{J}_x \), and \( \mathbf{J}_f \) for a 3-RPR mechanism.


#include <Eigen/Dense>

struct Planar3RPRGeometry {
    Eigen::Vector2d B[3]; // base anchor points
    Eigen::Vector2d P[3]; // platform points (platform frame)
};

inline Eigen::Matrix2d rot2(double phi) {
    double c = std::cos(phi);
    double s = std::sin(phi);
    Eigen::Matrix2d R;
    R << c, -s,
         s,  c;
    return R;
}

inline Eigen::Matrix2d S_matrix() {
    Eigen::Matrix2d S;
    S << 0.0, -1.0,
         1.0,  0.0;
    return S;
}

void computeConstraintJacobians3RPR(
    const Planar3RPRGeometry& geom,
    const Eigen::Vector3d& L,      // [L1, L2, L3]
    const Eigen::Vector3d& pose,   // [x, y, phi]
    Eigen::Matrix3d& Jq,
    Eigen::Matrix3d& Jx,
    Eigen::Matrix3d& Jf)
{
    double x = pose(0);
    double y = pose(1);
    double phi = pose(2);

    Eigen::Vector2d p(x, y);
    Eigen::Matrix2d R = rot2(phi);
    Eigen::Matrix2d S = S_matrix();

    // J_q: diagonal with entries -2 * L_i
    Jq.setZero();
    for (int i = 0; i < 3; ++i) {
        Jq(i, i) = -2.0 * L(i);
    }

    // J_x rows
    for (int i = 0; i < 3; ++i) {
        Eigen::Vector2d d = p + R * geom.P[i] - geom.B[i];
        double dix = d(0);
        double diy = d(1);

        Eigen::Vector2d dphi = S * (R * geom.P[i]);

        double dPhi_dx = 2.0 * dix;
        double dPhi_dy = 2.0 * diy;
        double dPhi_dphi = 2.0 * d.dot(dphi);

        Jx(i, 0) = dPhi_dx;
        Jx(i, 1) = dPhi_dy;
        Jx(i, 2) = dPhi_dphi;
    }

    // J_f = - J_x^{-1} J_q
    Jf = - Jx.inverse() * Jq;
}
      

In real-time applications, repeated inversion of \( \mathbf{J}_x \) can be replaced by LU or QR factorization that is reused across multiple computations at a given configuration.

9. Java Implementation – EJML-Based Jacobian Computation

In Java, the EJML library provides matrix operations similar to those in Eigen. We sketch a minimal implementation of the 3-RPR Jacobian computations.


import org.ejml.simple.SimpleMatrix;

public class Planar3RPR {

    public static class Geometry {
        public double[][] B = new double[3][2];
        public double[][] P = new double[3][2];
    }

    private static SimpleMatrix rot2(double phi) {
        double c = Math.cos(phi);
        double s = Math.sin(phi);
        double[][] data = { {c, -s},
                           {s,  c} };
        return new SimpleMatrix(data);
    }

    private static SimpleMatrix S() {
        double[][] data = { {0.0, -1.0},
                           {1.0,  0.0} };
        return new SimpleMatrix(data);
    }

    public static void jacobians3RPR(
            Geometry geom,
            double[] L,
            double[] pose,
            SimpleMatrix Jq,
            SimpleMatrix Jx,
            SimpleMatrix Jf)
    {
        double x = pose[0];
        double y = pose[1];
        double phi = pose[2];

        SimpleMatrix p = new SimpleMatrix(2, 1, true, new double[]{x, y});
        SimpleMatrix R = rot2(phi);
        SimpleMatrix S = S();

        // J_q: diagonal
        Jq.zero();
        for (int i = 0; i < 3; ++i) {
            Jq.set(i, i, -2.0 * L[i]);
        }

        // J_x rows
        for (int i = 0; i < 3; ++i) {
            SimpleMatrix Bi = new SimpleMatrix(2, 1, true,
                    new double[]{geom.B[i][0], geom.B[i][1]});
            SimpleMatrix Pi = new SimpleMatrix(2, 1, true,
                    new double[]{geom.P[i][0], geom.P[i][1]});

            SimpleMatrix d = p.plus(R.mult(Pi)).minus(Bi);
            double dix = d.get(0, 0);
            double diy = d.get(1, 0);

            SimpleMatrix dphi = S.mult(R.mult(Pi));

            double dPhi_dx = 2.0 * dix;
            double dPhi_dy = 2.0 * diy;
            double dPhi_dphi = 2.0 * d.dot(dphi);

            Jx.set(i, 0, dPhi_dx);
            Jx.set(i, 1, dPhi_dy);
            Jx.set(i, 2, dPhi_dphi);
        }

        // J_f = - J_x^{-1} J_q
        SimpleMatrix JxInv = Jx.invert();
        SimpleMatrix JfLocal = JxInv.mult(Jq).scale(-1.0);
        Jf.set(JfLocal);
    }
}
      

As in the C++ implementation, numerical conditioning of \( \mathbf{J}_x \) should be monitored, and regularized solvers should be used near singular configurations.

10. MATLAB / Simulink Implementation

In MATLAB, the 3-RPR Jacobian is conveniently implemented as a function that can be reused both in scripts and inside a Simulink MATLAB Function block.


function [Jf, Jq, Jx] = jacobian3RPR(geom, L, pose)
% geom.B, geom.P : 3x2 matrices for base and platform points
% L   : 3x1 vector [L1; L2; L3]
% pose: 3x1 vector [x; y; phi]

x   = pose(1);
y   = pose(2);
phi = pose(3);

p = [x; y];
c = cos(phi);
s = sin(phi);
R = [c, -s; s, c];
S = [0, -1; 1, 0];

Jq = zeros(3, 3);
Jx = zeros(3, 3);

% J_q diagonal
for i = 1:3
    Jq(i, i) = -2 * L(i);
end

% J_x rows
for i = 1:3
    Bi = geom.B(i, :).';
    Pi = geom.P(i, :).';
    d = p + R * Pi - Bi;
    dix = d(1);
    diy = d(2);

    dphi = S * (R * Pi);

    dPhi_dx   = 2 * dix;
    dPhi_dy   = 2 * diy;
    dPhi_dphi = 2 * (d.' * dphi);

    Jx(i, :) = [dPhi_dx, dPhi_dy, dPhi_dphi];
end

% Forward Jacobian: J_f = - J_x^{-1} J_q
Jf = - (Jx \ Jq); % more stable than inv(Jx) * Jq
end
      

In Simulink, one can create a MATLAB Function block implementing jacobian3RPR, feed it with the geometry parameters, actuator strokes and platform pose, and output \( \mathbf{J}_f \) for downstream use in velocity mapping or control blocks.

11. Wolfram Mathematica Implementation

Mathematica provides concise symbolic differentiation. The following snippet mirrors the Python/SymPy derivation of the constraint Jacobians.


(* Symbols *)
Clear[x, y, phi, L1, L2, L3];
{x, y, phi, L1, L2, L3} = {x, y, phi, L1, L2, L3};

(* Geometry (example) *)
B1 = {0.0, 0.0};
B2 = {1.0, 0.0};
B3 = {0.5, Sqrt[3]/2.0};

P1 = {0.0, -0.2};
P2 = {0.2, 0.0};
P3 = {-0.2, 0.0};

p  = {x, y};
R[phi_] := { {Cos[phi], -Sin[phi]},
            {Sin[phi],  Cos[phi]} };
Smat = { {0, -1},
        {1,  0} };

legVec[B_, P_] := p + R[phi].P - B;

d1 = legVec[B1, P1];
d2 = legVec[B2, P2];
d3 = legVec[B3, P3];

Phi1 = d1.d1 - L1^2;
Phi2 = d2.d2 - L2^2;
Phi3 = d3.d3 - L3^2;

Phi  = {Phi1, Phi2, Phi3};
qVec = {L1, L2, L3};
xVec = {x, y, phi};

Jq = D[Phi, {qVec}]; (* dPhi/dq *)
Jx = D[Phi, {xVec}]; (* dPhi/dx *)

Jf = Simplify[-Inverse[Jx].Jq];
      

Symbolic simplification can help reveal structural properties of \( \mathbf{J}_f \) and relate them to geometric parameters such as platform and base triangle shapes.

12. Problems and Solutions

Problem 1 (Instantaneous DOF from Constraint Jacobian). Consider a parallel robot with actuator coordinates \( \mathbf{q}\in\mathbb{R}^n \), platform coordinates \( \mathbf{x}\in\mathbb{R}^m \), and holonomic constraints \( \boldsymbol{\Phi}(\mathbf{q},\mathbf{x})\in\mathbb{R}^k \) of class \( C^1 \). Show that if \( \operatorname{rank}(\mathbf{J}_c)=k \) at a configuration, then the instantaneous DOF is \( n + m - k \).

Solution:

The velocity-level constraint is \( \mathbf{J}_c \mathbf{v} = \mathbf{0} \), where \( \mathbf{v} = (\dot{\mathbf{q}},\dot{\mathbf{x}}) \) and \( \mathbf{J}_c \in \mathbb{R}^{k\times(n+m)} \). The set of admissible velocities is the kernel of \( \mathbf{J}_c \). Basic linear algebra states \( \dim \ker(\mathbf{J}_c) = (n+m) - \operatorname{rank}(\mathbf{J}_c) \). With \( \operatorname{rank}(\mathbf{J}_c)=k \), we obtain

\[ \text{DOF}_{\text{inst}} = \dim \ker(\mathbf{J}_c) = n + m - k. \]

This dimension counts independent instantaneous motions compatible with the constraints, which is precisely the instantaneous degrees of freedom.

Problem 2 (Derivation of Forward and Inverse Jacobians). Assume \( n = m = k \) and both \( \mathbf{J}_q \) and \( \mathbf{J}_x \) are invertible at a configuration. Starting from \( \mathbf{J}_q\dot{\mathbf{q}} + \mathbf{J}_x\dot{\mathbf{x}} = \mathbf{0} \), derive explicit expressions for \( \mathbf{J}_f \) and \( \mathbf{J}_i \), and show that \( \mathbf{J}_f = \mathbf{J}_i^{-1} \).

Solution:

Solving for \( \dot{\mathbf{x}} \) gives \( \dot{\mathbf{x}} = -\mathbf{J}_x^{-1}\mathbf{J}_q\dot{\mathbf{q}} \), so

\[ \mathbf{J}_f = -\mathbf{J}_x^{-1}\mathbf{J}_q. \]

Solving for \( \dot{\mathbf{q}} \) gives \( \dot{\mathbf{q}} = -\mathbf{J}_q^{-1}\mathbf{J}_x\dot{\mathbf{x}} \), so

\[ \mathbf{J}_i = -\mathbf{J}_q^{-1}\mathbf{J}_x. \]

Then

\[ \mathbf{J}_f \mathbf{J}_i = \left(-\mathbf{J}_x^{-1}\mathbf{J}_q\right) \left(-\mathbf{J}_q^{-1}\mathbf{J}_x\right) = \mathbf{J}_x^{-1} \mathbf{J}_x = \mathbf{I}_m, \]

and similarly \( \mathbf{J}_i \mathbf{J}_f = \mathbf{I}_n \). Thus \( \mathbf{J}_f \) and \( \mathbf{J}_i \) are mutual inverses.

Problem 3 (Partial Derivatives for the 3-RPR Leg Constraints). For the 3-RPR mechanism of Section 5, show explicitly that \( \partial \Phi_i / \partial L_j = -2L_i\delta_{ij} \) and derive \( \partial \Phi_i / \partial x \), \( \partial \Phi_i / \partial y \), and \( \partial \Phi_i / \partial \varphi \).

Solution:

By definition \( \Phi_i = \mathbf{d}_i^\top \mathbf{d}_i - L_i^2 \). Since \( L_j \) only appears in the term \( -L_i^2 \) when \( j=i \), we have

\[ \frac{\partial \Phi_i}{\partial L_j} = \frac{\partial}{\partial L_j}(-L_i^2) = -2L_i \delta_{ij}. \]

For the position derivatives, using \( \mathbf{d}_i = [d_{ix}\;d_{iy}]^\top \) and the chain rule:

\[ \frac{\partial \Phi_i}{\partial x} = 2 \mathbf{d}_i^\top \frac{\partial \mathbf{d}_i}{\partial x} = 2 d_{ix},\quad \frac{\partial \Phi_i}{\partial y} = 2 d_{iy}, \]

since \( \partial \mathbf{d}_i / \partial x = [1\;0]^\top \) and \( \partial \mathbf{d}_i / \partial y = [0\;1]^\top \). Finally, for orientation:

\[ \frac{\partial \mathbf{d}_i}{\partial \varphi} = \mathbf{S}\mathbf{R}(\varphi)\mathbf{P}_i, \quad \frac{\partial \Phi_i}{\partial \varphi} = 2 \mathbf{d}_i^\top \frac{\partial \mathbf{d}_i}{\partial \varphi} = 2 \mathbf{d}_i^\top\mathbf{S}\mathbf{R}(\varphi)\mathbf{P}_i. \]

Problem 4 (Connection to Explicit IK Mapping). Suppose that for a parallel robot the implicit constraints admit an explicit inverse kinematics map \( \mathbf{q} = g(\mathbf{x}) \) near some configuration. Show that the inverse Jacobian \( \mathbf{J}_i = -\mathbf{J}_q^{-1}\mathbf{J}_x \) coincides with the Jacobian of \( g \), that is \( \mathbf{J}_i = \partial g / \partial \mathbf{x} \).

Solution:

If \( \mathbf{q} = g(\mathbf{x}) \), then by implicit function theorem, \( \boldsymbol{\Phi}(g(\mathbf{x}),\mathbf{x}) = \mathbf{0} \). Differentiating with respect to \( \mathbf{x} \) yields

\[ \frac{\partial \boldsymbol{\Phi}}{\partial \mathbf{q}} \frac{\partial g}{\partial \mathbf{x}} + \frac{\partial \boldsymbol{\Phi}}{\partial \mathbf{x}} = \mathbf{0}. \]

Hence

\[ \frac{\partial g}{\partial \mathbf{x}} = -\left( \frac{\partial \boldsymbol{\Phi}}{\partial \mathbf{q}} \right)^{-1} \frac{\partial \boldsymbol{\Phi}}{\partial \mathbf{x}} = \mathbf{J}_i, \]

so the constraint-based inverse Jacobian matches the Jacobian of the local inverse kinematics map.

Problem 5 (Statics Relation). Using the principle of virtual work (introduced in Chapter 9), argue why for a parallel robot with actuator forces/torques \( \boldsymbol{\tau} \) and platform wrench \( \mathbf{w} \), the relation \( \boldsymbol{\tau} = \mathbf{J}_i^\top \mathbf{w} \) holds, where \( \mathbf{J}_i \) is the platform-to-actuator Jacobian.

Solution:

Virtual work dictates \( \boldsymbol{\tau}^\top \delta \mathbf{q} = \mathbf{w}^\top \delta \mathbf{x} \) for arbitrary virtual displacements related by \( \delta\mathbf{q} = \mathbf{J}_i \delta\mathbf{x} \). Substituting yields \( \boldsymbol{\tau}^\top \mathbf{J}_i \delta\mathbf{x} = \mathbf{w}^\top \delta\mathbf{x} \), hence \( (\mathbf{J}_i^\top \boldsymbol{\tau} - \mathbf{w})^\top \delta \mathbf{x} = 0 \) for all \( \delta\mathbf{x} \). This implies

\[ \mathbf{w} = \mathbf{J}_i^\top \boldsymbol{\tau}, \]

which can be inverted (when appropriate) to express actuator forces as \( \boldsymbol{\tau} = \mathbf{J}_i^{-\top} \mathbf{w} \). Thus, the constraint-based Jacobian provides both kinematic and static mappings.

13. Summary

In this lesson we constructed the Jacobian structure of parallel robots directly from their holonomic constraints. By differentiating the closure equations \( \boldsymbol{\Phi}(\mathbf{q},\mathbf{x})=\mathbf{0} \), we obtained the partitioned constraint Jacobians \( \mathbf{J}_q \) and \( \mathbf{J}_x \), from which actuator-to-platform (\( \mathbf{J}_f \)) and platform-to-actuator (\( \mathbf{J}_i \)) Jacobians follow. We showed that the null space of the full constraint Jacobian determines the instantaneous DOF and worked out a concrete 3-RPR planar parallel mechanism as a case study.

Implementation examples in Python, C++, Java, MATLAB/Simulink and Mathematica demonstrated how analytic expressions for \( \mathbf{J}_q \) and \( \mathbf{J}_x \) can be turned into compact numerical routines suitable for simulation and real-time control. In the next lesson, these Jacobians will serve as the starting point for a detailed singularity analysis of parallel mechanisms.

14. References

  1. Gosselin, C., & Angeles, J. (1990). Singularity analysis of closed-loop kinematic chains. IEEE Transactions on Robotics and Automation, 6(3), 281–290.
  2. Merlet, J.-P. (1994). Jacobian, manipulability and condition number of parallel robots. Journal of Mechanical Design, 116(1), 126–132.
  3. Zlatanov, D., Bonev, I., & Gosselin, C. M. (2002). Constraint singularities of parallel mechanisms. ASME Journal of Mechanical Design, 124(1), 136–143.
  4. Tsai, L.-W., & Stamper, R. E. (1996). A parallel manipulator with only translational degrees of freedom. ASME Journal of Mechanical Design, 118(4), 586–592.
  5. Angeles, J. (1997). Kinematic isotropy and the conditioning index of serial robotic manipulators. The International Journal of Robotics Research, 11(6), 560–571. (Concepts extended to parallel robots in later works.)
  6. Merlet, J.-P. (2000). Parallel manipulators. Part 1: Theory and kinematics. IEEE/ASME Transactions on Mechatronics, 5(4), 345–354.
  7. Dasgupta, B., & Mruthyunjaya, T. S. (1998). Closed-form dynamic equations of the Stewart platform manipulator. Mechanism and Machine Theory, 33(7), 993–1013.
  8. Pashkevich, A., Chablat, D., & Wenger, P. (2006). Kinematics and workspace analysis of a three-axis parallel manipulator for machining applications. Robotics and Computer-Integrated Manufacturing, 22(5), 418–429.
  9. Bonev, I. A., & Ryu, J. (2001). A new approach to orientation workspace analysis of 6-DOF parallel manipulators. Mechanism and Machine Theory, 36(1), 15–28.
  10. Merlet, J.-P. (2006). Parallel Robots. Springer, 2nd ed. (Monograph with extensive theoretical treatment of constraint-based Jacobians.)