  This paper introduces a differential dynamic programming (DDP) based
framework for polynomial trajectory generation for differentially flat systems.
In particular, instead of using a linear equation with increasing size to
represent multiple polynomial segments as in literature, we take a new
perspective from state-space representation such that the linear equation
reduces to a finite horizon control system with a fixed state dimension and the
required continuity conditions for consecutive polynomials are automatically
satisfied. Consequently, the constrained trajectory generation problem (both
with and without time optimization) can be converted to a discrete-time
finite-horizon optimal control problem with inequality constraints, which can
be approached by a recently developed interior-point DDP (IPDDP) algorithm.
Furthermore, for unconstrained trajectory generation with preallocated time, we
show that this problem is indeed a linear-quadratic tracking (LQT) problem (DDP
algorithm with exact one iteration). All these algorithms enjoy linear
complexity with respect to the number of segments. Both numerical comparisons
with state-of-the-art methods and physical experiments are presented to verify
and validate the effectiveness of our theoretical findings. The implementation
code will be open-sourced,
