Chapter 14: Non-Ideal Effects in Dynamics

Lesson 3: Flexibility and Lumped Compliance

This lesson extends rigid-body dynamics to include joint and link flexibility by introducing lumped compliance models. We derive flexible-joint equations of motion, define joint and task-space stiffness matrices, and show how flexible links can be approximated by equivalent springs. The treatment assumes familiarity with rigid manipulator dynamics (Lagrange–Euler and Newton–Euler), Jacobians, and static wrench mapping from previous chapters.

1. Conceptual Overview of Flexibility and Compliance

Classical manipulator models assume perfectly rigid links, infinitely stiff gear trains, and actuators that impose torques directly on the joint coordinates. In practice, joint transmissions, gearboxes, couplings and even the links themselves exhibit elasticity. This flexibility introduces:

  • Additional dynamic modes (oscillations, resonances).
  • Position tracking errors due to elastic deflections.
  • Non-collocated sensing (motor encoders vs. link angles).
  • Configuration-dependent Cartesian compliance at the end-effector.

We distinguish:

  • Joint flexibility: modeled as torsional springs and dampers between motor angle \( \theta \) and link angle \( q \).
  • Link flexibility: distributed elasticity of links approximated by a small number of lumped springs at selected locations.

For an \( n \)-DOF rigid manipulator, the joint-space dynamics (from previous chapters) are

\[ \mathbf{M}(\mathbf{q})\,\ddot{\mathbf{q}} + \mathbf{C}(\mathbf{q},\dot{\mathbf{q}})\,\dot{\mathbf{q}} + \mathbf{g}(\mathbf{q}) = \boldsymbol{\tau}, \]

where \( \mathbf{q} \in \mathbb{R}^n \) are joint coordinates and \( \boldsymbol{\tau} \) are generalized joint torques. To model flexibility we introduce additional coordinates (typically motor-side angles \( \boldsymbol{\theta} \)) and elastic torques, and derive augmented dynamics.

A convenient energy viewpoint is to add elastic potential energy of the form

\[ U_{\text{spring}} = \tfrac{1}{2}(\boldsymbol{\theta}-\mathbf{q})^{\top} \mathbf{K}(\boldsymbol{\theta}-\mathbf{q}), \]

where \( \mathbf{K} \) is the joint stiffness matrix (often diagonal). Differentiating this energy with respect to \( \mathbf{q} \) and \( \boldsymbol{\theta} \) yields elastic torques that couple motor and link dynamics.

flowchart TD
  A["Rigid model: M(q)*qdd + C(q,qdot)*qdot + g(q) = tau"] --> B["Introduce motor coordinates theta"]
  B --> C["Add torsional springs/dampers: tau_j = K*(theta - q) + D*(thetadot - qdot)"]
  C --> D["Augmented state: [q, qdot, theta, thetadot]"]
  D --> E["Flexible-joint dynamics for simulation and analysis"]
        

2. 1-DOF Flexible Joint: Lagrangian Derivation

We start with a single rotary joint actuated through an elastic transmission. Generalized coordinates are:

  • \( q \): link (output) angle.
  • \( \theta \): motor (input) angle.

Let:

  • \( J_\ell \): link inertia about the joint.
  • \( J_m \): motor+gear reflected inertia.
  • \( k \): torsional stiffness of joint elasticity.
  • \( d \): torsional damping of joint elasticity.
  • \( m, \ell \): link mass and center-of-mass distance.

Kinetic energy:

\[ T = \tfrac{1}{2}J_\ell \dot{q}^2 + \tfrac{1}{2}J_m \dot{\theta}^2. \]

Potential energy consists of gravity and elastic energy:

\[ U = m g \ell (1 - \cos q) + \tfrac{1}{2}k(\theta - q)^2. \]

The Lagrangian is \( L = T - U \). With generalized coordinates \( x_1 = q \), \( x_2 = \theta \), the Euler–Lagrange equations (without friction) are

\[ \frac{\mathrm{d}}{\mathrm{d}t} \left(\frac{\partial L}{\partial \dot{x}_i}\right) - \frac{\partial L}{\partial x_i} = Q_i,\quad i=1,2, \]

where \( Q_1 = 0 \) (no direct generalized force on the link angle) and \( Q_2 = \tau_m \) (motor torque). Straightforward differentiation yields:

\[ \frac{\partial L}{\partial \dot{q}} = J_\ell \dot{q},\quad \frac{\partial L}{\partial q} = m g \ell \sin q - k(\theta - q), \]

\[ \frac{\partial L}{\partial \dot{\theta}} = J_m \dot{\theta},\quad \frac{\partial L}{\partial \theta} = k(\theta - q). \]

Substituting into the Euler–Lagrange equations:

\[ \begin{aligned} J_\ell \ddot{q} + m g \ell \sin q + k(q - \theta) &= 0,\\ J_m \ddot{\theta} - k(q - \theta) &= \tau_m. \end{aligned} \]

Adding viscous friction coefficients \( b_\ell \), \( b_m \) and elastic damping \( d \) leads to

\[ \begin{aligned} J_\ell \ddot{q} &+ b_\ell \dot{q} + m g \ell \sin q + k(q - \theta) + d(\dot{q} - \dot{\theta}) = 0,\\ J_m \ddot{\theta} &+ b_m \dot{\theta} - k(q - \theta) - d(\dot{q} - \dot{\theta}) = \tau_m. \end{aligned} \]

These two coupled equations define the smallest nontrivial flexible-joint model. Note how the elastic torque \( k(\theta - q) \) enters with opposite sign in the two equations, reflecting torque action-reaction.

2.1 Small-Angle Linearization and Natural Modes

Around the upright configuration \( q = 0, \theta = 0 \), assuming small angles so that \( \sin q \approx q \) and ignoring damping/friction, the homogeneous dynamics with \( \tau_m = 0 \) become

\[ \begin{aligned} J_\ell \ddot{q} + (m g \ell + k) q - k \theta &= 0,\\ J_m \ddot{\theta} - k q + k \theta &= 0. \end{aligned} \]

In vector form with \( \mathbf{z} = [q,\ \theta]^{\top} \):

\[ \mathbf{M} \ddot{\mathbf{z}} + \mathbf{K}\mathbf{z} = \mathbf{0}, \quad \mathbf{M} = \begin{bmatrix} J_\ell & 0\\ 0 & J_m \end{bmatrix},\quad \mathbf{K} = \begin{bmatrix} m g \ell + k & -k\\ -k & k \end{bmatrix}. \]

Looking for solutions of the form \( \mathbf{z}(t) = \mathbf{v} e^{\lambda t} \) leads to the eigenvalue problem

\[ \det(\lambda^2 \mathbf{M} + \mathbf{K}) = 0. \]

For horizontal motion (ignore gravity so \( m g \ell = 0 \) for simplicity), one eigenvalue is \( \lambda = 0 \) (rigid-body mode) and the other is

\[ \lambda^2 = -k\left(\frac{1}{J_\ell} + \frac{1}{J_m}\right) \quad\Rightarrow\quad \omega_{\text{flex}} = \sqrt{k\left(\frac{1}{J_\ell} + \frac{1}{J_m}\right)}. \]

Thus the two-mass spring system has one free (zero-frequency) mode and one flexible mode with natural frequency \( \omega_{\text{flex}} \). In multi-DOF systems, each elastic joint introduces additional flexible modes.

3. Multi-DOF Flexible-Joint Manipulator Dynamics

For an \( n \)-DOF manipulator with flexible joints we define:

  • \( \mathbf{q} \in \mathbb{R}^n \): link-side joint angles.
  • \( \boldsymbol{\theta} \in \mathbb{R}^n \): motor-side angles.
  • \( \mathbf{J}_m \in \mathbb{R}^{n\times n} \): diagonal matrix of motor inertias.
  • \( \mathbf{B}_m \): diagonal motor viscous friction matrix.
  • \( \mathbf{K}, \mathbf{D} \): joint stiffness and damping matrices (often diagonal).

The elastic joint torque (acting on links) is modeled as

\[ \boldsymbol{\tau}_j = \mathbf{K}(\boldsymbol{\theta}-\mathbf{q}) + \mathbf{D}(\dot{\boldsymbol{\theta}}-\dot{\mathbf{q}}). \]

The link-side dynamics generalize the rigid case by replacing \( \boldsymbol{\tau} \) with the elastic torque \( \boldsymbol{\tau}_j \):

\[ \mathbf{M}(\mathbf{q})\,\ddot{\mathbf{q}} + \mathbf{C}(\mathbf{q},\dot{\mathbf{q}})\,\dot{\mathbf{q}} + \mathbf{g}(\mathbf{q}) = \boldsymbol{\tau}_j. \]

The motor-side dynamics (seen from reflected inertia) are

\[ \mathbf{J}_m \ddot{\boldsymbol{\theta}} + \mathbf{B}_m \dot{\boldsymbol{\theta}} + \boldsymbol{\tau}_j = \boldsymbol{\tau}_m, \]

where \( \boldsymbol{\tau}_m \) is the vector of actuator torques at the motor shafts. Note that the same elastic torque appears with the same sign; this is because \( \boldsymbol{\tau}_j \) in the motor equation represents reaction torque acting on the motor shaft, while in the link equation it is the torque transmitted to the link. Consistent sign conventions must be enforced when deriving these equations.

Define the state vector \( \mathbf{x} = [\mathbf{q}^{\top}, \dot{\mathbf{q}}^{\top}, \boldsymbol{\theta}^{\top}, \dot{\boldsymbol{\theta}}^{\top}]^{\top} \). The state-space model has the form

\[ \dot{\mathbf{x}} = \mathbf{f}(\mathbf{x}, \boldsymbol{\tau}_m) \]

with components obtained by solving the previous equations for \( \ddot{\mathbf{q}}, \ddot{\boldsymbol{\theta}} \).

3.1 Energy and Passivity

The total energy of the flexible-joint robot (neglecting friction) is

\[ H(\mathbf{q},\dot{\mathbf{q}},\boldsymbol{\theta},\dot{\boldsymbol{\theta}}) = \tfrac{1}{2}\dot{\mathbf{q}}^{\top} \mathbf{M}(\mathbf{q})\dot{\mathbf{q}} + \tfrac{1}{2}\dot{\boldsymbol{\theta}}^{\top} \mathbf{J}_m \dot{\boldsymbol{\theta}} + \tfrac{1}{2}(\boldsymbol{\theta}-\mathbf{q})^{\top} \mathbf{K}(\boldsymbol{\theta}-\mathbf{q}) + V(\mathbf{q}), \]

where \( V(\mathbf{q}) \) is the gravitational potential. Under the standard property \( \dot{\mathbf{M}}(\mathbf{q}) - 2\mathbf{C}(\mathbf{q},\dot{\mathbf{q}}) \) skew-symmetric, and with \( \boldsymbol{\tau}_m = \mathbf{0} \), \( \mathbf{B}_m = \mathbf{0} \), \( \mathbf{D} = \mathbf{0} \), it can be shown that \( \dot{H} = 0 \), i.e., the undamped flexible-joint manipulator is conservative. With viscous friction and elastic damping, \( \dot{H} \le 0 \), demonstrating passivity with respect to the input-output pair \( (\boldsymbol{\tau}_m, \dot{\boldsymbol{\theta}}) \).

4. Joint Stiffness and Task-Space Compliance

When the robot interacts quasi-statically with its environment (velocities and accelerations negligible), we can ignore kinetic terms and focus on elastic equilibrium. Consider small perturbations \( \delta\mathbf{q} \) and the associated small joint-space torque change

\[ \delta\boldsymbol{\tau} = \mathbf{K}_q\,\delta\mathbf{q}, \]

where \( \mathbf{K}_q \) is the joint stiffness matrix (including effects of transmission stiffness and possibly gravity linearization).

From static force mapping (Chapter 9), the relationship between joint torques and task-space wrench \( \mathbf{F} \in \mathbb{R}^6 \) at the end-effector is

\[ \boldsymbol{\tau} = \mathbf{J}(\mathbf{q})^{\top}\mathbf{F}, \]

where \( \mathbf{J}(\mathbf{q}) \) is the geometric Jacobian. Small variations obey

\[ \delta\boldsymbol{\tau} = \mathbf{J}^{\top}\delta\mathbf{F} + (\delta\mathbf{J})^{\top}\mathbf{F}. \]

For sufficiently small displacements around a fixed configuration, the term involving \( \delta\mathbf{J} \) is usually neglected, giving the linearized relation

\[ \delta\boldsymbol{\tau} \approx \mathbf{J}^{\top}\delta\mathbf{F}. \]

Combining with the joint stiffness relation:

\[ \mathbf{K}_q\,\delta\mathbf{q} \approx \mathbf{J}^{\top}\delta\mathbf{F} \quad\Rightarrow\quad \delta\mathbf{q} \approx \mathbf{K}_q^{-1}\mathbf{J}^{\top}\delta\mathbf{F}. \]

Using differential kinematics \( \delta\mathbf{x} = \mathbf{J}\,\delta\mathbf{q} \) for the end-effector displacement \( \delta\mathbf{x} \), we obtain

\[ \delta\mathbf{x} \approx \mathbf{J}\mathbf{K}_q^{-1}\mathbf{J}^{\top}\delta\mathbf{F}. \]

Hence, the Cartesian compliance matrix \( \mathbf{C}_x \) and Cartesian stiffness \( \mathbf{K}_x \) are

\[ \mathbf{C}_x = \mathbf{J}\mathbf{K}_q^{-1}\mathbf{J}^{\top}, \quad \mathbf{K}_x = \mathbf{C}_x^{-1}, \]

provided \( \mathbf{C}_x \) is invertible (no kinematic singularity and appropriate dimension). These matrices are central to stiffness control and physical interaction analysis.

flowchart TD
  F["Task wrench F"] --> T["Joint torque delta_tau = J^T * F"]
  T --> Q["Joint deflection delta_q = K_q^-1 * delta_tau"]
  Q --> X["Task deflection delta_x = J * delta_q"]
  X --> C["Cartesian compliance C_x = J*K_q^-1*J^T"]
        

5. Lumped Link Flexibility and Equivalent Stiffness

Link flexibility is inherently distributed along the structure and should be modeled by partial differential equations (e.g., beam equations). For many manipulator applications, however, a lumped-parameter approximation is adequate: replace a flexible link by a small number of rigid segments connected by torsional springs.

5.1 Base Rotational Spring Approximation

Consider a single cantilever link of length \( L \) and distributed flexibility, loaded by an end force \( F \). Replace the distributed flexibility by a single torsional spring at the base with angular deflection \( \varphi \) and stiffness \( k_\varphi \) (units N·m/rad). At static equilibrium:

  • Base torque: \( T = F L \).
  • Spring law: \( T = k_\varphi \varphi \).
  • Tip deflection: \( \delta = L \varphi \).

Eliminating \( T \) and \( \varphi \),

\[ F L = k_\varphi \varphi,\quad \delta = L \varphi \quad\Rightarrow\quad \frac{F}{\delta} = \frac{k_\varphi}{L^2}. \]

Thus the equivalent translational tip stiffness is

\[ k_{\text{tip}} = \frac{F}{\delta} = \frac{k_\varphi}{L^2}. \]

More accurate approximations use two or more springs along the link (for example at the base and mid-link), but the modeling principle is the same: map distributed bending into a finite set of generalized elastic coordinates.

5.2 Integration with Joint Flexibility Models

In a manipulator with both joint and link compliance, one typically augments the joint vector \( \mathbf{q} \) with additional virtual joints representing link bending. Each virtual joint has its own inertia (often negligible) and stiffness, and its effect on the end-effector is captured through an extended Jacobian. The formulas for joint-to-Cartesian stiffness then apply to the augmented system with an enlarged stiffness matrix.

6. Numerical Simulation of a 1-DOF Flexible Joint

We now implement the 1-DOF flexible-joint model from Section 2 in several programming environments. The state vector is \( x = [q,\ \dot{q},\ \theta,\ \dot{\theta}]^{\top} \) with dynamics

\[ \begin{aligned} \dot{x}_1 &= x_2,\\ \dot{x}_2 &= \frac{1}{J_\ell}\Big( k(x_3 - x_1) + d(x_4 - x_2) - m g \ell \sin x_1 - b_\ell x_2 \Big),\\ \dot{x}_3 &= x_4,\\ \dot{x}_4 &= \frac{1}{J_m}\Big( \tau_m(t) - k(x_3 - x_1) - d(x_4 - x_2) - b_m x_4 \Big). \end{aligned} \]

For illustration we use a step motor torque \( \tau_m(t) = \tau_0 \) for \( t \ge 0 \).

6.1 Python Implementation (NumPy + SciPy)


import numpy as np
from math import sin
from scipy.integrate import solve_ivp
import matplotlib.pyplot as plt

# Physical parameters
J_l = 0.5   # link inertia
J_m = 0.05  # motor inertia
b_l = 0.02  # link viscous friction
b_m = 0.01  # motor viscous friction
k   = 150.0 # joint stiffness
d   = 0.5   # joint damping
m   = 2.0   # link mass
ell = 0.4   # COM distance
g   = 9.81  # gravity
tau_0 = 1.0 # step torque

def tau_m(t):
    return tau_0  # constant step

def flex_joint_ode(t, x):
    q, qdot, th, thdot = x
    spring = k * (th - q)
    damper = d * (thdot - qdot)
    # Link acceleration
    qddot = (spring + damper - m * g * ell * sin(q) - b_l * qdot) / J_l
    # Motor acceleration
    thddot = (tau_m(t) - spring - damper - b_m * thdot) / J_m
    return [qdot, qddot, thdot, thddot]

x0 = [0.0, 0.0, 0.0, 0.0]  # initial conditions
t_span = (0.0, 2.0)
t_eval = np.linspace(t_span[0], t_span[1], 2001)

sol = solve_ivp(flex_joint_ode, t_span, x0, t_eval=t_eval)

q = sol.y[0, :]
th = sol.y[2, :]

plt.figure()
plt.plot(sol.t, q, label="link q")
plt.plot(sol.t, th, "--", label="motor theta")
plt.xlabel("time [s]")
plt.ylabel("angle [rad]")
plt.legend()
plt.grid(True)
plt.show()
      

6.2 C++ Implementation (Eigen for Vectors)


#include <iostream>
#include <vector>
#include <cmath>

struct FlexParams {
    double J_l{0.5}, J_m{0.05};
    double b_l{0.02}, b_m{0.01};
    double k{150.0}, d{0.5};
    double m{2.0}, ell{0.4}, g{9.81};
    double tau0{1.0};
};

void flex_joint_rhs(const FlexParams& p,
                    double t,
                    const std::vector<double>& x,
                    std::vector<double>& xdot)
{
    double q     = x[0];
    double qdot  = x[1];
    double th    = x[2];
    double thdot = x[3];

    double spring = p.k * (th - q);
    double damper = p.d * (thdot - qdot);
    double tau_m  = p.tau0; // step input

    double qddot  = (spring + damper - p.m * p.g * p.ell * std::sin(q) - p.b_l * qdot) / p.J_l;
    double thddot = (tau_m - spring - damper - p.b_m * thdot) / p.J_m;

    xdot[0] = qdot;
    xdot[1] = qddot;
    xdot[2] = thdot;
    xdot[3] = thddot;
}

int main() {
    FlexParams p;
    double t  = 0.0;
    double dt = 0.0005;
    double T  = 2.0;

    std::vector<double> x(4, 0.0);    // state
    std::vector<double> xdot(4, 0.0); // derivative

    while (t <= T) {
        flex_joint_rhs(p, t, x, xdot);
        // simple explicit Euler integration
        for (int i = 0; i < 4; ++i) {
            x[i] += dt * xdot[i];
        }
        t += dt;
        std::cout << t << " " << x[0] << " " << x[2] << std::endl;
    }
    return 0;
}
      

6.3 Java Implementation


public class FlexJointSimulation {

    static class Params {
        double J_l = 0.5, J_m = 0.05;
        double b_l = 0.02, b_m = 0.01;
        double k   = 150.0, d   = 0.5;
        double m   = 2.0,  ell = 0.4, g = 9.81;
        double tau0 = 1.0;
    }

    static void rhs(Params p, double t, double[] x, double[] xdot) {
        double q     = x[0];
        double qdot  = x[1];
        double th    = x[2];
        double thdot = x[3];

        double spring = p.k * (th - q);
        double damper = p.d * (thdot - qdot);
        double tau_m  = p.tau0;

        double qddot  = (spring + damper - p.m * p.g * p.ell * Math.sin(q) - p.b_l * qdot) / p.J_l;
        double thddot = (tau_m - spring - damper - p.b_m * thdot) / p.J_m;

        xdot[0] = qdot;
        xdot[1] = qddot;
        xdot[2] = thdot;
        xdot[3] = thddot;
    }

    public static void main(String[] args) {
        Params p = new Params();
        double[] x = {0.0, 0.0, 0.0, 0.0};
        double[] xdot = new double[4];

        double t  = 0.0;
        double dt = 0.0005;
        double T  = 2.0;

        while (t <= T) {
            rhs(p, t, x, xdot);
            for (int i = 0; i < 4; ++i) {
                x[i] += dt * xdot[i];
            }
            t += dt;
            System.out.println(t + " " + x[0] + " " + x[2]);
        }
    }
}
      

6.4 MATLAB/Simulink Implementation


function dx = flex_joint_dynamics(t, x, p)
% x = [q; qdot; th; thdot]

q     = x(1);
qdot  = x(2);
th    = x(3);
thdot = x(4);

spring = p.k * (th - q);
damper = p.d * (thdot - qdot);
tau_m  = p.tau0;  % step input

qddot  = (spring + damper - p.m * p.g * p.ell * sin(q) - p.b_l * qdot) / p.J_l;
thddot = (tau_m - spring - damper - p.b_m * thdot) / p.J_m;

dx = [qdot; qddot; thdot; thddot];
end

% Script to simulate
p.J_l = 0.5;  p.J_m = 0.05;
p.b_l = 0.02; p.b_m = 0.01;
p.k   = 150;  p.d   = 0.5;
p.m   = 2.0;  p.ell = 0.4; p.g = 9.81;
p.tau0 = 1.0;

x0 = [0; 0; 0; 0];
[t, x] = ode45(@(t,x) flex_joint_dynamics(t,x,p), [0 2], x0);

q  = x(:,1);
th = x(:,3);
plot(t, q, t, th, '--'); legend('link q', 'motor theta');
xlabel('time [s]'); ylabel('angle [rad]'); grid on;
      

In Simulink, the same dynamics can be implemented with four integrator blocks (for q, qdot, th, thdot) and algebraic blocks implementing the expressions for qddot and thddot. The Robotics System Toolbox and Simscape Multibody also provide standard blocks for joint flexibility and spring-damper elements that can replace explicit coding.

6.5 Wolfram Mathematica Implementation


(* Parameters *)
J_l = 0.5;  J_m = 0.05;
b_l = 0.02; b_m = 0.01;
k   = 150.; d   = 0.5;
m   = 2.;   ell = 0.4; g = 9.81;
tau0 = 1.0;

tauM[t_] := tau0;

(* Differential equations *)
eqs = {
  q'[t] == qdot[t],
  qdot'[t] ==
    (k (th[t] - q[t]) +
     d (thdot[t] - qdot[t]) -
     m g ell Sin[q[t]] - b_l qdot[t]) / J_l,
  th'[t] == thdot[t],
  thdot'[t] ==
    (tauM[t] -
     k (th[t] - q[t]) -
     d (thdot[t] - qdot[t]) -
     b_m thdot[t]) / J_m
};

ics = {q[0] == 0, qdot[0] == 0, th[0] == 0, thdot[0] == 0};

sol = NDSolve[Join[eqs, ics], {q, qdot, th, thdot}, {t, 0, 2}][[1]];

Plot[{q[t] /. sol, th[t] /. sol}, {t, 0, 2},
  PlotLegends -> {"link q", "motor theta"},
  AxesLabel -> {"t [s]", "angle [rad]"},
  GridLines -> Automatic
]
      

Mathematica is particularly convenient for symbolic manipulations and linearizations of flexible-joint models, which can then be exported to other environments (e.g., C code generation) for real-time implementation.

7. Problems and Solutions

Problem 1 (Deriving the 1-DOF Flexible-Joint Model): Starting from the energies in Section 2, \( T = \tfrac{1}{2}J_\ell \dot{q}^2 + \tfrac{1}{2}J_m \dot{\theta}^2 \) and \( U = m g \ell (1-\cos q) + \tfrac{1}{2}k(\theta - q)^2 \), derive the Euler–Lagrange equations and confirm the dynamics

\[ \begin{aligned} J_\ell \ddot{q} + m g \ell \sin q + k(q - \theta) &= 0,\\[4pt] J_m \ddot{\theta} - k(q - \theta) &= \tau_m. \end{aligned} \]

Solution:

Compute \( \frac{\partial L}{\partial \dot{q}} = J_\ell \dot{q} \), \( \frac{\partial L}{\partial q} = m g \ell \sin q - k(\theta - q) \). Therefore, \( \frac{\mathrm{d}}{\mathrm{d}t}(\partial L/\partial \dot{q}) = J_\ell \ddot{q} \). The Euler–Lagrange equation for \( q \) is

\[ J_\ell \ddot{q} - \left(m g \ell \sin q - k(\theta - q)\right) = 0 \quad\Rightarrow\quad J_\ell \ddot{q} + m g \ell \sin q + k(q - \theta) = 0. \]

Similarly, for \( \theta \): \( \partial L/\partial \dot{\theta} = J_m \dot{\theta} \), \( \partial L/\partial \theta = k(\theta - q) \), so

\[ J_m \ddot{\theta} - k(\theta - q) = \tau_m \quad\Rightarrow\quad J_m \ddot{\theta} - k(q - \theta) = \tau_m, \]

which matches the required equations.

Problem 2 (Flexible Mode Frequency): For the horizontal 1-DOF flexible joint of Section 2 (no gravity), show that the nonzero natural frequency is \( \omega_{\text{flex}} = \sqrt{k(1/J_\ell + 1/J_m)} \). Interpret the limiting cases where \( J_m \rightarrow \infty \) and \( J_m \rightarrow 0 \).

Solution:

The linearized homogeneous equations are

\[ \mathbf{M} \ddot{\mathbf{z}} + \mathbf{K}\mathbf{z} = \mathbf{0}, \quad \mathbf{M} = \begin{bmatrix} J_\ell & 0\\ 0 & J_m \end{bmatrix},\quad \mathbf{K} = \begin{bmatrix} k & -k\\ -k & k \end{bmatrix}. \]

The characteristic equation is \( \det(\lambda^2 \mathbf{M} + \mathbf{K}) = 0 \), i.e.

\[ \det \begin{bmatrix} J_\ell \lambda^2 + k & -k\\ -k & J_m \lambda^2 + k \end{bmatrix} = (J_\ell \lambda^2 + k)(J_m \lambda^2 + k) - k^2 = 0. \]

Expanding:

\[ J_\ell J_m \lambda^4 + (J_\ell + J_m)k \lambda^2 = 0. \]

Thus \( \lambda^2 = 0 \) (rigid mode) and \( \lambda^2 = -k(J_\ell + J_m)/(J_\ell J_m) = -k(1/J_\ell + 1/J_m) \), giving

\[ \omega_{\text{flex}} = \sqrt{k\left(\frac{1}{J_\ell} + \frac{1}{J_m}\right)}. \]

If \( J_m \rightarrow \infty \) the motor behaves as a fixed base, so \( \omega_{\text{flex}} \rightarrow \sqrt{k/J_\ell} \), the natural frequency of a single inertia attached to a spring. If \( J_m \rightarrow 0 \), the motor inertia is negligible and the frequency tends to \( \sqrt{k/J_\ell} \) as well; in both extremes the effective inertia seen by the spring is the link inertia alone.

Problem 3 (Joint-to-Cartesian Stiffness Mapping): Consider a planar 2-DOF manipulator with joint stiffness matrix \( \mathbf{K}_q = \operatorname{diag}(k_1, k_2) \) and Jacobian at some configuration

\[ \mathbf{J} = \begin{bmatrix} 1 & 1\\ 0 & 1 \end{bmatrix}. \]

Compute the Cartesian compliance \( \mathbf{C}_x \) and stiffness \( \mathbf{K}_x \).

Solution:

First, \( \mathbf{K}_q^{-1} = \operatorname{diag}(1/k_1, 1/k_2) \). Then

\[ \mathbf{C}_x = \mathbf{J}\mathbf{K}_q^{-1}\mathbf{J}^{\top} = \begin{bmatrix} 1 & 1\\ 0 & 1 \end{bmatrix} \begin{bmatrix} 1/k_1 & 0\\ 0 & 1/k_2 \end{bmatrix} \begin{bmatrix} 1 & 0\\ 1 & 1 \end{bmatrix}. \]

Compute step by step:

\[ \mathbf{J}\mathbf{K}_q^{-1} = \begin{bmatrix} 1/k_1 & 1/k_2\\ 0 & 1/k_2 \end{bmatrix}, \quad \mathbf{C}_x = \begin{bmatrix} 1/k_1 + 1/k_2 & 1/k_2\\[4pt] 1/k_2 & 1/k_2 \end{bmatrix}. \]

The determinant is \( \det(\mathbf{C}_x) = (1/k_1 + 1/k_2)(1/k_2) - (1/k_2)^2 = (1/k_1)(1/k_2) \), so

\[ \mathbf{K}_x = \mathbf{C}_x^{-1} = \begin{bmatrix} k_1 & -k_1\\[4pt] -k_1 & k_1 + k_2 \end{bmatrix}. \]

This illustrates how joint stiffnesses combine nontrivially in task space; even diagonal joint stiffness yields coupled Cartesian stiffness.

Problem 4 (Equivalent Tip Stiffness of a Flexible Link): For the base rotational spring model of Section 5.1, show that the equivalent translational stiffness at the tip is \( k_{\text{tip}} = k_\varphi / L^2 \).

Solution:

By torque equilibrium at the base, \( T = F L = k_\varphi \varphi \), hence \( \varphi = F L / k_\varphi \). The tip deflection is \( \delta = L \varphi = L (F L / k_\varphi) = F L^2 / k_\varphi \), hence

\[ k_{\text{tip}} = \frac{F}{\delta} = \frac{F}{F L^2 / k_\varphi} = \frac{k_\varphi}{L^2}. \]

Problem 5 (Energy Dissipation with Damping): Consider the multi-DOF flexible-joint model with \( \mathbf{D} \succeq 0 \) and \( \mathbf{B}_m \succeq 0 \) and \( \boldsymbol{\tau}_m = \mathbf{0} \). Show qualitatively (you do not need to derive all terms) why \( \dot{H} \le 0 \) with \( H \) defined in Section 3.1.

Solution:

Differentiating the kinetic terms and using the standard property \( \dot{\mathbf{M}} - 2\mathbf{C} \) skew-symmetric, the contribution to \( \dot{H} \) from rigid-body dynamics is zero, as in the rigid manipulator case. The time derivative of the elastic energy \( \tfrac{1}{2}(\boldsymbol{\theta}-\mathbf{q})^{\top} \mathbf{K}(\boldsymbol{\theta}-\mathbf{q}) \) produces a term \( (\boldsymbol{\theta}-\mathbf{q})^{\top} \mathbf{K}(\dot{\boldsymbol{\theta}}-\dot{\mathbf{q}}) \), which cancels corresponding terms in the work of elastic torques in the mechanical power balance. The remaining non-canceling terms are precisely

\[ -\dot{\mathbf{q}}^{\top}\mathbf{B}_\ell\dot{\mathbf{q}} -\dot{\boldsymbol{\theta}}^{\top}\mathbf{B}_m\dot{\boldsymbol{\theta}} -(\dot{\boldsymbol{\theta}}-\dot{\mathbf{q}})^{\top} \mathbf{D}(\dot{\boldsymbol{\theta}}-\dot{\mathbf{q}}), \]

which are all nonpositive if \( \mathbf{B}_\ell, \mathbf{B}_m, \mathbf{D} \) are positive semidefinite. Hence \( \dot{H} \le 0 \), proving that energy is monotonically nonincreasing: the system is passive and eventually comes to rest at an equilibrium (neglecting external inputs).

8. Summary

In this lesson we extended rigid manipulator dynamics to include joint and link flexibility using lumped compliance models. Starting from energy-based modeling, we derived the canonical 1-DOF flexible-joint equations, generalized them to multi-DOF manipulators, and highlighted the additional flexible modes introduced by joint elasticity. We defined joint and Cartesian stiffness matrices and derived the fundamental mapping \( \mathbf{C}_x = \mathbf{J}\mathbf{K}_q^{-1} \mathbf{J}^{\top} \) used to reason about end-effector compliance. Finally, we discussed simple lumped approximations of link flexibility and provided multi-language simulation examples for a 1-DOF flexible joint.

These models are essential for accurate simulation, high-performance control, and safe physical interaction, and they form the basis for later chapters involving uncertainty, identification, and advanced modeling of complex robotic structures.

9. References

  1. Spong, M. W. (1987). Modeling and control of elastic joint robots. Journal of Dynamic Systems, Measurement, and Control, 109(4), 310–319.
  2. De Luca, A., & Book, W. J. (2008). Robots with flexible elements. In B. Siciliano & O. Khatib (Eds.), Springer Handbook of Robotics, Springer (theoretical survey on modeling and dynamics of flexible-joint and flexible-link robots).
  3. Siciliano, B., & Sciavicco, L. (1987). A dynamic model of flexible robot arms with joint and link elasticity. Meccanica, 22(4), 277–285.
  4. Albu-Schäffer, A., Ott, C., & Hirzinger, G. (2007). A unified passivity-based control framework for position, torque and impedance control of flexible joint robots. International Journal of Robotics Research, 26(1), 23–39.
  5. Khatib, O. (1995). Inertial properties in robotic manipulation: An object-level framework. International Journal of Robotics Research, 14(1), 19–36.
  6. Salisbury, J. K. (1980). Active stiffness control of a manipulator in Cartesian coordinates. Decision and Control, 1980 19th IEEE Conference on, 95–100.
  7. Hogan, N. (1985). Impedance control: An approach to manipulation: Part I–III. Journal of Dynamic Systems, Measurement, and Control, 107(1), 1–24.
  8. Yoshikawa, T. (1985). Manipulability of robotic mechanisms. International Journal of Robotics Research, 4(2), 3–9.
  9. Book, W. J. (1984). Recursive Lagrangian dynamics of flexible manipulator arms. International Journal of Robotics Research, 3(3), 87–101.
  10. De Luca, A., & Lanari, L. (1991). A reformulation of the equations of motion of flexible manipulators. Journal of Robotic Systems, 8(3), 325–345.