Robots AtlasRobots Atlas

Model Predictive Control

Optimizes a control sequence over a prediction horizon with explicit state and input constraints, applying only the first step at each iteration (receding horizon).

Category
Abstraction level
Manipulator control with joint constraintsBiped locomotion planningDrones — trajectory tracking with constraintsAutonomous vehicles (predictive path planning)Chemical and refinery processes (classical MPC domain)Reconfiguration after failure in FTCModel-based reinforcement learning (MPC as policy)

At each time step T: (1) estimate the current state x(t) (e.g., via KF); (2) solve a QP/NLP: min Σ||x-ref||²_Q + ||u||²_R s.t. x_{t+1}=f(x_t,u_t), u_min≤u≤u_max, x_min≤x≤x_max, over horizon N; (3) apply u*(0) to the plant; (4) shift the horizon by 1 step.

How to explicitly incorporate physical constraints (actuator saturation, safe operating ranges) into the control loop while optimizing a multi-step trajectory.

01

Internal Model

Predicts object behavior in response to a sequence of control inputs.

Plant dynamics model (linear or nonlinear) used to predict the state trajectory over the horizon.

02

Cost Function

Cel optymalizacji.

Cost function penalising reference deviations and input cost: J = Σ(||x-xref||²_Q + ||u||²_R) + ||x_N-xref||²_P.

03

Constraint Set

Safety and physical constraint enforcement for the controlled plant.

Explicit constraints on states and inputs: u_min ≤ u ≤ u_max, x_min ≤ x ≤ x_max.

04

QP/NLP Solver

Computes the optimal control sequence.

Optimization solver (OSQP, HPIPM, IPOPT, ACADOS) solving the problem in real time.

Common pitfalls

Computation time exceeds sampling period
CRITICAL

NMPC may exceed the sampling period on embedded CPUs, causing instability.

Use solver warm-starting, real-time iteration (RTI), a shorter horizon, or a faster solver (HPIPM, ACADOS).

Internal Model Error
HIGH

Mismatch between internal model and plant (especially after a fault in FTC) degrades control quality.

Adaptive model updates, robust MPC, integration with FDI.

Optimization task feasibility
HIGH

Infeasible QP/NLP under tight constraints or disturbances may block control computation.

Slack variables, softened constraints, feasibility recovery procedure.

1978

IDCOM — first industrial MPC

breakthrough

Richalet et al. propose IDCOM — the first industrial MPC implementation in a refinery.

1980

DMC — Dynamic Matrix Control

Cutler & Ramaker present DMC — MPC with step-response model.

1999

Mayne et al. — theoretical foundations

breakthrough

Mayne, Rawlings, Rao, Scokaert publish foundational theory with stability guarantees.

2012

Real-time NMPC for robotics

ACADO and CasADi enable NMPC on embedded hardware for drones and manipulators.

2020

Learning-based MPC

Integration of learned models (GP, NN) into the MPC framework — better prediction accuracy while retaining safety guarantees.

CPU AVXPRIMARY

QP solvers (OSQP, HPIPM) heavily optimised for SIMD/AVX on CPU.

GPU Tensor CoresPOSSIBLE

GPUs used for batched MPC or learning-based MPC with neural networks.

FPGAPOSSIBLE

FPGA MPC solutions for ultra-short horizons (explicit MPC / pre-computed LUT).

Commonly used with

KF

The Kalman Filter (KF) is a recursive state estimator proposed by Rudolf E. Kálmán in 1960. It operates in two steps: prediction (propagating state and covariance through the dynamics model) and correction (updating with a new measurement, weighted by the Kalman gain matrix). It is optimal in the MMSE sense for linear systems with Gaussian noise. In robotics and control, the KF is the foundation of localization, object tracking, sensor fusion (IMU + GPS + LiDAR), fault detection, and state prediction for MPC. The Extended Kalman Filter (EKF) linearises the nonlinear model at the operating point; the Unscented Kalman Filter (UKF) propagates deterministic sigma points instead; the Particle Filter uses Monte Carlo approximation for arbitrary distributions. The Kalman Filter is a building block of virtually every modern FDI and FTC system — the residuals it generates (differences between predicted and observed output) are the primary signal for fault detection.

GO TO CONCEPT
FDI

Fault Detection and Isolation (FDI), also called Fault Detection and Diagnosis (FDD), is a discipline of control engineering concerned with automatic detection, isolation, and characterisation of faults in dynamic systems. FDI comprises three phases: (1) detection — determining that a fault has occurred (by residual threshold crossing); (2) isolation — identifying the fault location (which sensor/actuator/component); (3) identification — characterising the fault (type, magnitude, time profile). Model-based methods include state observers (Luenberger, KF), parity equations, observer banks, Dedicated Observer Scheme (DOS), and Generalised Observer Scheme (GOS). Data-driven methods use ML classifiers (SVM, neural networks, autoencoders) trained on fault data. FDI is a prerequisite for Active FTC — without reliable diagnosis, controller reconfiguration cannot happen in time. Key FDI metrics: False Alarm Rate (FAR), Missed Detection Rate (MDR), detection time T_d, and isolation time T_i. Standards: IEC 61511 (SIS), ISO 13849 (machinery), DO-178C (aviation).

GO TO CONCEPT
FTC

Fault-Tolerant Control (FTC) is a branch of control theory concerned with systems capable of preserving stability and acceptable control performance in the presence of faults. It is divided into two main classes: Passive FTC (PFTC), where the controller is designed to be robust against a predefined fault set without explicitly detecting it, and Active FTC (AFTC), where a Fault Detection and Diagnosis (FDD) module detects and isolates the fault and a reconfiguration mechanism then alters the controller structure or parameters. In robotics, FTC is applied to redundant manipulators, multirotor drones, humanoid robots, and autonomous vehicles — anywhere a single actuator or sensor failure must not result in loss of control. Typical methods include Control Allocation with redistribution onto healthy actuators, Multiple Model Adaptive Control, Sliding Mode Control, and Model Predictive Control with an updated faulty-plant model. FTC is tightly coupled with FDI (Fault Detection and Isolation) — without reliable diagnosis, the controller cannot be reconfigured in time. Key performance metrics include detection time, reconfiguration time, the bound on performance degradation, and the share of faults the system can handle. Standards such as ISO 26262 (automotive), DO-178C/DO-254 (aviation), and IEC 61508 (industry) mandate the use of FTC techniques in safety-critical applications.

GO TO CONCEPT
Constrained model predictive control: Stability and optimality

Mayne, Rawlings, Rao, Scokaert, 2000. Canonical paper establishing stability guarantees.

scientific articleAutomatica (Elsevier)
Model Predictive Control: Theory, Computation, and Design (Rawlings, Mayne, Diehl)

Standard MPC textbook (2nd ed. 2019), PDF available.

documentationNob Hill Publishing
ACADO Toolkit

Open-source toolkit for NMPC and real-time optimization.

codeKU Leuven / Uni Freiburg