A polynomial profile is a closed-form time law that drives one axis from a start state to a goal state over a fixed duration
Point-to-point moves are the bread and butter of servo motion: robot joints, CNC and pick-and-place axes, motor position loops. The coefficients come from a handful of algebraic expressions, solved once. Each servo tick is then a fixed number of multiply-adds, with no iteration, no lookup table and a deterministic cycle count.
Let
The conditions are linear in the coefficients
The start conditions give
The acceleration is linear in
The start conditions give
The acceleration is a cubic matching
Position, velocity, acceleration and jerk are four Horner evaluations of the polynomial and its three derivatives:
The cubic is the same evaluation with
With zero end velocities (and accelerations, for the quintic) the cubic peaks at
| Operation | Time | Space | Notes |
|---|---|---|---|
| Coefficient solve | Closed-form expressions, once at construction or reset | ||
| Sample | Four Horner evaluations, at most 14 multiply-adds; no state change, so deterministic | ||
| Stored state | n/a | Six coefficients, the duration and the degree; stack only, no heap |
Rest-to-rest cubic with
| Step | Computation | Result |
|---|---|---|
| Position |
|
|
| Velocity |
|
|
| Acceleration |
|
|
| Jerk |
|
The position is the smoothstep of
-
Duration must be positive. The coefficients contain
$1/T^k$ terms; a zero or negative duration is rejected at construction and reset. -
Short durations in single precision. Higher-order coefficients grow like
$1/T^5$ for the quintic, and terms of opposite sign cancel near the end of the move, losing digits. -
Clamped time holds the endpoint state. Outside
$[0, T]$ the sample is the state at$0$ or$T$ , so it reports the end velocity and acceleration, not zero, when they are nonzero. - Acceleration steps in the cubic. Acceleration is not matched, so at rest endpoints it jumps from or to zero, which excites flexible loads. The quintic's jerk is finite but generally nonzero at the ends.
-
No limit enforcement. Peaks follow from
$\Delta q$ ,$T$ and the boundary values; inconsistent boundary velocities can overshoot$q_f$ before returning.
| Variant | Key difference |
|---|---|
| Cubic (this) | Position and velocity matched; constant jerk; acceleration discontinuous at the ends |
| Quintic (this) | Adds acceleration matching; continuous acceleration at about |
| Path-parameter time law | A 0 to 1 instance maps time to a normalized path coordinate; with |
-
Joint-space moves — robot joints and servo axes between taught points; multi-axis moves use one instance per axis with a common
$T$ so all axes arrive together. - Pick-and-place and CNC positioning — fixed-time axis moves where smoothness matters more than minimum time.
- Path timing — the scalar time law along a geometric path such as an orientation interpolation.
| Algorithm | Relationship |
|---|---|
| Trapezoidal velocity profile | Respects velocity and acceleration limits with a free duration; polynomials fix the duration and let the peaks follow |
| S-curve profile | Bounds jerk explicitly under limits; the quintic only smooths the endpoints |
| Cubic spline interpolation | Handles many via points with continuous acceleration; for two knots it reduces to this cubic |
- Craig, J. J., "Introduction to Robotics: Mechanics and Control," 3rd ed., Pearson, 2005, Chapter 7 (trajectory generation).
- Biagiotti, L. and Melchiorri, C., "Trajectory Planning for Automatic Machines and Robots," Springer, 2008, §2.1.