TinyMPC: Model-Predictive Control on Resource-Constrained Microcontrollers

2310.16985

YC

0

Reddit

0

Published 5/9/2024 by Khai Nguyen, Sam Schoedel, Anoushka Alavilli, Brian Plancher, Zachary Manchester

🤿

Abstract

Model-predictive control (MPC) is a powerful tool for controlling highly dynamic robotic systems subject to complex constraints. However, MPC is computationally demanding, and is often impractical to implement on small, resource-constrained robotic platforms. We present TinyMPC, a high-speed MPC solver with a low memory footprint targeting the microcontrollers common on small robots. Our approach is based on the alternating direction method of multipliers (ADMM) and leverages the structure of the MPC problem for efficiency. We demonstrate TinyMPC's effectiveness by benchmarking against the state-of-the-art solver OSQP, achieving nearly an order of magnitude speed increase, as well as through hardware experiments on a 27 gram quadrotor, demonstrating high-speed trajectory tracking and dynamic obstacle avoidance. TinyMPC is publicly available at https://tinympc.org.

Create account to get full access

or

If you already have an account, we'll log you in

Overview

  • TinyMPC is a high-speed model predictive control (MPC) solver with a low memory footprint, designed for use on small, resource-constrained robotic platforms.
  • It leverages the alternating direction method of multipliers (ADMM) and the structure of the MPC problem to achieve efficiency.
  • TinyMPC is benchmarked against the state-of-the-art solver OSQP, and is shown to be nearly an order of magnitude faster.
  • The researchers demonstrate TinyMPC's effectiveness through hardware experiments on a 27-gram quadrotor, showcasing high-speed trajectory tracking and dynamic obstacle avoidance.

Plain English Explanation

Model predictive control (MPC) is a powerful tool for controlling dynamic robotic systems, but it can be computationally demanding. TinyMPC: A High-Speed MPC Solver for Small Robots aims to make MPC more practical for small, resource-constrained robots by developing a highly efficient MPC solver.

The key idea is to use a specific optimization method called the alternating direction method of multipliers (ADMM), which is well-suited for the structure of MPC problems. This allows TinyMPC to run much faster than the state-of-the-art MPC solver, OSQP, while also using less memory.

The researchers demonstrate TinyMPC on a tiny 27-gram quadrotor drone, showing that it can perform high-speed trajectory tracking and avoid dynamic obstacles. This is an important step towards making advanced control techniques like actor-critic MPC and robust tube MPC practical for small robots.

Technical Explanation

The researchers leverage the structure of the MPC problem to develop an efficient solver called TinyMPC. They use the alternating direction method of multipliers (ADMM), which is well-suited for the optimization problem underlying MPC.

Through careful problem formulation and algorithm design, TinyMPC achieves a significant speed increase compared to the state-of-the-art solver OSQP, while also having a low memory footprint. The researchers benchmark TinyMPC against OSQP, demonstrating nearly an order of magnitude improvement in computation time.

To validate the effectiveness of TinyMPC, the researchers conduct hardware experiments on a 27-gram quadrotor drone. They show that TinyMPC enables the quadrotor to perform high-speed trajectory tracking and dynamic obstacle avoidance, demonstrating its practical utility for small robotic platforms.

Critical Analysis

The researchers acknowledge that, while TinyMPC represents a significant improvement in efficiency, there may still be limitations in its applicability to the most resource-constrained microcontrollers. They suggest that further research is needed to explore the use of MPC-inspired reinforcement learning and perfecting periodic trajectory tracking as complementary approaches to further reduce the computational burden.

Additionally, the researchers note that the hardware experiments were conducted on a relatively simple quadrotor platform, and more complex robotic systems may present additional challenges. Further research could explore the scalability of TinyMPC to a wider range of robotic platforms and tasks.

Conclusion

TinyMPC represents a significant advancement in making model predictive control practical for small, resource-constrained robotic platforms. By leveraging the ADMM optimization method and the structure of the MPC problem, the researchers have developed a high-speed solver that can run on microcontrollers while maintaining a low memory footprint.

The hardware experiments on a 27-gram quadrotor drone demonstrate the real-world effectiveness of TinyMPC, showcasing its ability to enable advanced control techniques like high-speed trajectory tracking and dynamic obstacle avoidance on small robotic systems. This work paves the way for the broader adoption of MPC in a wider range of robotic applications.



This summary was produced with help from an AI and may contain inaccuracies - check out the links to read the original source documents!

Related Papers

Embedded Hierarchical MPC for Autonomous Navigation

Embedded Hierarchical MPC for Autonomous Navigation

Dennis Benders, Johannes Kohler, Thijs Niesten, Robert Babuv{s}ka, Javier Alonso-Mora, Laura Ferranti

YC

0

Reddit

0

To efficiently deploy robotic systems in society, mobile robots need to autonomously and safely move through complex environments. Nonlinear model predictive control (MPC) methods provide a natural way to find a dynamically feasible trajectory through the environment without colliding with nearby obstacles. However, the limited computation power available on typical embedded robotic systems, such as quadrotors, poses a challenge to running MPC in real-time, including its most expensive tasks: constraints generation and optimization. To address this problem, we propose a novel hierarchical MPC scheme that interconnects a planning and a tracking layer. The planner constructs a trajectory with a long prediction horizon at a slow rate, while the tracker ensures trajectory tracking at a relatively fast rate. We prove that the proposed framework avoids collisions and is recursively feasible. Furthermore, we demonstrate its effectiveness in simulations and lab experiments with a quadrotor that needs to reach a goal position in a complex static environment. The code is efficiently implemented on the quadrotor's embedded computer to ensure real-time feasibility. Compared to a state-of-the-art single-layer MPC formulation, this allows us to increase the planning horizon by a factor of 5, which results in significantly better performance.

Read more

6/18/2024

🚀

Parameter-Adaptive Approximate MPC: Tuning Neural-Network Controllers without Re-Training

Henrik Hose, Alexander Grafe, Sebastian Trimpe

YC

0

Reddit

0

Model Predictive Control (MPC) is a method to control nonlinear systems with guaranteed stability and constraint satisfaction but suffers from high computation times. Approximate MPC (AMPC) with neural networks (NNs) has emerged to address this limitation, enabling deployment on resource-constrained embedded systems. However, when tuning AMPCs for real-world systems, large datasets need to be regenerated and the NN needs to be retrained at every tuning step. This work introduces a novel, parameter-adaptive AMPC architecture capable of online tuning without recomputing large datasets and retraining. By incorporating local sensitivities of nonlinear programs, the proposed method not only mimics optimal MPC inputs but also adjusts to known changes in physical parameters of the model using linear predictions while still guaranteeing stability. We showcase the effectiveness of parameter-adaptive AMPC by controlling the swing-ups of two different real cartpole systems with a severely resource-constrained microcontroller (MCU). We use the same NN across both system instances that have different parameters. This work not only represents the first experimental demonstration of AMPC for fast-moving systems on low-cost MCUs to the best of our knowledge, but also showcases generalization across system instances and variations through our parameter-adaptation method. Taken together, these contributions represent a marked step toward the practical application of AMPC in real-world systems.

Read more

6/7/2024

Multi-Model Predictive Attitude Control of Quadrotors

Multi-Model Predictive Attitude Control of Quadrotors

Mohammadreza Izadi, Zeinab Shayan, Reza Faieghi

YC

0

Reddit

0

This paper introduces a new multi-model predictive control (MMPC) method for quadrotor attitude control with performance nearly on par with nonlinear model predictive control (NMPC) and computational efficiency similar to linear model predictive control (LMPC). Conventional NMPC, while effective, is computationally intensive, especially for attitude control that needs a high refresh rate. Conversely, LMPC offers computational advantages but suffers from poor performance and local stability. Our approach relies on multiple linear models of attitude dynamics, each accompanied by a linear model predictive controller, dynamically switching between them given flight conditions. We leverage gap metric analysis to minimize the number of models required to accurately predict the vehicle behavior in various conditions and incorporate a soft switching mechanism to ensure system stability during controller transitions. Our results show that with just 15 models, the vehicle attitude can be accurately controlled across various set points. Comparative evaluations with existing controllers such as incremental nonlinear dynamic inversion, sliding mode control, LMPC, and NMPC reveal that our approach closely matches the effectiveness of NMPC, outperforming other methods, with a running time comparable to LMPC.

Read more

6/26/2024

Efficient model predictive control for nonlinear systems modelled by deep neural networks

Efficient model predictive control for nonlinear systems modelled by deep neural networks

Jianglin Lan

YC

0

Reddit

0

This paper presents a model predictive control (MPC) for dynamic systems whose nonlinearity and uncertainty are modelled by deep neural networks (NNs), under input and state constraints. Since the NN output contains a high-order complex nonlinearity of the system state and control input, the MPC problem is nonlinear and challenging to solve for real-time control. This paper proposes two types of methods for solving the MPC problem: the mixed integer programming (MIP) method which produces an exact solution to the nonlinear MPC, and linear relaxation (LR) methods which generally give suboptimal solutions but are much computationally cheaper. Extensive numerical simulation for an inverted pendulum system modelled by ReLU NNs of various sizes is used to demonstrate and compare performance of the MIP and LR methods.

Read more

5/20/2024