State constraints are limits on the internal variables that describe a system's condition, such as maximum position, velocity, or temperature. Input constraints (or control constraints) are limits on the actuator commands, such as torque, voltage, or valve position, often representing physical saturation. These hard constraints are encoded as inequalities within the Optimal Control Problem (OCP) that the MPC solver must respect when computing the optimal control sequence. Their explicit handling is a primary advantage of MPC over traditional control methods.
Glossary
State Constraints and Input Constraints

What are State Constraints and Input Constraints?
In Model Predictive Control (MPC), state constraints and input constraints are mathematical inequalities that define the admissible operating region of a system, explicitly enforced within the online optimization to ensure safety and feasibility.
Enforcing these constraints ensures the controller's commands are physically realizable and keep the system within a safe operating envelope. In practice, soft constraints may be implemented using slack variables to allow minor, penalized violations, preserving optimization feasibility. For systems with uncertainty, Robust MPC techniques like constraint tightening or tube-based approaches are used to guarantee constraint satisfaction despite disturbances. This explicit constraint management is critical for the safe deployment of MPC in robotics, process control, and autonomous systems.
Key Characteristics of Constraints in MPC
Constraints in Model Predictive Control (MPC) are mathematical inequalities that define the admissible operating region of a system. They are explicitly enforced within the online optimization to ensure safety, performance, and physical feasibility.
State Constraints
State constraints are limits imposed directly on the system's internal state variables (e.g., position, velocity, temperature, concentration). They define the safe or permissible region of operation.
- Purpose: Ensure safety and operational limits (e.g., a robot's joint angles, a chemical reactor's temperature, a vehicle's position within a lane).
- Formulation: Typically expressed as $g(x_k) \leq 0$ for predicted states $x_k$ across the horizon.
- Example: A drone's altitude must remain between 5m and 100m: $5 \leq h_k \leq 100$.
Input Constraints
Input constraints (or control constraints) are limits on the manipulated variables or actuator commands (e.g., motor torque, valve position, thrust). They represent physical actuator saturation.
- Purpose: Model the physical limits of actuators to prevent damage and ensure feasibility (e.g., maximum steering angle, pump flow rate limits).
- Formulation: Typically expressed as $h(u_k) \leq 0$ for control inputs $u_k$.
- Example: A motor's torque cannot exceed 10 Nm: $-10 \leq \tau_k \leq 10$.
Hard vs. Soft Constraints
This classification defines how strictly a constraint must be enforced.
- Hard Constraints: Must never be violated. They represent absolute physical or safety limits (e.g., a valve cannot be more than 100% open). Infeasibility of the optimization occurs if no solution satisfies all hard constraints.
- Soft Constraints: Are allowed to be violated at a penalty. They represent desirable operating regions rather than absolute limits (e.g., a preferred temperature range). Implemented using slack variables added to the cost function, which are penalized when the constraint is active.
Constraint Handling & Feasibility
A core challenge in MPC is ensuring the online optimization problem remains feasible—that a control sequence exists which satisfies all constraints.
- Recursive Feasibility: A property guaranteeing that if an optimization problem is feasible at time $t$, it will remain feasible at $t+1$. This is often ensured through careful design of terminal constraints.
- Feasibility Recovery: Strategies like constraint softening or hierarchical constraint relaxation are used when the problem becomes infeasible due to large disturbances, prioritizing critical safety constraints.
Terminal Constraints
A terminal constraint requires the predicted state at the end of the horizon, $x_{N}$, to lie within a terminal set $\mathbb{X}_f$. This is a key theoretical tool for guaranteeing closed-loop stability.
- Purpose: Forces the finite-horizon MPC problem to behave like an infinite-horizon optimal controller, ensuring stability.
- Common Design: The terminal set is often chosen as a control invariant set associated with a local stabilizing controller (e.g., a Linear Quadratic Regulator).
- Practical Note: While critical for stability proofs, strict terminal constraints can be restrictive; they are often combined with a terminal cost.
Constraint Tightening (Robust MPC)
In Robust MPC, constraints are proactively tightened to ensure they will be satisfied for all possible realizations of bounded uncertainty or disturbance.
- Mechanism: The original constraint set $\mathbb{X}$ is shrunk to a smaller, robustly positive invariant tube $\mathbb{X} \ominus \mathbb{E}$, where $\mathbb{E}$ bounds the possible state error due to disturbances.
- Result: The controller plans within this smaller, safer region, guaranteeing that the actual system, subject to disturbances, will never violate the original constraints.
- Trade-off: Increased robustness comes at the cost of reduced nominal performance (a smaller feasible region).
State Constraints vs. Input Constraints
A technical comparison of the two primary constraint types enforced within a Model Predictive Control (MPC) optimization problem, detailing their purpose, mathematical form, and practical implications for system design and safety.
| Feature / Aspect | State Constraints | Input Constraints |
|---|---|---|
Definition | Mathematical inequalities that bound the admissible values of the system's internal state variables (e.g., position, velocity, temperature). | Mathematical inequalities that bound the admissible values of the control inputs or manipulated variables applied to the system (e.g., actuator force, voltage, valve position). |
Primary Purpose | Enforce safety, operational limits, and physical feasibility of the system's trajectory. Ensure the system remains within a permissible region of its state space. | Enforce actuator saturation limits and prevent hardware damage. Represent the physical limitations of the actuation system. |
Typical Mathematical Form | g(x_k) ≤ 0 or x_min ≤ x_k ≤ x_max, where x_k is the state vector at time step k. | h(u_k) ≤ 0 or u_min ≤ u_k ≤ u_max, where u_k is the input vector at time step k. |
Common Examples | Position limits (e.g., robot joint angles, vehicle within lane bounds), speed limits, temperature/pressure limits in a chemical process, obstacle avoidance (as a position constraint). | Maximum torque/force of a motor, maximum voltage/current to an amplifier, maximum flow rate through a valve, steering angle limits. |
Enforcement in MPC | Applied over the prediction horizon (k=1...N). The optimizer must find a control sequence that keeps all predicted future states within bounds. | Applied over the control horizon (k=0...N_c-1). The optimizer's decision variables (control inputs) are directly bounded. |
Impact on Optimization Feasibility | Can make the optimization problem infeasible if the initial state is outside constraints or no admissible control sequence exists to satisfy them within the horizon. Often addressed with soft constraints or constraint tightening. | Directly bound the decision variables, making the feasible set convex and typically easier to handle. Infeasibility is rare unless constraints are contradictory. |
Relation to System Stability | Critical for guaranteeing safe operation. Violation can lead to system damage or unsafe conditions. Terminal state constraints are often used as a stability guarantee. | Primarily ensure control authority is not exceeded. Indirectly affect stability by limiting the controller's ability to correct errors. |
Design Consideration | Must be carefully chosen to reflect true physical/operational limits without being overly conservative, which can degrade performance. Often the focus of robust MPC designs. | Usually derived directly from hardware datasheets (e.g., motor stall torque). Are typically hard, non-negotiable limits. |
How Constraints are Enforced in Model Predictive Control
Constraint enforcement is the defining feature of Model Predictive Control (MPC), transforming an open-loop optimization into a safe, closed-loop policy by explicitly solving a constrained optimization problem at each control step.
State constraints and input constraints are enforced by explicitly including them as inequality conditions within the Optimal Control Problem (OCP) solved at every sampling instant. The MPC algorithm computes a sequence of future control inputs that minimizes a cost function while guaranteeing all predicted states and inputs satisfy these hard limits over the prediction horizon. This direct inclusion ensures the controller proactively avoids constraint violations, differentiating MPC from reactive methods.
Numerically, constraints render the OCP a Quadratic Programming (QP) or Nonlinear Programming (NLP) problem. For hard constraints, the solver finds a solution strictly within the feasible region defined by inequalities like x_min ≤ x(k) ≤ x_max. Soft constraints are implemented using slack variables that allow violations but penalize them heavily in the cost function, ensuring problem feasibility. The receding horizon principle then applies only the first optimal input before re-solving with new feedback, providing continual, forward-looking constraint enforcement.
Frequently Asked Questions
Essential questions on the mathematical constraints that define the safe and feasible operating envelope for systems controlled by Model Predictive Control (MPC).
State constraints are mathematical inequalities that limit the admissible values of the system's internal state variables (e.g., position, velocity, temperature), while input constraints limit the admissible values of the control signals sent to the actuators (e.g., motor torque, valve position, voltage). State constraints define where the system can be; input constraints define what the system can do. Both are explicitly enforced within the MPC's online optimization to ensure safe and feasible operation.
For a robotic arm, a state constraint might be joint_angle < 180 degrees to prevent self-collision. An input constraint for the same system would be motor_current < 10 A to prevent actuator saturation or damage. The MPC solver finds control actions that satisfy both types of constraints over the prediction horizon.
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
These concepts define the mathematical boundaries and safety guarantees within which an MPC controller operates, ensuring physical feasibility and system safety.
Constraint Handling (Hard and Soft Constraints)
Constraint handling is the methodology for enforcing limits within an MPC optimization. Hard constraints are absolute physical limits (e.g., maximum joint angle, actuator saturation) that must never be violated. Soft constraints are desirable limits (e.g., staying near a path) that can be breached at a penalty, often implemented using slack variables to ensure the optimization problem remains feasible even when conflicts arise.
Optimal Control Problem (OCP)
The Optimal Control Problem (OCP) is the core mathematical formulation solved at each MPC step. It is defined by three components:
- A dynamic model predicting state evolution.
- A cost function to minimize (e.g., tracking error, energy).
- A set of constraints on states and inputs. State and input constraints are explicitly encoded as inequality equations within this OCP, making MPC a constrained optimal control strategy.
Control Barrier Function (CBF)
A Control Barrier Function (CBF) is a mathematical tool used to formally guarantee safety by defining a forward-invariant safe set. In relation to MPC constraints:
- CBFs can be used as a safety filter, overriding or modifying MPC inputs to ensure constraint satisfaction.
- They can be integrated directly into the MPC OCP as additional safety constraints, creating a unified CBF-MPC framework that combines optimality with rigorous safety certificates.
Robust MPC
Robust MPC extends standard MPC to handle model uncertainty and disturbances while guaranteeing constraint satisfaction. It treats state and input constraints conservatively:
- Constraint tightening: Feasible regions are shrunk to create a buffer against worst-case disturbances.
- Tube-based MPC: The controller maintains the predicted state within a bounded "tube" around a nominal trajectory, ensuring the real system stays within constraints despite noise. This makes constraints robust to real-world imperfections.
Chance Constraints
Chance constraints are a probabilistic method for handling uncertainty within Stochastic MPC. Instead of enforcing constraints strictly (like hard constraints) or for worst-case scenarios (like robust MPC), they require constraints to be satisfied with a specified probability (e.g., 95%).
- Example: "The robot must stay within its lane with 99% probability."
- This approach is less conservative than robust MPC but requires knowledge of the disturbance distribution, providing a balance between performance and risk.
Feasibility
Feasibility refers to the existence of at least one sequence of future control inputs that satisfies all system dynamics, state constraints, and input constraints over the prediction horizon. It is a fundamental requirement for the MPC optimization problem to have a solution.
- Infeasibility occurs when constraints are too tight or conflicting, causing the solver to fail.
- Recursive feasibility is a key property in MPC design, ensuring that if the problem is feasible at the initial time, it remains feasible at all future times, which is crucial for closed-loop stability.

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