Skip to content

Real-time optimization and portability hardening

Latest

Choose a tag to compare

@yeezhouyi yeezhouyi released this 31 May 05:18
· 2 commits to main since this release

v0.2.1 — Real-Time Optimization and Portability Hardening

Performance

  • Cached condensed-QP matrices and Hessian, rebuilding them only after Q/R/S hot updates.
  • Reduced mean cycle time by 11.9% in a controlled WSL2 paired A/B benchmark: 3.06 ms → 2.69 ms.
  • Reduced mean solve time by 10.1%: 2.88 ms → 2.59 ms.
  • Reduced deadline miss rate from 4.32% to 3.33%.
  • Preallocated per-cycle work vectors, reducing MPCController-layer Eigen heap allocations from 17+ to approximately 3.
  • Reused OSQP wrapper conversion buffers.

Fixed

  • Fixed Q/R/S hot-update ordering so the Hessian and gradient use consistent weights on the first updated cycle.
  • Added c_float portability for single-precision OSQP builds through explicit element-wise conversion.
  • Removed per-cycle OSQP wrapper buffer allocations.

Validation

  • Completed a controlled WSL2 paired A/B benchmark with 10 alternating runs and 5 matched pairs.
  • All 10 runs passed the predefined failed-cycle quality gate.
  • 4 of 5 paired comparisons showed lower cycle time after optimization.
  • Native Linux runtime characterization remains planned for v0.2.2.
  • Native Linux runtime characterization is tracked in #1 and remains planned for v0.2.2.

Known Limitation

The current performance benchmark was collected under Ubuntu 24.04 on WSL2. The reported results demonstrate the relative improvement between v0.2.0 and v0.2.1 under the same environment, but should not be interpreted as a hard real-time guarantee.