Algorithm Search⌘K

Problemcore

Time-optimal path parameterization

Also called TOPP, time-optimal path tracking.

Find the fastest time scaling of a fixed path under joint torque, velocity and acceleration limits.

Time-optimal path parameterization asks how fast a machine can move along a curve that is already fixed. A machine with several motors, such as a robot arm, a machine tool or a vehicle, must follow a given geometric path, and each motor can give only a limited force or torque. The question is the timing: at each point of the path, how fast to go, so that the whole path takes the least time and no motor is ever asked for more than it can give. Because the path is fixed, the state of the whole machine collapses to two numbers, the position ss along the path and the speed s˙\dot s, and every motor limit becomes a limit on the path acceleration s¨\ddot s that depends on ss and s˙\dot s. The answer has a simple shape: the machine always speeds up or slows down as hard as it can, and switches between the two at a few points. Three families of methods compute it: integration of the extreme curves (Bobrow), a sequence of small linear programs (reachability analysis), and one convex program (convex formulation). The problem is the time-optimal case of the trajectory generation problem, and the robotic counterpart of feedrate scheduling for machine tools.

In plain words

Think of driving a car on a winding road that you must follow exactly. You want to reach the end as soon as possible. On a straight piece you push the pedal down. Before a sharp bend you must brake early enough to enter it at a safe speed. The best driver is always either at full throttle or at full brake, and the art is to know where to switch. A robot arm on a fixed path has the same choice, but its limits are more complex: how hard it can speed up depends on where it is on the path and on how fast it already goes, because the motors must also fight the swinging of the arm. The problem asks for the switch points and the speed at every point of the path.

Definition

Input.

  • A path q:[0,1]→Rnq : [0, 1] \to \mathbb R^n in the joint space of a robot with nn joints, twice differentiable, with qs=dq/dsq_s = dq/ds and qss=d2q/ds2q_{ss} = d^2 q/ds^2.
  • The dynamics in the form of the manipulator equation τ=M(q)q¨+C(q,q˙)q˙+g(q)\tau = M(q)\ddot q + C(q, \dot q)\dot q + g(q), and limits τmin⁡≤τ≤τmax⁡\tau_{\min} \le \tau \le \tau_{\max}. Joint velocity and acceleration limits can be added.
  • The path speeds at the two ends, s˙(0)\dot s(0) and s˙(1)\dot s(1), usually zero (rest to rest).

Along the path, q˙=qss˙\dot q = q_s \dot s and q¨=qss¨+qsss˙2\ddot q = q_s \ddot s + q_{ss} \dot s^2. Write x=s˙2x = \dot s^2 and u=s¨u = \ddot s. Then

τ=M(q)qs u+(M(q)qss+C(q,qs)qs)x+g(q),\tau = M(q) q_s\, u + \left(M(q) q_{ss} + C(q, q_s) q_s\right) x + g(q),

so each torque limit is a row ℓ≤a(s)u+b(s)x+c(s)≤h\ell \le a(s) u + b(s) x + c(s) \le h that is linear in (u,x)(u, x). A joint velocity limit ∣qs,js˙∣≤vj|q_{s,j}\dot s| \le v_j is the row qs,j2x≤vj2q_{s,j}^2 x \le v_j^2. A joint acceleration limit is ∣qs,ju+qss,jx∣≤aj|q_{s,j} u + q_{ss,j} x| \le a_j. The squared speed obeys dx/ds=2udx/ds = 2u.

Output. A time scaling s(t)s(t), given as a profile x(s)≥0x(s) \ge 0 with the end values from the input, such that at almost every ss the pair (u,x)(u, x) with u=12 dx/dsu = \tfrac12\,dx/ds meets every row, and the traversal time

T=∫01dsx(s)T = \int_0^1 \frac{ds}{\sqrt{x(s)}}

is as small as possible. If no admissible profile exists, report that.

At each point ss, the rows give an interval [L(s,x),U(s,x)][L(s, x), U(s, x)] of admissible uu. The largest xx where this interval is not empty is the maximum velocity curve MVC(s)\mathrm{MVC}(s). Every admissible profile stays at or below it.

The bang-bang structure. Bobrow, Dubowsky and Gibson (1985) and Shin and McKay (1985) showed that an optimal profile has, at almost every ss, either u=U(s,x)u = U(s, x) (full acceleration) or u=L(s,x)u = L(s, x) (full braking), except where it runs along the MVC. The switches from braking to acceleration happen on the MVC. Lynch and Park (Section 9.4) present the same result. The proof on the Bobrow page compares any admissible profile with the extreme curves; it needs the rows to meet some regularity conditions, and it fails at singular points where a coefficient aj(s)a_j(s) of the active row is zero (see Variants).

Variants

  • Discretized. The limits are imposed only at the points of a grid s0<⋯<sNs_0 < \dots < s_N, with uu constant on each interval. This is the form solved by the reachability method and the convex formulation. The limits then hold between grid points only up to an error that shrinks with the grid step.
  • With velocity limits. Joint velocity limits add a second ceiling to the MVC that does not depend on uu. The profile can then run along the ceiling for a whole stretch.
  • With singular points. At points where the coefficient of uu in an active row is zero (zero-inertia points), the limits on uu jump, the optimal profile can follow the MVC on a singular arc, and the integration method often fails there. Pham (2014) analyzes these failures; see also singular arcs in optimal control.
  • Penalized. Minimize TT plus a cost on torques or on the rate of torque change, so that the profile is smoother. The convex formulation allows convex penalties.
  • With jerk or torque-rate limits. These limits involve du/dsd u/ds and break the linear structure in (u,x)(u, x); the problem is then no longer convex in the same variables.
  • Admissible velocity propagation. Instead of one optimal profile, compute the set of all reachable end speeds, for use inside a kinodynamic planner. The reachability method does this as a by-product.

Examples

One axis. For q(s)=sq(s) = s with ∣q˙∣≤1|\dot q| \le 1 and ∣q¨∣≤2|\ddot q| \le 2, rest to rest, the rows are −2≤u≤2-2 \le u \le 2 and x≤1x \le 1. The optimal profile accelerates at u=2u = 2 up to x=1x = 1 at s=1/4s = 1/4, runs at x=1x = 1, and brakes at u=−2u = -2 from s=3/4s = 3/4. This is the trapezoidal velocity profile with T=1.5T = 1.5. Without the velocity limit, the two extreme curves x=4sx = 4s and x=4(1−s)x = 4(1 - s) meet at s=1/2s = 1/2, and T=2≈1.41421T = \sqrt 2 \approx 1.41421.

A 2R arm. A planar arm with unit links, unit point masses at the link ends and no gravity follows the straight joint path from (0,0)(0, 0) to (2,−3)(2, -3) with ∣τ1∣≤10|\tau_1| \le 10 and ∣τ2∣≤4|\tau_2| \le 4. Some values of the MVC (in x=s˙2x = \dot s^2):

ss 0 0.1 0.2 0.3 0.35 0.4 0.6 0.8 1.0
MVC(s)\mathrm{MVC}(s) infinite 6.444 2.893 1.570 1.156 1.218 1.703 3.037 15.79

At s=0s = 0 the arm is stretched out, so the Coriolis and centrifugal terms vanish; the path is a straight line in joint space, so qss=0q_{ss} = 0; then u=0u = 0 is admissible at every speed, and the MVC has no limit there. The optimal profile accelerates to s≈0.239s \approx 0.239, brakes to touch the MVC near its minimum at s≈0.349s \approx 0.349, accelerates again to s≈0.731s \approx 0.731, and brakes to rest. The minimum time is about 1.51061.5106. The three methods agree: 1.510651.51065 for the integration method with step 0.0010.001, 1.510561.51056 for the reachability method with 2000 grid intervals, and 1.505551.50555 for the convex formulation with 50 intervals, where the coarse grid checks the limits at fewer points.

Known algorithms

  • Numerical integration (Bobrow-Dubowsky-Gibson algorithm, also by Shin and McKay). Integrate the curve of full braking back from the end and the curve of full acceleration forward from the start. Where the forward curve hits the MVC, search the MVC for the next switch point and integrate from there. Fast, and exact up to the integration error, but fragile at singular points.
  • Reachability analysis (TOPP-RA). On a grid of NN intervals, compute backward the sets of speeds from which the end can still be reached, each with a few small linear programs, then go forward greedily. Time O(mN)O(mN) for mm rows; it never fails when the discretized problem is feasible.
  • Convex optimization (convex formulation). With b=s˙2b = \dot s^2 as the variable, the discretized problem is convex and can be written as a second-order cone program. An interior point method gives the optimum of the discretized problem up to a chosen tolerance, and convex penalties can be added.
  • Dynamic programming on a grid of (s,s˙)(s, \dot s) values. Simple, but the cost grows with the product of the two grid sizes, and the answer is only as fine as the speed grid.
AlgorithmTimeSpacePropertiesCode
Bobrow-Dubowsky-Gibson algorithmO(k b m^2 / h) worstO(k / h) extradeterministicnot exactofflinenot randomized1 language
Convex time-optimal path parameterizationO(K N m) worstΘ(N m) extradeterministicnot exactofflinenot randomized1 language
Time-optimal path parameterization by reachability analysisO(N m^2) worstΘ(N) extradeterministicnot exactofflinenot randomized1 language

Bounds

  • Lower bound from the MVC. Every admissible profile has x(s)≤MVC(s)x(s) \le \mathrm{MVC}(s), so T≥∫01ds/MVC(s)T \ge \int_0^1 ds/\sqrt{\mathrm{MVC}(s)}. The bound is often weak: for the 2R arm above it is about 0.6230.623, while the optimum is about 1.5111.511, because the arm cannot reach the MVC from rest.
  • One axis. For one axis with ∣q˙∣≤V|\dot q| \le V and ∣q¨∣≤A|\ddot q| \le A over a distance DD, the optimum is D/V+V/AD/V + V/A if D≥V2/AD \ge V^2/A, and 2D/A2\sqrt{D/A} otherwise.
  • Computation. For a grid of NN intervals with mm rows per point, the reachability method takes O(mN)O(mN) time (Pham and Pham 2018, Section IV-D). The discretized problem is a second-order cone program, so interior point methods solve it in polynomial time; each Newton step of a direct implementation costs O(N+M)O(N + M) for MM constraints, thanks to the tridiagonal structure of the problem. The integration method takes O(m/h)O(m/h) time per curve with step hh, times the number of curves.
  • Discretization error. With limits checked only at grid points, the result can break a limit between grid points by an amount of order Δ\Delta, the grid step. Pham and Pham give an O(Δ)O(\Delta) bound for the collocation form and O(Δ2)O(\Delta^2) for a first-order interpolation form.

Reductions

  • Path tracking to a one-dimensional system. A fixed path reduces the nn-joint dynamics to the double integrator s¨=u\ddot s = u with state-dependent bounds on uu. TOPP is then time-optimal control of this system, and the Pontryagin maximum principle predicts the bang-bang form.
  • To a convex program. The change of variables b=s˙2b = \dot s^2, a=s¨a = \ddot s makes the limits linear and the time ∫ds/b\int ds/\sqrt b convex (Verscheure et al. 2009).
  • To linear programs in two variables. Each step of the reachability method is a pair of linear programs over the admissible polygon at one grid point.
  • Straight line with box limits to a trapezoid. For q(s)=q0+sΔqq(s) = q_0 + s\Delta q with constant velocity and acceleration limits per joint, every row reduces to a constant bound on s˙\dot s or s¨\ddot s, and the answer is a trapezoid in ss.
  • Path-velocity decomposition. A planner chooses a path that avoids obstacles; TOPP then gives the timing. With moving obstacles the timing must also avoid regions of the plane of ss and tt; see path-velocity decomposition.

Applications

Industrial robots use TOPP to shorten cycle times on pick-and-place and welding paths. Sampling-based planners call it to time the paths they find, and some planners use the reachable speed sets to test kinodynamic feasibility. Legged and humanoid robots apply the same reduction with contact force limits along a planned center of mass path. Vehicles and machine tools use the same idea for speed planning along a road or tool path with limits on lateral acceleration or feed force.

References

  1. James E. Bobrow, Steven Dubowsky and John S. Gibson, Time-optimal control of robotic manipulators along specified paths, The International Journal of Robotics Research 4(3), 1985, 3-17, the whole paper (the reduction to the phase plane and the bang-bang structure)
  2. Kang G. Shin and Neil D. McKay, Minimum-time control of robotic manipulators with geometric path constraints, IEEE Transactions on Automatic Control 30(6), 1985, 531-541, the whole paper (the same reduction, found at the same time)
  3. Diederik Verscheure, Bram Demeulenaere, Jan Swevers, Joris De Schutter and Moritz Diehl, Time-optimal path tracking for robots: a convex optimization approach, IEEE Transactions on Automatic Control 54(10), 2009, 2318-2327, the whole paper (the convex reformulation in b = s'^2)
  4. Hung Pham and Quang-Cuong Pham, A new approach to time-optimal path parameterization based on reachability analysis, IEEE Transactions on Robotics 34(3), 2018, 645-659, Section IV-D (the costs of the three approaches) and Section V (experiments)
  5. Kevin M. Lynch and Frank C. Park, Modern Robotics, Mechanics, Planning, and Control, Cambridge University Press, 2017, Section 9.4 (time-optimal time scaling)

Where this leads

About this page

The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW2 basic
  • a contract.yaml