Model Predictive Control (MPC) is an advanced control method that uses an internal dynamic model to predict a system's future behavior over a finite time horizon and solves an online optimization problem at each control step to determine the optimal sequence of control inputs. The controller implements only the first control action from this optimized sequence before repeating the predict-optimize cycle with updated sensor feedback, enabling real-time, feedback-driven control that explicitly handles system constraints on states, inputs, and outputs. This receding horizon approach makes MPC exceptionally powerful for managing complex, multi-variable systems where traditional PID controllers are insufficient.
Glossary
Model Predictive Control (MPC)

What is Model Predictive Control (MPC)?
Model Predictive Control (MPC) is an advanced, optimization-based control methodology for managing complex dynamic systems, widely used in robotics, process industries, and autonomous vehicles.
In legged and mobile robot locomotion, MPC is fundamental for dynamic stability and terrain adaptation. The controller uses a reduced-order model, like the Linear Inverted Pendulum Model (LIPM), to predict the robot's Center of Mass (CoM) trajectory and optimize future Ground Reaction Forces (GRFs) and foot placements. By solving a Quadratic Program (QP) at high frequency (e.g., 100-500 Hz), MPC can generate control commands that respect physical constraints—such as friction cones and torque limits—while rejecting disturbances and tracking desired velocities. This allows bipedal and quadrupedal robots to walk, run, and recover from pushes autonomously.
Key Features of MPC
Model Predictive Control (MPC) distinguishes itself from classical control methods through its explicit use of a predictive model and online optimization. These core features enable it to handle complex, constrained multi-variable systems common in robotics.
Receding Horizon Optimization
This is the defining mechanism of MPC. At each control time step, the algorithm solves a finite-horizon optimal control problem. It uses an internal dynamic model to predict future system states over a prediction horizon (N steps). It computes a sequence of optimal control inputs, but only the first control action from this sequence is applied to the system. At the next time step, the horizon "recedes" forward, and the optimization is repeated with new state measurements, providing continuous feedback and disturbance rejection.
- Core Mechanism: Plan, execute first step, re-plan.
- Benefit: Inherently accounts for new information and model errors.
Explicit Constraint Handling
MPC formulations directly incorporate hard and soft constraints into the online optimization problem. This is a major advantage over methods that handle constraints via ad-hoc methods or saturation. Common constraints in legged robotics include:
- Actuator Limits: Joint torque, velocity, and position bounds.
- Kinematic Limits: Self-collision avoidance, joint range of motion.
- Dynamic Stability: Keeping the Center of Pressure (CoP) within the support polygon.
- Friction Cone Constraints: Ensuring ground reaction forces remain within limits to prevent slipping.
By optimizing within these boundaries, MPC generates control actions that are feasible and safe for the physical hardware.
Multi-Variable & Coupled System Control
MPC naturally handles Multiple-Input, Multiple-Output (MIMO) systems where control variables are highly coupled. In a legged robot, moving one leg affects the forces on all others and the robot's overall balance. A single MPC formulation can simultaneously optimize:
- Center of Mass (CoM) trajectory.
- Swing foot trajectories.
- Ground reaction forces at each foot.
- Body orientation (pitch, roll).
The optimizer finds the coordinated set of control inputs (e.g., joint torques) that best achieves all these objectives while respecting constraints, avoiding the need for decoupled, single-loop controllers that can conflict.
Model-Based Feedforward & Disturbance Rejection
MPC generates a feedforward control signal based on the predicted future evolution of the system from its internal model. This proactive action is crucial for managing the inherent delays and dynamics of a physical robot. When a disturbance (e.g., a push or uneven terrain) causes the measured state to deviate from the prediction, the receding horizon mechanism automatically corrects for it in the next optimization cycle.
- Feedforward: Anticipates required forces for planned motions.
- Feedback: Corrects for model inaccuracies and external pushes. This combination provides robust performance even with imperfect models.
Cost Function Design for Task Specification
The desired robot behavior is encoded in the MPC's cost function (or objective function). The optimizer minimizes this cost over the prediction horizon. Engineers specify high-level tasks by designing appropriate costs. Examples for locomotion include:
- Tracking Cost: Penalize deviation from a desired CoM or foot trajectory.
- Effort Cost: Minimize joint torques or power consumption to improve efficiency.
- Smoothness Cost: Penalize jerk in motions for stable, fluid movement.
- Terminal Cost: Encourage the robot to reach a specific state (e.g., balanced stance) by the end of the horizon. This flexibility allows a single MPC framework to be re-tasked for walking, running, or manipulation by changing the cost function.
Integration with Hierarchical Planning
In practical robotic systems, MPC often operates as a mid-level controller within a hierarchy. A higher-level motion planner or gait generator (e.g., using Linear Inverted Pendulum Model (LIPM)) might provide reference footstep locations and CoM trajectories over a longer time span. The MPC layer then translates these higher-level plans into dynamically feasible, constraint-satisfying whole-body motions and torques over its shorter horizon. This decoupling allows for complex long-horizon task planning while MPC handles the intricate, short-timescale dynamics and stabilization.
MPC vs. Other Control Strategies
A technical comparison of Model Predictive Control (MPC) against other foundational control strategies used in legged and mobile robot locomotion, highlighting key operational and design differences.
| Feature / Metric | Model Predictive Control (MPC) | Proportional-Integral-Derivative (PID) Control | Linear-Quadratic Regulator (LQR) |
|---|---|---|---|
Core Control Philosophy | Finite-horizon, constrained optimization solved online | Error-based feedback with fixed gains | Infinite-horizon, unconstrained optimization solved offline |
Explicit Constraint Handling | |||
Explicit Future Prediction | |||
Optimality Criterion | Optimizes a custom cost over a finite horizon (N steps) | Minimizes instantaneous error (no explicit cost function) | Minimizes an infinite-horizon quadratic cost |
Feedforward Capability | Inherent via model-based prediction | Typically none (purely reactive) | Inherent via optimal state feedback gain |
Computational Demand | High (solves QP at each time step) | Very Low (simple arithmetic) | Low (applies pre-computed gain matrix) |
Typical Update Rate | 10-100 Hz (varies with problem complexity) | 1-10 kHz | 1-10 kHz |
Handling of Nonlinear Dynamics | Yes (via Nonlinear MPC or linearization) | Poor (designed for linearized ops) | No (strictly linear dynamics) |
Multi-Input, Multi-Output (MIMO) Suitability | Excellent (native formulation) | Poor (requires decoupled loops) | Excellent (native formulation) |
Primary Use Case in Locomotion | Dynamic gait stabilization, push recovery, terrain adaptation | Low-level joint position/velocity tracking | Stabilization of simplified linear models (e.g., LIPM) |
Frequently Asked Questions
Model Predictive Control (MPC) is a cornerstone advanced control method for legged and mobile robots. This FAQ addresses its core principles, implementation, and role in achieving dynamic, stable locomotion.
Model Predictive Control (MPC) is an advanced, optimization-based control strategy where, at each control time step, an internal dynamic model of the system is used to predict its future behavior over a finite time horizon, and an online optimization problem is solved to compute a sequence of optimal control inputs. Only the first control input from this optimized sequence is applied to the robot. At the next time step, the process repeats with updated state measurements, forming a receding horizon control loop. This allows MPC to proactively account for future constraints (like actuator limits or obstacle avoidance) and disturbances, making it exceptionally powerful for managing the complex, underactuated dynamics of legged locomotion.
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
Model Predictive Control (MPC) is a cornerstone of modern robotic locomotion, intersecting with several key concepts in dynamics, optimization, and real-time execution. The following terms are essential for understanding the broader context and technical implementation of MPC.
Whole-Body Control (WBC)
Whole-Body Control (WBC) is a hierarchical control framework that coordinates all of a robot's degrees of freedom to execute multiple tasks simultaneously, such as maintaining balance, tracking foot trajectories, and avoiding joint limits. While MPC often plans the high-level motion of the center of mass or feet, WBC translates these plans into precise joint torque commands for the entire robot in real-time. It typically solves a Quadratic Program (QP) at a high frequency (e.g., 1 kHz) to distribute forces and compute optimal torques that respect physical constraints like friction cones and torque limits.
Quadratic Program (QP) Formulation
A Quadratic Program (QP) is a mathematical optimization problem with a quadratic cost function and linear constraints. It is the computational workhorse for both MPC and Whole-Body Control. In legged robot MPC:
- The cost function typically penalizes deviations from a desired trajectory (e.g., for center of mass) and control effort.
- Linear constraints encode the robot's linearized dynamics (the 'model' in MPC), friction cone conditions for stable foot contact, and actuator limits.
- Solving this QP at each control step (e.g., every 20-50 ms) yields the optimal sequence of control inputs (e.g., ground reaction forces). Efficient, real-time QP solvers are critical for deployment.
Centroidal Dynamics
Centroidal dynamics describes the relationship between the net external wrenches (forces and moments) acting on a robot and the motion of its center of mass (CoM) and its centroidal angular momentum. For legged locomotion MPC, this model is often used because it dramatically simplifies the full floating base dynamics. The planner assumes the robot's total mass is concentrated at its CoM and controls it by optimizing the Ground Reaction Forces (GRFs) at the feet. This abstraction allows for fast, real-time optimization while capturing the essential dynamics for balance and movement.
Reduced-Order Model (ROM)
A Reduced-Order Model (ROM) is a simplified dynamic representation used to make complex planning and control problems tractable. MPC for legged robots almost always relies on a ROM rather than the full nonlinear dynamics. Key examples include:
- Linear Inverted Pendulum Model (LIPM): Assumes constant CoM height, leading to linear dynamics.
- Spring-Loaded Inverted Pendulum (SLIP): Models the leg as a spring, useful for running. These models capture the core locomotion dynamics (CoM motion, balance) while ignoring complex joint-level details, enabling the fast optimization required for real-time MPC. The gap between the ROM and the full robot is then bridged by a whole-body controller.
Contact-Implicit Planning
Contact-implicit planning is an advanced trajectory optimization method that does not pre-specify contact sequences (e.g., which foot touches down and when). Instead, it allows the optimizer to discover the optimal contact modes (stick, slip, break) as part of the solution. This contrasts with many traditional MPC implementations that use a pre-defined gait schedule. Contact-implicit planning uses complementarity constraints or smooth approximations to model the discontinuous nature of contact, making it highly versatile for complex terrains where contact timing is uncertain. It represents the frontier of MPC for highly dynamic and adaptive locomotion.
Linear Inverted Pendulum Model (LIPM)
The Linear Inverted Pendulum Model (LIPM) is the most prevalent Reduced-Order Model for bipedal walking MPC. It makes two key assumptions:
- The robot's total mass is concentrated at a single point (the Center of Mass).
- The CoM height remains constant. These assumptions linearize the dynamics, transforming the nonlinear equations of motion into a simple, linear system. This linearity is what makes real-time MPC feasible, as the optimization problem becomes a Quadratic Program. The LIPM, when combined with the Zero-Moment Point (ZMP) stability criterion, forms the basis for many widely deployed walking controllers in humanoid robotics.

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