  Signal Temporal Logic (STL) is capable of expressing a broad range of
temporal properties that controlled dynamical systems must satisfy. In the
literature, both mixed-integer programming (MIP) and nonlinear programming
(NLP) methods have been applied to solve optimal control problems with STL
specifications. However, neither approach has succeeded in solving problems
with complex long-horizon STL specifications within a realistic timeframe. This
study proposes a new optimization framework, called \textit{STLCCP}, which
explicitly incorporates several structures of STL to mitigate this issue. The
core of our framework is a structure-aware decomposition of STL formulas, which
converts the original program into a difference of convex (DC) programs. This
program is then solved as a convex quadratic program sequentially, based on the
convex-concave procedure (CCP). Our numerical experiments on several commonly
used benchmarks demonstrate that this framework can effectively handle complex
scenarios over long horizons, which have been challenging to address even using
state-of-the-art optimization methods.
