The repo serves the following three development objectives:
- implementation of conic optimization algorithms at principle level;
- test open-source convex solvers' interface and performance in Julia and C/C++;
- customized solvers based on open-source projects, for embedded system (CPU + Parallel acceleration).
Based on solvers' classification in three dimensions,
{First-Order, Second-Order} x {IPM, Exterior Point Method(Penalty)} x {Primal, Primal-dual},
only the three types of solvers and corresponding projects are focused, for real-time trajectory generation's OCP on embedded system:
- Homogeneous Self-dual Embedding(HSDE) IPM for Linear SOCP : ECOS
- Homogeneous Embedding(HE) IPM for Quadratic SOCP: Clarabel
- HE Douglas-Rachford Splitting(DRS) for Quadratic SOCP: SCS
and a similar variant, Proportional-integral projected gradient method (PIPG)
HE DRS is preferred for real-time platform, due to the advantages:
- Infeasibility Certification concurrent with convergence, by Homogeneous Embedding;
- Converges rapidly to local modest precision solution, by first-order splitting iteration;
- Low computational load of single iteration, by conical projection and fixed LDLT decomposition,
compared to updated decomposition of each iteration in IPM's newton direction; - Warm-start, beneficial for MPC.
An example:
The optimal solution is clearly x₁=1, x₂=1, and cost=2.
The convergence process is shown below,
where O(1/k) sublinear convergence rate is obvious
that gap, percent of equality error, percent of primal-dual variables' change is linear
in the logarithmic coordinate.
Therefore converge rapidly to modest precision solution with <3% error, which is acceptable under most
real-time trajectory generation cases. Feasibility is far more important than optimality and high precision,
especially requiring >10Hz updates to deal with constantly changing environment, sudden disturbance, or MPC tasks.
