Chapter 18: Trajectory Quantities from Models
Lesson 4: Time Parameterization Concepts (no planning algorithms)
This lesson introduces the mathematical structure of time parameterization: how a purely geometric joint-space or task-space path becomes a physically meaningful motion trajectory once a timing law is assigned. We derive the relationships between path derivatives and time derivatives, formalize kinematic and dynamic feasibility constraints, and illustrate how these concepts are implemented in Python, C++, Java, MATLAB/Simulink, and Wolfram Mathematica without delving into specific planning or optimization algorithms.
1. Geometric Path vs. Time-Parameterized Trajectory
Up to now, paths in joint space have been treated as geometric objects. A geometric joint-space path is a mapping \( \mathbf{q}_p : [0,1] \to \mathbb{R}^n \), where \( \mathbf{q}_p(s) \) describes the robot joint configuration for a path coordinate \( s \). The parameter \( s \) is dimensionless and does not yet encode timing.
A time-parameterized trajectory is a mapping \( \mathbf{q} : [0,T] \to \mathbb{R}^n \), where \( t \) is physical time. Time parameterization assigns a time law \( s(t) \) to the path:
\[ \mathbf{q}(t) = \mathbf{q}_p(s(t)), \quad t \in [0,T], \quad s(t) \in [0,1]. \]
Typical boundary conditions are \( s(0)=0 \), \( s(T)=1 \), and \( \dot{s}(0)=\dot{s}(T)=0 \) for smooth start/stop. The function \( s(t) \) is assumed to be at least \( C^2 \) and strictly increasing (no reverse motion along the path).
flowchart TD
A["Geometric path q_p(s) in joint space"] --> B["Choose time law s(t) (monotone)"]
B --> C["Compose: q(t) = q_p(s(t))"]
C --> D["Compute q_dot, q_ddot, q_jrk via chain rule"]
D --> E["Check joint / task limits and dynamics"]
E --> F["Acceptable time-parameterized trajectory"]
The central idea of this lesson is that \( \mathbf{q}_p(s) \) and \( s(t) \) play distinct roles: the first encodes where the robot moves, the second encodes how fast it moves along that path. Time parameterization modifies velocities, accelerations, and jerks along a fixed geometric path without changing the path itself.
2. Path Coordinate and Chain Rule Relations
Let \( \mathbf{q}_p(s) = [q_{p,1}(s), \dots, q_{p,n}(s)]^\top \) denote a differentiable joint-space path and \( s(t) \) a differentiable time law. The actual time-parameterized trajectory is \( \mathbf{q}(t) = \mathbf{q}_p(s(t)) \). Using the chain rule, we can express joint velocities, accelerations, and jerks in terms of path derivatives and derivatives of \( s(t) \).
2.1 First derivative (joint velocity)
For the \( i \)-th joint:
\[ q_i(t) = q_{p,i}(s(t)). \]
Differentiating with respect to time and applying the chain rule:
\[ \dot{q}_i(t) = \frac{\mathrm{d}}{\mathrm{d}t} q_{p,i}(s(t)) = \frac{\mathrm{d} q_{p,i}}{\mathrm{d} s}(s(t)) \, \dot{s}(t). \]
In vector form, defining the path derivative \( \mathbf{q}_p'(s) := \frac{\mathrm{d}\mathbf{q}_p}{\mathrm{d}s}(s) \), we obtain
\[ \dot{\mathbf{q}}(t) = \mathbf{q}_p'(s(t)) \, \dot{s}(t). \]
2.2 Second derivative (joint acceleration)
Differentiate the velocity once more:
\[ \ddot{\mathbf{q}}(t) = \frac{\mathrm{d}}{\mathrm{d}t}\big( \mathbf{q}_p'(s(t)) \dot{s}(t) \big). \]
Using the product rule and chain rule:
\[ \ddot{\mathbf{q}}(t) = \mathbf{q}_p''(s(t)) \, \dot{s}(t)^2 + \mathbf{q}_p'(s(t)) \, \ddot{s}(t), \]
where \( \mathbf{q}_p''(s) := \frac{\mathrm{d}^2\mathbf{q}_p}{\mathrm{d}s^2}(s) \).
2.3 Third derivative (joint jerk)
Similarly, differentiating acceleration yields the jerk:
\[ \dddot{\mathbf{q}}(t) = \mathbf{q}_p'''(s(t)) \, \dot{s}(t)^3 + 3 \, \mathbf{q}_p''(s(t)) \, \dot{s}(t)\ddot{s}(t) + \mathbf{q}_p'(s(t)) \, \dddot{s}(t), \]
with \( \mathbf{q}_p'''(s) := \frac{\mathrm{d}^3\mathbf{q}_p}{\mathrm{d}s^3}(s) \).
2.4 Proof sketch by scalarization
The formulas above follow from standard one-dimensional chain rule applied component-wise. For example, for the scalar function \( f(t) = q_{p,i}(s(t)) \):
\[ f'(t) = q_{p,i}'(s(t)) \, s'(t), \]
and
\[ f''(t) = q_{p,i}''(s(t)) \, s'(t)^2 + q_{p,i}'(s(t)) \, s''(t), \]
which is exactly the \( i \)-th component of the vector formula for \( \ddot{\mathbf{q}}(t) \). The jerk expression can be obtained by another differentiation using the product rule or via the Faà di Bruno formula specialized to composition of univariate functions.
3. Kinematic Constraints in Terms of \( s(t) \)
Industrial manipulators are subject to joint-level limits on velocity, acceleration, and sometimes jerk. Suppose for each joint \( i=1,\dots,n \) we have bounds
\[ |\dot{q}_i(t)| \leq \dot{q}_i^{\max}, \quad |\ddot{q}_i(t)| \leq \ddot{q}_i^{\max}, \quad |\dddot{q}_i(t)| \leq \dddot{q}_i^{\max}. \]
Substituting the chain-rule expressions yields constraints on \( \dot{s}(t) \), \( \ddot{s}(t) \), and \( \dddot{s}(t) \) along the path.
3.1 Velocity constraints
From \( \dot{\mathbf{q}}(t) = \mathbf{q}_p'(s(t))\dot{s}(t) \), the constraint for joint \( i \) becomes
\[ |q_{p,i}'(s(t))| \, |\dot{s}(t)| \leq \dot{q}_i^{\max}. \]
Assuming \( \dot{s}(t) \geq 0 \) (no backward motion along the path), we can drop the absolute value on \( \dot{s}(t) \) and obtain
\[ 0 \leq \dot{s}(t) \leq \min_i \frac{\dot{q}_i^{\max}}{|q_{p,i}'(s(t))|}. \]
Thus, for each path position \( s \), there is a maximum allowable path speed determined by the most restrictive joint.
3.2 Acceleration constraints
Using \( \ddot{\mathbf{q}}(t) = \mathbf{q}_p''(s(t)) \dot{s}(t)^2 + \mathbf{q}_p'(s(t))\ddot{s}(t) \), the constraint for joint \( i \) becomes
\[ \left| q_{p,i}''(s(t)) \dot{s}(t)^2 + q_{p,i}'(s(t)) \ddot{s}(t) \right| \leq \ddot{q}_i^{\max}. \]
For a fixed path position \( s \) and path speed \( \dot{s} \), this inequality defines an interval of admissible \( \ddot{s} \) values. Geometrically, in the \( (\dot{s}, \ddot{s}) \)-plane, each joint contributes a pair of straight lines or parabolas that bound admissible acceleration; the intersection over all joints is the region of feasible \( \ddot{s} \) for that \( s \).
3.3 Jerk constraints
When jerk limits are important for smoothness, the jerk expression induces affine constraints in \( \dddot{s}(t) \):
\[ \left| q_{p,i}'''(s) \dot{s}^3 + 3 q_{p,i}''(s) \dot{s}\ddot{s} + q_{p,i}'(s) \dddot{s} \right| \leq \dddot{q}_i^{\max}. \]
For a given \( (s, \dot{s}, \ddot{s}) \), this inequality bounds \( \dddot{s} \). Although we will not implement any optimization or planning in this lesson, these constraints explain why the time law \( s(t) \) is often treated as the state of a one-dimensional constrained dynamical system.
4. Task-Space Quantities and Jacobian Coupling
Let \( \mathbf{x} \in \mathbb{R}^m \) denote a task-space representation of the end-effector (e.g. position and orientation coordinates), and let \( \mathbf{x}(t) = \mathbf{f}(\mathbf{q}(t)) \) be the forward kinematics. Then, as known from differential kinematics:
\[ \dot{\mathbf{x}}(t) = \mathbf{J}(\mathbf{q}(t)) \, \dot{\mathbf{q}}(t), \]
where \( \mathbf{J}(\mathbf{q}) \) is the geometric Jacobian. Combining this with the time-parameterized trajectory gives:
\[ \dot{\mathbf{x}}(t) = \mathbf{J}(\mathbf{q}_p(s(t))) \, \mathbf{q}_p'(s(t)) \, \dot{s}(t). \]
Hence, task-space velocity bounds (e.g. limits on tool linear or angular speed) impose further constraints on \( \dot{s}(t) \):
\[ \|\dot{\mathbf{x}}(t)\| \leq v_{\text{task}}^{\max} \quad \Rightarrow \quad \|\mathbf{J}(\mathbf{q}_p(s(t))) \mathbf{q}_p'(s(t))\| \, \dot{s}(t) \leq v_{\text{task}}^{\max}. \]
Similar expressions can be derived for task-space accelerations using the Jacobian derivative, which the student has encountered in previous chapters. These relationships underscore that time parameterization is not purely a joint-level phenomenon: robot geometry couples joint and task-space constraints in a nontrivial way.
5. Simple Analytical Time Laws (No Optimization)
In many laboratory settings, one uses simple closed-form time laws \( s(t) \) that are easy to implement and differentiate. These time laws are not necessarily optimal, but they illustrate the effect of time parameterization on kinematic quantities.
5.1 Polynomial time scaling
Consider a cubic time law with zero initial and final path velocity:
\[ s(t) = a_3 t^3 + a_2 t^2 + a_1 t + a_0. \]
Enforcing \( s(0)=0 \), \( s(T)=1 \), \( \dot{s}(0)=0 \), \( \dot{s}(T)=0 \) yields a linear system for the coefficients. A standard solution is
\[ s(t) = 3\left(\frac{t}{T}\right)^2 - 2\left(\frac{t}{T}\right)^3. \]
This choice is \( C^1 \)-smooth at the endpoints, and its derivatives are
\[ \dot{s}(t) = \frac{6 t}{T^2} - \frac{6 t^2}{T^3}, \quad \ddot{s}(t) = \frac{6}{T^2} - \frac{12 t}{T^3}. \]
Plugging these into the chain-rule formulas in Section 2 yields explicit expressions for joint velocities and accelerations, which can then be checked against joint bounds.
5.2 Piecewise-constant acceleration (conceptual)
Another common conceptual time law is a piecewise-constant acceleration profile for \( s(t) \), which yields a trapezoidal or triangular velocity profile. Even without deriving explicit formulas, the chain-rule relationships show that peaks in \( \dot{s}(t) \) and \( \ddot{s}(t) \) will translate into peaks in joint velocities and accelerations scaled by \( \mathbf{q}_p'(s) \) and \( \mathbf{q}_p''(s) \), respectively. This motivates the need to account for the geometry of \( \mathbf{q}_p(s) \) when selecting a time law.
6. Python Implementation — Evaluating a Time-Parameterized Path
We implement the cubic time law from Section 5 for a 2-DOF planar arm
whose geometric path is parameterized as
\( \mathbf{q}_p(s) = [\cos(\pi s/2), \sin(\pi s/2)]^\top \). This is purely illustrative; in practice, q_p(s) may
come from an inverse kinematics path or a higher-level planner.
import numpy as np
def q_path(s):
"""
Geometric path q_p(s) for a 2-DOF manipulator.
s: scalar or numpy array in [0,1].
Returns: array of shape (..., 2).
"""
s = np.asarray(s)
q1 = np.cos(0.5 * np.pi * s)
q2 = np.sin(0.5 * np.pi * s)
return np.stack((q1, q2), axis=-1)
def dqds_path(s):
"""
First path derivative dq_p/ds.
"""
s = np.asarray(s)
dq1 = -0.5 * np.pi * np.sin(0.5 * np.pi * s)
dq2 = 0.5 * np.pi * np.cos(0.5 * np.pi * s)
return np.stack((dq1, dq2), axis=-1)
def d2qds2_path(s):
"""
Second path derivative d^2 q_p/ds^2.
"""
s = np.asarray(s)
d2q1 = -(0.5 * np.pi)**2 * np.cos(0.5 * np.pi * s)
d2q2 = -(0.5 * np.pi)**2 * np.sin(0.5 * np.pi * s)
return np.stack((d2q1, d2q2), axis=-1)
def s_time(t, T):
"""
Cubic time law: s(t) = 3 (t/T)^2 - 2 (t/T)^3
with s(0)=0, s(T)=1, s_dot(0)=s_dot(T)=0.
"""
tau = t / T
return 3.0 * tau**2 - 2.0 * tau**3
def sdot_time(t, T):
tau = t / T
return (6.0 * tau - 6.0 * tau**2) / T
def sddot_time(t, T):
tau = t / T
return (6.0 - 12.0 * tau) / (T**2)
def evaluate_trajectory(T=2.0, n_samples=100):
t = np.linspace(0.0, T, n_samples)
s = s_time(t, T)
sdot = sdot_time(t, T)
sddot = sddot_time(t, T)
q = q_path(s)
dqds = dqds_path(s)
d2qds2 = d2qds2_path(s)
qdot = dqds * sdot[:, None]
qddot = d2qds2 * (sdot[:, None]**2) + dqds * sddot[:, None]
# Check simple joint velocity limits
qdot_max = np.array([1.0, 1.0]) # rad/s
if np.any(np.abs(qdot) > qdot_max):
print("Warning: joint velocity limits exceeded.")
else:
print("Joint velocity limits satisfied.")
return t, q, qdot, qddot
if __name__ == "__main__":
t, q, qdot, qddot = evaluate_trajectory()
This code embodies the chain-rule structure derived earlier. By changing
only s_time, sdot_time, and
sddot_time, we can reuse the same geometric path and path
derivatives to check alternative time laws.
7. C++ Implementation with Eigen
In C++, the Eigen library is widely used in robotics for vector and
matrix computations. The following example mirrors the Python code using
Eigen::Vector2d and simple functions for
\( s(t) \), \( \dot{s}(t) \), and
\( \ddot{s}(t) \).
#include <iostream>
#include <cmath>
#include <vector>
#include <Eigen/Dense>
using Eigen::Vector2d;
Vector2d q_path(double s) {
// q_p(s) = [cos(pi s/2), sin(pi s/2)]^T
double q1 = std::cos(0.5 * M_PI * s);
double q2 = std::sin(0.5 * M_PI * s);
return Vector2d(q1, q2);
}
Vector2d dqds_path(double s) {
double dq1 = -0.5 * M_PI * std::sin(0.5 * M_PI * s);
double dq2 = 0.5 * M_PI * std::cos(0.5 * M_PI * s);
return Vector2d(dq1, dq2);
}
Vector2d d2qds2_path(double s) {
double c = 0.5 * M_PI;
double d2q1 = -(c * c) * std::cos(c * s);
double d2q2 = -(c * c) * std::sin(c * s);
return Vector2d(d2q1, d2q2);
}
double s_time(double t, double T) {
double tau = t / T;
return 3.0 * tau * tau - 2.0 * tau * tau * tau;
}
double sdot_time(double t, double T) {
double tau = t / T;
return (6.0 * tau - 6.0 * tau * tau) / T;
}
double sddot_time(double t, double T) {
double tau = t / T;
return (6.0 - 12.0 * tau) / (T * T);
}
int main() {
double T = 2.0;
int n_samples = 100;
double qdot_max1 = 1.0;
double qdot_max2 = 1.0;
bool violated = false;
for (int k = 0; k < n_samples; ++k) {
double t = (T * k) / (n_samples - 1);
double s = s_time(t, T);
double sdot = sdot_time(t, T);
double sddot = sddot_time(t, T);
Vector2d q = q_path(s);
Vector2d dqds = dqds_path(s);
Vector2d d2qds2 = d2qds2_path(s);
Vector2d qdot = dqds * sdot;
Vector2d qddot = d2qds2 * (sdot * sdot) + dqds * sddot;
if (std::abs(qdot(0)) > qdot_max1 || std::abs(qdot(1)) > qdot_max2) {
violated = true;
}
}
if (violated) {
std::cout << "Joint velocity limits exceeded." << std::endl;
} else {
std::cout << "Joint velocity limits satisfied." << std::endl;
}
return 0;
}
This implementation separates geometric quantities (q_path,
dqds_path, d2qds2_path) from timing
(s_time, sdot_time, sddot_time),
mirroring the kinematic structure from the theoretical sections.
8. Java Implementation and Robotics Libraries
In Java, linear algebra is often handled with libraries such as EJML or Apache Commons Math. For simplicity, we will implement a minimal array-based version of the same trajectory evaluation. The conceptual structure is unchanged from Python and C++.
public class TimeParameterizedPath {
// q_p(s)
static double[] qPath(double s) {
double q1 = Math.cos(0.5 * Math.PI * s);
double q2 = Math.sin(0.5 * Math.PI * s);
return new double[]{q1, q2};
}
// dq_p/ds
static double[] dqdsPath(double s) {
double dq1 = -0.5 * Math.PI * Math.sin(0.5 * Math.PI * s);
double dq2 = 0.5 * Math.PI * Math.cos(0.5 * Math.PI * s);
return new double[]{dq1, dq2};
}
// d^2 q_p/ds^2
static double[] d2qds2Path(double s) {
double c = 0.5 * Math.PI;
double d2q1 = -(c * c) * Math.cos(c * s);
double d2q2 = -(c * c) * Math.sin(c * s);
return new double[]{d2q1, d2q2};
}
static double sTime(double t, double T) {
double tau = t / T;
return 3.0 * tau * tau - 2.0 * tau * tau * tau;
}
static double sdotTime(double t, double T) {
double tau = t / T;
return (6.0 * tau - 6.0 * tau * tau) / T;
}
static double sddotTime(double t, double T) {
double tau = t / T;
return (6.0 - 12.0 * tau) / (T * T);
}
public static void main(String[] args) {
double T = 2.0;
int nSamples = 100;
double qdotMax1 = 1.0;
double qdotMax2 = 1.0;
boolean violated = false;
for (int k = 0; k < nSamples; ++k) {
double t = (T * k) / (double)(nSamples - 1);
double s = sTime(t, T);
double sdot = sdotTime(t, T);
double sddot = sddotTime(t, T);
double[] q = qPath(s);
double[] dqds = dqdsPath(s);
double[] d2qds2 = d2qds2Path(s);
double qdot1 = dqds[0] * sdot;
double qdot2 = dqds[1] * sdot;
double qddot1 = d2qds2[0] * sdot * sdot + dqds[0] * sddot;
double qddot2 = d2qds2[1] * sdot * sdot + dqds[1] * sddot;
if (Math.abs(qdot1) > qdotMax1 || Math.abs(qdot2) > qdotMax2) {
violated = true;
}
}
if (violated) {
System.out.println("Joint velocity limits exceeded.");
} else {
System.out.println("Joint velocity limits satisfied.");
}
}
}
In a more advanced Java-based robotics project (e.g. using ROS 2 Java clients or a custom control framework), the same structure is integrated with real-time constraints and robot drivers, but the mathematics of time parameterization remains identical.
9. MATLAB/Simulink Implementation
MATLAB is a standard environment for prototyping robotic trajectories. Below, we provide a script that computes \( \mathbf{q}(t) \), \( \dot{\mathbf{q}}(t) \), and \( \ddot{\mathbf{q}}(t) \) for the same example.
function time_parameterization_demo()
T = 2.0;
nSamples = 100;
t = linspace(0, T, nSamples);
s = s_time(t, T);
sdot = sdot_time(t, T);
sddot = sddot_time(t, T);
q = q_path(s);
dqds = dqds_path(s);
d2qds2 = d2qds2_path(s);
qdot = dqds .* sdot.';
qddot = d2qds2 .* (sdot.'.^2) + dqds .* sddot.';
qdot_max = [1.0, 1.0];
if any(abs(qdot) > qdot_max, "all")
disp("Joint velocity limits exceeded.");
else
disp("Joint velocity limits satisfied.");
end
% Example plot
figure; plot(t, q);
xlabel("t [s]"); ylabel("q_i(t) [rad]");
legend("q_1","q_2");
end
function q = q_path(s)
q1 = cos(0.5 * pi * s);
q2 = sin(0.5 * pi * s);
q = [q1(:), q2(:)];
end
function dqds = dqds_path(s)
dq1 = -0.5 * pi * sin(0.5 * pi * s);
dq2 = 0.5 * pi * cos(0.5 * pi * s);
dqds = [dq1(:), dq2(:)];
end
function d2qds2 = d2qds2_path(s)
c = 0.5 * pi;
d2q1 = -(c^2) * cos(c * s);
d2q2 = -(c^2) * sin(c * s);
d2qds2 = [d2q1(:), d2q2(:)];
end
function s = s_time(t, T)
tau = t ./ T;
s = 3 .* tau.^2 - 2 .* tau.^3;
end
function sdot = sdot_time(t, T)
tau = t ./ T;
sdot = (6 .* tau - 6 .* tau.^2) ./ T;
end
function sddot = sddot_time(t, T)
tau = t ./ T;
sddot = (6 - 12 .* tau) ./ (T^2);
end
In Simulink, the same structure may be implemented using:
-
A block subsystem computing
s(t),sdot(t), andsddot(t)(e.g. via MATLAB Function blocks). -
A function block implementing
q_path(s),dqds_path(s), andd2qds2_path(s). - Product and sum blocks realizing the chain-rule relations for \( \dot{\mathbf{q}}(t) \) and \( \ddot{\mathbf{q}}(t) \).
This modular design makes it easy to swap in a different time law or path while maintaining the same kinematic evaluation structure.
10. Wolfram Mathematica Implementation
Wolfram Mathematica excels at symbolic manipulation and is well suited to deriving analytic expressions for joint velocities, accelerations, and jerks induced by a given time law.
(* Define symbolic variables *)
Clear[s, t, T];
q1[s_] := Cos[Pi s/2];
q2[s_] := Sin[Pi s/2];
(* Cubic time law *)
sFun[t_, T_] := 3 (t/T)^2 - 2 (t/T)^3;
q[t_, T_] := {q1[sFun[t, T]], q2[sFun[t, T]]};
qDot[t_, T_] := D[q[t, T], t];
qDDot[t_, T_] := D[q[t, T], {t, 2}];
qJerk[t_, T_] := D[q[t, T], {t, 3}];
(* Simplify expressions *)
FullSimplify[qDot[t, T]]
FullSimplify[qDDot[t, T]]
(* Numeric evaluation and plotting *)
Tval = 2.0;
qNum[t_] := q[t, Tval];
qDotNum[t_] := qDot[t, Tval];
Plot[qNum[t][[1]], {t, 0, Tval}, PlotLegends -> {"q1(t)"}]
By defining q[s] and sFun[t,T] symbolically,
one can verify the chain-rule formulas, explore alternative time laws,
and even analytically bound joint velocities and accelerations along a
path.
11. Problems and Solutions
Problem 1 (Chain Rule for Second Derivative): Let \( \mathbf{q}_p : [0,1] \to \mathbb{R}^n \) be twice continuously differentiable and let \( s : [0,T] \to [0,1] \) be twice continuously differentiable. Show that
\[ \ddot{\mathbf{q}}(t) = \mathbf{q}_p''(s(t)) \dot{s}(t)^2 + \mathbf{q}_p'(s(t)) \ddot{s}(t), \]
where \( \mathbf{q}(t) = \mathbf{q}_p(s(t)) \).
Solution: For each component \( q_i(t) = q_{p,i}(s(t)) \) we have
\[ \dot{q}_i(t) = q_{p,i}'(s(t)) \dot{s}(t). \]
Differentiating again:
\[ \ddot{q}_i(t) = \frac{\mathrm{d}}{\mathrm{d}t} \big(q_{p,i}'(s(t)) \dot{s}(t)\big) = q_{p,i}''(s(t)) \dot{s}(t)^2 + q_{p,i}'(s(t)) \ddot{s}(t), \]
using the product rule and chain rule. Collecting these components into a vector yields the desired formula.
Problem 2 (Velocity Limit and Minimal Duration): Consider a single joint following the geometric path \( q_p(s) = s^3 \), \( s \in [0,1] \), with a scalar time law \( s(t) \), \( s(0)=0 \), \( s(T)=1 \), and \( \dot{s}(t) \geq 0 \). The joint velocity limit is \( |\dot{q}(t)| \leq \dot{q}^{\max} \). Assuming that along the trajectory we always saturate the velocity constraint (i.e. \( |\dot{q}(t)| = \dot{q}^{\max} \) almost everywhere), derive a lower bound on the duration \( T \).
Solution: We have
\[ \dot{q}(t) = \frac{\mathrm{d}q_p}{\mathrm{d}s}(s(t)) \dot{s}(t) = 3 s(t)^2 \dot{s}(t). \]
Under saturation, \( 3 s(t)^2 \dot{s}(t) = \dot{q}^{\max} \) for almost all \( t \). Separating variables:
\[ \dot{s}(t) = \frac{\dot{q}^{\max}}{3 s(t)^2}. \]
Thus
\[ \frac{\mathrm{d}s}{\mathrm{d}t} = \frac{\dot{q}^{\max}}{3 s^2} \quad \Rightarrow \quad \mathrm{d}t = \frac{3 s^2}{\dot{q}^{\max}} \, \mathrm{d}s. \]
Integrating from \( t=0 \), \( s=0 \) to \( t=T \), \( s=1 \):
\[ T = \int_0^T \mathrm{d}t = \int_0^1 \frac{3 s^2}{\dot{q}^{\max}} \, \mathrm{d}s = \frac{3}{\dot{q}^{\max}} \cdot \frac{1}{3} = \frac{1}{\dot{q}^{\max}}. \]
Therefore \( T \geq \dot{q}^{\max^{-1}} \). Any shorter duration would cause the velocity bound to be violated somewhere along the path.
Problem 3 (Feasible Region in (\( \dot{s} \), \( \ddot{s} \)) for 1-DOF): For a 1-DOF joint following a geometric path \( q_p(s) \) with nonzero derivatives, velocity and acceleration limits imply constraints on \( (\dot{s}, \ddot{s}) \). Show that the acceleration constraint has the form
\[ a^{-}(s, \dot{s}) \leq \ddot{s} \leq a^{+}(s, \dot{s}), \]
for suitable functions \( a^{-}, a^{+} \), and sketch the feasible region qualitatively.
Solution: In 1-DOF, the acceleration constraint is
\[ |\ddot{q}(t)| = |q_p''(s) \dot{s}^2 + q_p'(s) \ddot{s}| \leq \ddot{q}^{\max}. \]
This is equivalent to
\[ -\ddot{q}^{\max} \leq q_p''(s) \dot{s}^2 + q_p'(s) \ddot{s} \leq \ddot{q}^{\max}. \]
Solving the left and right inequalities for \( \ddot{s} \):
\[ \ddot{s} \geq \frac{-\ddot{q}^{\max} - q_p''(s) \dot{s}^2}{q_p'(s)} =: a^{-}(s, \dot{s}), \]
\[ \ddot{s} \leq \frac{\ddot{q}^{\max} - q_p''(s) \dot{s}^2}{q_p'(s)} =: a^{+}(s, \dot{s}), \]
provided \( q_p'(s) \neq 0 \). Thus, for each fixed \( s \) and \( \dot{s} \), the feasible \( \ddot{s} \) lies between two affine functions of \( \dot{s}^2 \). Qualitatively, in the \( (\dot{s}, \ddot{s}) \)-plane, the constraints generate a band within which admissible accelerations must lie.
flowchart TD
S["Given s"] --> V["Pick s_dot within velocity band"]
V --> Aplus["Upper accel bound a_plus(s, s_dot)"]
V --> Aminus["Lower accel bound a_minus(s, s_dot)"]
Aplus --> F["Feasible ddot_s between a_minus and a_plus"]
Aminus --> F
Problem 4 (Time Reparameterization Invariance of the Path): Let \( \mathbf{q}_p(s) \) be a fixed geometric path and let \( s_1(t) \), \( s_2(t) \) be two admissible time laws with the same boundary conditions \( s_k(0)=0 \), \( s_k(T)=1 \). Show that \( \mathbf{q}_1(t) = \mathbf{q}_p(s_1(t)) \) and \( \mathbf{q}_2(t) = \mathbf{q}_p(s_2(t)) \) trace the same set of configurations in joint space (though at different times).
Solution: For any \( s^\star \in [0,1] \), there exists at least one time \( t_1 \) such that \( s_1(t_1)=s^\star \) (by continuity and monotonicity), and at least one time \( t_2 \) such that \( s_2(t_2)=s^\star \). Then
\[ \mathbf{q}_1(t_1) = \mathbf{q}_p(s_1(t_1)) = \mathbf{q}_p(s^\star), \quad \mathbf{q}_2(t_2) = \mathbf{q}_p(s_2(t_2)) = \mathbf{q}_p(s^\star). \]
Hence every point on the path is visited by both trajectories, possibly at different times. Therefore, time reparameterization changes velocities and accelerations but not the geometric path traced in joint space.
Problem 5 (Task-Space Speed from Joint Path): Let a 2-DOF planar arm have end-effector position \( \mathbf{x} = [x, y]^\top \), and suppose the geometric joint path \( \mathbf{q}_p(s) \) is known along with the Jacobian \( \mathbf{J}(\mathbf{q}) \). Show that the task-space speed along the time-parameterized trajectory is
\[ \|\dot{\mathbf{x}}(t)\| = \left\| \mathbf{J}(\mathbf{q}_p(s(t))) \mathbf{q}_p'(s(t)) \right\| \dot{s}(t). \]
Solution: From differential kinematics, \( \dot{\mathbf{x}}(t) = \mathbf{J}(\mathbf{q}(t))\dot{\mathbf{q}}(t) \). Substituting \( \mathbf{q}(t) = \mathbf{q}_p(s(t)) \) and \( \dot{\mathbf{q}}(t) = \mathbf{q}_p'(s(t))\dot{s}(t) \) yields
\[ \dot{\mathbf{x}}(t) = \mathbf{J}(\mathbf{q}_p(s(t))) \mathbf{q}_p'(s(t)) \dot{s}(t). \]
Taking norms and using the fact that \( \dot{s}(t) \geq 0 \) gives the desired formula. This explicitly shows how path geometry and Jacobian amplify or attenuate the effect of the scalar path speed \( \dot{s}(t) \) on task-space velocity.
12. Summary
This lesson introduced the core concept of time parameterization: trajectories are obtained by composing a geometric path \( \mathbf{q}_p(s) \) with a scalar time law \( s(t) \). Using the chain rule, we derived explicit formulas for joint velocities, accelerations, and jerks in terms of path derivatives and derivatives of \( s(t) \), and we showed how joint and task-space limits translate into inequalities on \( \dot{s}(t) \), \( \ddot{s}(t) \), and \( \dddot{s}(t) \). We also highlighted the role of Jacobian coupling in task-space constraints and demonstrated implementations in Python, C++, Java, MATLAB/Simulink, and Wolfram Mathematica that reflect the same mathematical structure. In later chapters, these concepts will serve as the foundation for more advanced trajectory generation and control schemes.
13. References
- Bobrow, J. E., Dubowsky, S., & Gibson, J. S. (1985). Time-optimal control of robotic manipulators along specified paths. International Journal of Robotics Research, 4(3), 3–17.
- Shin, K. G., & McKay, N. D. (1986). Minimum-time control of robotic manipulators with geometric path constraints. IEEE Transactions on Automatic Control, 31(6), 491–500.
- Pfeiffer, F., & Johanni, R. (1987). A concept for manipulator trajectory planning. IEEE Journal of Robotics and Automation, 3(2), 115–123.
- Verscheure, D., Demeulenaere, B., Swevers, J., De Schutter, J., & Diehl, M. (2009). Time-optimal path tracking for robots: A convex optimization approach. IEEE Transactions on Automatic Control, 54(10), 2318–2327.
- Wong, T., & Leung, S. H. (1998). Multi-criteria time scaling for robot manipulators along specified paths. International Journal of Robotics Research, 17(2), 144–160.
- Slotine, J.-J. E., & Li, W. (1988). Adaptive manipulator control: A case study. IEEE Transactions on Automatic Control, 33(11), 995–1003.
- Hwang, Y. K., & Ahuja, N. (1992). Gross motion planning: A survey. ACM Computing Surveys, 24(3), 219–291.
- Shiller, Z. (1991). Time-optimal motions of robot manipulators. International Journal of Robotics Research, 10(1), 1–18.
- Hollerbach, J. M. (1983). Dynamic scaling of manipulator trajectories. Journal of Dynamic Systems, Measurement, and Control, 105(2), 102–106.
- Sciavicco, L., & Siciliano, B. (2000). Trajectory planning (various journal contributions preceding textbook). Multiple journal publications on robot trajectory planning.