On Real-Time Feasibility of High-Rate MPC using an Active-Set Method on Nano-Quadcopters
Deploying Model Predictive Control on nano-scale aerial platforms is challenging due to the severe computational limitations of onboard microcontrollers. This paper presents an experimental study with computational focus of a dual active-set solver (DAQP) applied to the low-level control of a Crazyflie 2.1 nano-quadcopter. Unlike previous approaches that utilize first-order methods for low-level stabilization or restrict active-set solvers to high-level control, this work demonstrates the successful deployment of a dual active-set method executing at 500 Hz on an STM32F405 microcontroller. We provide a direct benchmark against a state-of-the-art ADMM-based solver (TinyMPC), revealing that the active-set method yields lower execution times for the flight envelopes considered. Furthermore, to manage the complexity of certifying the solver’s real-time feasibility, we introduce a data-driven set selection method using Principal Component Analysis. Using this approach, state-of-the-art real-time certification methods can be applied to confirm or reject real-time feasibility already off-line prior to flight. More generally, the experimental results validate that active-set methods are a highly competitive alternative for high-frequency control on resource-constrained hardware and the possibility for their real-time certification adds reliability.
💡 Research Summary
This paper investigates the feasibility of deploying a high‑rate Model Predictive Control (MPC) scheme on a nano‑quadcopter platform using a dual active‑set quadratic programming (QP) solver, DAQP, executed on an STM32F405 Cortex‑M4 microcontroller. The authors target the Crazyflie 2.1, a 12‑state, 4‑input aerial vehicle, and aim to run the low‑level MPC at 500 Hz with a prediction horizon of 15 steps. The MPC formulation follows a linear time‑invariant model with cost matrices Q, R, and a terminal cost derived from the infinite‑horizon Riccati solution; constraints on states and inputs are taken from the TinyMPC firmware to ensure a fair comparison. Both DAQP and the state‑of‑the‑art ADMM‑based solver TinyMPC are compiled with aggressive GCC optimizations (‑Ofast) and share identical problem data, eliminating tuning bias.
The dual active‑set method starts from an empty working set and iteratively solves KKT systems, adding or removing constraints based on primal and dual violations until primal and dual tolerances of 1e‑4 are satisfied. The implementation leverages Julia’s LinearMPC and the ASCertain package to generate C code, which is then compiled for the STM32F405 running at 168 MHz. Experimental results show that DAQP consistently outperforms TinyMPC in terms of execution time: average solve times are below 1.8 ms for DAQP versus around 2.5 ms for TinyMPC, with worst‑case times of 2.1 ms and 2.9 ms respectively. Flight tests confirm that the DAQP‑based controller maintains stable trajectory tracking and aggressive maneuvers without missing deadlines.
A major contribution is the integration of a data‑driven parameter‑set reduction technique based on Principal Component Analysis (PCA). By analyzing the covariance of the state‑space region Θ (the set of possible initial states), the authors select a small number of representative samples that capture the most significant variations. This reduces the offline sampling burden from several hundred to about thirty points while preserving the ability to certify worst‑case execution times. Using ASCertain, the authors perform a Worst‑Case Execution Time (WCET) analysis that respects the theoretical framework of Arnström et al. (2024). The measured WCET upper bound (2.1 ms) aligns with observed real‑time performance, demonstrating that the solver can be certified as real‑time feasible before deployment.
The paper concludes that second‑order active‑set QP solvers are a competitive alternative to first‑order methods for resource‑constrained platforms, offering lower latency and deterministic behavior. Moreover, the combination of PCA‑based set selection and ASCertain provides a practical pathway for offline real‑time certification, enhancing reliability and reducing development risk. Future work is suggested on extending the approach to nonlinear dynamics, multi‑robot coordination, and accounting for reduced floating‑point precision on low‑power MCUs.
Comments & Academic Discussion
Loading comments...
Leave a Comment