The ACADO Toolkit is an open-source software environment and algorithm collection for automatic control and dynamic optimization. Its primary purpose is to facilitate the rapid development and deployment of Model Predictive Control (MPC) and Moving Horizon Estimation (MHE) algorithms. It provides a user-friendly C++ interface for formulating and solving Optimal Control Problems (OCPs) and Nonlinear Programming (NLP) problems, abstracting away complex numerical details.
Glossary
ACADO Toolkit

What is ACADO Toolkit?
ACADO Toolkit is an open-source software environment and algorithm collection designed for rapid prototyping of advanced control and online optimization methods.
The toolkit employs efficient numerical methods like direct multiple shooting and Sequential Quadratic Programming (SQP) to solve complex optimization problems in real-time. It integrates automatic differentiation for gradients and supports code generation for embedded systems, enabling deployment on hardware with strict computational limits. ACADO is widely used in robotics, aerospace, and process engineering for implementing Nonlinear MPC (NMPC) and state estimation.
Key Features of ACADO Toolkit
ACADO Toolkit is an open-source software environment and algorithm collection for automatic control and dynamic optimization, designed for rapid prototyping of Model Predictive Control (MPC) and Moving Horizon Estimation (MHE).
Symbolic Modeling Interface
ACADO provides a user-friendly C++ syntax for symbolically defining complex Optimal Control Problems (OCPs). Users can directly write differential equations, algebraic constraints, and objective functions in a natural mathematical form. This high-level abstraction eliminates the need for manual derivation of gradients and Jacobians, as the toolkit performs automatic differentiation internally. For example, a nonlinear system model and its constraints can be defined in a few lines of code, which ACADO then translates into a numerically solvable Nonlinear Programming (NLP) problem.
Integrated Algorithm Chain
The toolkit is not just a solver library; it is an integrated workflow from problem formulation to solution. It combines:
- Direct Optimal Control Methods: Such as direct single shooting and direct multiple shooting for discretizing continuous-time OCPs.
- Numerical Integrators: Efficient routines (e.g., Runge-Kutta) for simulating the system dynamics.
- Optimization Solvers: Includes built-in solvers for Quadratic Programming (QP) and Nonlinear Programming (NLP) problems, specifically tailored for the structure of MPC problems. This integration allows for code generation, where the entire algorithm chain is exported as optimized, standalone C code ready for real-time deployment.
Support for Nonlinear MPC (NMPC)
A primary strength of ACADO is its native support for Nonlinear Model Predictive Control (NMPC). It handles nonlinear system dynamics, non-quadratic cost functions, and nonlinear state/input constraints. The toolkit employs efficient Sequential Quadratic Programming (SQP) algorithms to solve the resulting NLP. Key features for NMPC include:
- Real-Time Iteration (RTI) scheme: A highly efficient approach where only one SQP iteration is performed per control sampling period, using a warm start from the previous solution.
- Hessian approximation methods to balance speed and accuracy. This makes ACADO particularly suited for challenging applications like robotics, chemical processes, and autonomous systems where linear models are insufficient.
Moving Horizon Estimation (MHE)
ACADO provides a dual framework for Moving Horizon Estimation (MHE), the state estimation counterpart to MPC. It allows users to formulate and solve constrained state estimation problems using the same symbolic interface and numerical machinery. Features include:
- Formulation of a least-squares estimation problem over a receding window of past measurements.
- Explicit handling of process and measurement noise with customizable covariance matrices.
- Enforcement of state constraints during estimation, which improves accuracy over unconstrained observers like the Kalman Filter. This seamless integration of MPC and MHE enables the development of high-performance output-feedback controllers where full state measurement is unavailable.
Code Generation for Embedded Targets
ACADO's code generation tool (ACADO Code Generation) is a standout feature for industrial and embedded applications. It automatically translates a defined OCP into a self-contained, optimized C code module. This module includes:
- The specific QP or NLP solver tailored to the problem.
- All necessary linear algebra routines.
- A simulation environment for testing. The generated code is platform-independent, highly efficient, and suitable for deployment on real-time operating systems (RTOS) or microcontrollers. This facilitates Hardware-in-the-Loop (HIL) testing and direct implementation on embedded control hardware, drastically reducing prototyping time.
Interoperability & MATLAB Interface
While natively a C++ toolkit, ACADO offers strong interoperability with popular engineering environments. Its MATLAB interface allows control engineers to prototype problems in the familiar MATLAB/Simulink ecosystem while leveraging ACADO's powerful optimization back-end. This interface enables:
- Definition of problems using MATLAB scripts.
- Rapid simulation and benchmarking against other MATLAB toolboxes.
- Export of generated C code from within MATLAB. This dual-environment support lowers the barrier to entry for academic and industrial users, allowing them to transition smoothly from high-level design to embedded implementation.
ACADO Toolkit vs. Other MPC Frameworks
A technical comparison of the ACADO Toolkit against other popular software frameworks for implementing Model Predictive Control (MPC), focusing on architecture, capabilities, and target use cases.
| Feature / Metric | ACADO Toolkit | General-Purpose Optimization (e.g., CasADi + IPOPT) | Commercial Toolboxes (e.g., MATLAB MPC Toolbox) |
|---|---|---|---|
Primary Architecture | Code Generation Toolchain | Interpreted Modeling Language | Interactive Block-Based Design |
Core Solution Method | Direct Multiple Shooting (SQP) | Direct Collocation / Multiple Shooting | Active-Set / Interior-Point QP |
Real-Time Focus | High (Auto-generated, embeddable C++) | Medium (Requires solver runtime) | Low (Prototyping & Simulation) |
Nonlinear MPC (NMPC) Support | Native (via SQP) | Native (via NLP solvers) | Limited (Primarily Linear/QP) |
Moving Horizon Estimation (MHE) | Native Integration | Manual Implementation Required | Separate Toolbox Required |
Automatic Differentiation | Built-in Symbolic Core | Via CasADi or similar | Limited / Numerical |
Hardware Deployment Target | Embedded CPUs (C++ Codegen) | Workstations / Servers | Desktop PC for Design |
License Model | Open-Source (LGPL) | Open-Source (CasADi: LGPL) / Commercial (IPOPT) | Commercial (Proprietary) |
Typical Use Case | Rapid Prototyping to Embedded Deployment | Research & Algorithm Development | Control Design & Plant Simulation |
Frequently Asked Questions
The ACADO Toolkit is a pivotal open-source software environment for rapid prototyping of advanced control and estimation algorithms. These questions address its core functionality, applications, and how it fits into the modern control engineering workflow.
The ACADO Toolkit is an open-source software environment and algorithm collection written in C++ specifically designed for automatic control and dynamic optimization. Its primary use is the rapid prototyping and deployment of Model Predictive Control (MPC) and Moving Horizon Estimation (MHE) algorithms for complex dynamic systems. It provides a user-friendly interface to formulate and solve Optimal Control Problems (OCPs) and Nonlinear Programming (NLP) problems, generating optimized C++ code suitable for real-time applications in robotics, process engineering, and aerospace.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
ACADO Toolkit is a key component in the Model Predictive Control (MPC) development stack. The following terms represent its core functionalities, the problems it solves, and the broader ecosystem of tools and concepts it interacts with.
Optimal Control Problem (OCP)
The Optimal Control Problem (OCP) is the fundamental mathematical formulation solved by ACADO Toolkit. It is defined by:
- A dynamic model (e.g., ODE or DAE) describing the system's evolution.
- A cost function to be minimized over a time horizon (e.g., tracking error, control effort).
- A set of path and boundary constraints on system states and control inputs. ACADO provides automated code generation to transcribe this continuous-time OCP into a structured Nonlinear Programming (NLP) problem suitable for numerical solvers.
Nonlinear Model Predictive Control (NMPC)
Nonlinear MPC (NMPC) is the primary application domain for ACADO Toolkit. Unlike Linear MPC, NMPC handles systems with nonlinear dynamics and constraints, resulting in a Nonlinear Programming (NLP) problem at each control step. ACADO excels at NMPC by:
- Providing efficient direct optimal control methods (single/multiple shooting) to discretize the problem.
- Generating real-time iteration algorithms for fast online optimization.
- Enabling rapid prototyping of NMPC controllers for complex systems like autonomous vehicles or chemical processes.
Moving Horizon Estimation (MHE)
Moving Horizon Estimation (MHE) is the dual problem to MPC and a core module within ACADO Toolkit. While MPC optimizes future control inputs, MHE optimizes past state trajectories to provide the best current state estimate. ACADO's MHE capabilities include:
- Solving a constrained optimization problem over a sliding window of past measurements.
- Explicitly handling system nonlinearities and state constraints, offering advantages over recursive filters like the Extended Kalman Filter (EKF) in constrained environments.
- Sharing the same modeling interface and numerical solvers as its MPC functionality.
Sequential Quadratic Programming (SQP)
Sequential Quadratic Programming (SQP) is a leading algorithmic family for solving the NLP problems generated by ACADO for NMPC and MHE. ACADO implements a real-time iteration (RTI) SQP scheme which:
- Approximates the complex NLP by a series of simpler, convex Quadratic Programming (QP) subproblems.
- Performs only one SQP iteration per control sampling period, using a warm start from the previous solution to meet real-time deadlines.
- This makes the online optimization tractable for fast dynamic systems, a key feature of ACADO's code generation.
Direct Multiple Shooting
Direct multiple shooting is a specific numerical transcription method implemented in ACADO for converting continuous-time OCPs into discrete NLPs. This method:
- Divides the prediction horizon into multiple shooting intervals.
- Solves an initial value problem (integrates the model) on each interval independently.
- Adds continuity constraints to ensure the state trajectory is seamless across interval boundaries.
- This approach improves numerical stability compared to single shooting, especially for unstable systems, and allows for efficient parallelization of the integration steps.
Code Generation & Automatic Differentiation
ACADO Toolkit's standout feature is its automatic code generation for embedded targets. It automates two critical and error-prone steps:
- Automatic Differentiation (AD): It automatically computes exact first and second-order derivatives (Jacobians, Hessians) of the model and cost functions, which are essential for the SQP solver's convergence speed and accuracy.
- Solver Export: It generates plain C/C++ code implementing the entire real-time optimization algorithm, tailored for deployment on embedded systems. This eliminates manual derivative coding and solver integration, drastically reducing prototype-to-production time.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us