The prediction horizon (Np) is the future time window over which the MPC's internal dynamic model forecasts the system's states and outputs. The control horizon (Nc), often shorter, is the window over which future control moves (inputs) are optimized as decision variables; beyond this horizon, inputs are typically held constant at their last computed value. These horizons define the size and computational complexity of the Optimal Control Problem (OCP) solved at each time step.
Glossary
Prediction Horizon and Control Horizon

What is Prediction Horizon and Control Horizon?
In Model Predictive Control (MPC), the prediction horizon and control horizon are the two fundamental time windows that define the scope of the controller's forward-looking optimization.
A longer prediction horizon generally improves stability and performance by considering more distant future consequences, but increases computational cost. A shorter control horizon reduces the number of optimization variables, simplifying the problem, but can limit performance. The receding horizon principle means only the first control input from the optimized sequence is applied before both horizons shift forward in time, and the optimization repeats with new feedback.
Core Concepts of MPC Horizons
The prediction and control horizons are the fundamental time windows that define the scope of optimization in Model Predictive Control (MPC), balancing performance, computational load, and stability.
Prediction Horizon (Np)
The prediction horizon is the future time window over which the MPC controller predicts the system's behavior using its internal dynamic model. It defines how far into the future the controller 'looks ahead' to anticipate the consequences of its actions.
- Purpose: Enables proactive, anticipatory control by accounting for future reference trajectories, disturbances, and constraints.
- Trade-off: A longer horizon generally improves stability and performance but increases computational complexity. A horizon that is too short can lead to myopic, unstable control.
- Typical Values: Ranges from tens of time steps for fast mechanical systems (e.g., drone attitude control) to hundreds for slow chemical processes.
Control Horizon (Nc)
The control horizon is the (typically shorter) time window over which the MPC optimizer computes a sequence of optimal control moves. Beyond this horizon, control inputs are usually assumed constant or zero.
- Purpose: Reduces the dimensionality of the optimization problem. The optimizer solves for
Nccontrol moves instead ofNp, drastically cutting computation. - Effect: After the control horizon, the system evolves in open-loop based on the last computed input. This is a key simplification.
- Rule of Thumb:
Ncis often chosen as 10-20% ofNp, or long enough to capture the system's dominant dynamics.
The Receding Horizon Principle
This is the core MPC execution loop. At each sampling instant:
- Measure/estimate the current system state.
- Solve an Optimal Control Problem (OCP) over the prediction horizon, optimizing control inputs over the control horizon.
- Apply only the first control input from the optimized sequence to the actual system.
- Shift the horizons forward by one time step and repeat with new measurements.
This feedback mechanism provides robustness to model inaccuracies and disturbances.
Tuning the Horizon Lengths
Selecting Np and Nc is a critical design choice:
- Prediction Horizon (
Np): Must be long enough to capture the settling time of the system. A good starting point isNp * Ts(sample time) ≈ 5-10 times the open-loop settling time. - Control Horizon (
Nc): Must be long enough to give the optimizer sufficient 'authority' to steer the predicted trajectory. IfNcis too short, performance degrades. - Computational Cost: The online optimization problem size scales with
Nc. For Nonlinear MPC (NMPC), even a small increase inNccan make real-time execution infeasible.
Impact on Stability & Performance
Horizon lengths directly affect closed-loop guarantees:
- Stability: For Linear MPC, a sufficiently long prediction horizon with a terminal cost (often from LQR) and/or a terminal constraint can guarantee nominal stability.
- Performance: A longer
Npallows better tracking of future reference changes and rejection of slow disturbances. A well-chosenNcensures the optimizer can achieve this performance. - Constraint Handling: The prediction horizon
Npmust be long enough to 'see' future constraint violations (e.g., an approaching obstacle or tank limit) to avoid them proactively.
Example: Autonomous Vehicle Path Tracking
Consider an MPC controller for lane-keeping:
- Sample Time (Ts): 0.1 seconds.
- Prediction Horizon (Np): 30 steps → Looks ahead 3 seconds. This is enough to see the road curvature.
- Control Horizon (Nc): 10 steps → Optimizes steering angle for the next 1 second, then assumes it holds steady.
- Process: Every 0.1s, the MPC solves for the best steering over the next 1s to stay centered over the next 3s, applies the first command, and repeats. This balances smooth control with computational limits.
Prediction Horizon vs. Control Horizon
A comparison of the two primary time-horizon parameters that define the scope of prediction and optimization in a Model Predictive Control (MPC) formulation.
| Feature / Role | Prediction Horizon (Np) | Control Horizon (Nc) |
|---|---|---|
Primary Definition | The future time window over which the system's dynamic behavior is simulated and predicted using the internal model. | The (often shorter) future time window over which control moves (Δu) are actively optimized as decision variables. |
Typical Notation | Np or N | Nc or M |
Temporal Relationship | Defines the total length of the look-ahead prediction, e.g., Np = 20 time steps. | A subset of the prediction horizon, where Nc ≤ Np. Control moves are typically held constant for the remainder (Np - Nc). |
Impact on Optimization Problem Size | Determines the number of predicted state/output variables in the cost function and constraints. Larger Np increases problem size. | Determines the number of optimized control input variables. Larger Nc increases degrees of freedom and computational cost. |
Primary Design Trade-off | Longer horizon improves stability and accounts for distant constraints but increases computational burden and prediction error accumulation. | Longer horizon provides more aggressive, optimal control but drastically increases computational complexity. Shorter horizon simplifies the problem but may reduce performance. |
Effect on Closed-Loop Performance | Governs long-term behavior, stability guarantees, and ability to anticipate slow dynamics or distant obstacles. | Governs short-term aggressiveness and responsiveness of the controller. Directly shapes the initial control action. |
Common Tuning Strategy | Set long enough to capture the dominant system dynamics and relevant future constraints. Often a multiple of the system's settling time. | Set based on the expected time to reach a steady-state control input or to balance performance vs. real-time solve time. Often Nc << Np. |
Connection to Stability | Critical for stability proofs. Often paired with a terminal cost or terminal constraint applied at the end of the prediction horizon. | Less directly tied to stability proofs. The control horizon primarily affects the feasible region of the optimization problem. |
How to Tune Horizon Lengths
The prediction and control horizons are critical, tunable parameters that directly determine the performance, stability, and computational burden of a Model Predictive Controller.
Tuning the prediction horizon involves balancing foresight against uncertainty. A longer horizon improves stability and anticipates distant events but increases computational cost and amplifies model error. A horizon too short causes myopic, unstable control. For stable systems, a rule of thumb is to set it to capture the dominant settling time of the open-loop response. For tracking, it must be long enough to 'see' future reference changes.
The control horizon is typically shorter to reduce decision variables. After this horizon, inputs are often held constant. A shorter control horizon increases robustness but reduces degrees of freedom, potentially degrading performance. A longer control horizon improves optimality at the cost of computation. It is common to set the control horizon to 10-20% of the prediction horizon, then adjust based on actuator bandwidth and the need for aggressive maneuvering versus smooth, conservative action.
Frequently Asked Questions
In Model Predictive Control (MPC), the prediction horizon and control horizon are fundamental design parameters that determine the controller's look-ahead capability and optimization flexibility. These settings directly impact stability, performance, and computational load.
The prediction horizon (N_p) is the finite future time window, measured in discrete time steps, over which the MPC controller uses its internal dynamic model to forecast the system's future states and outputs. It defines how far ahead the controller "looks" to anticipate the consequences of its control actions. A longer prediction horizon allows the controller to better account for future disturbances and setpoint changes, improving performance but increasing computational cost. The choice of N_p is critical; it must be long enough to capture the dominant dynamics of the system (e.g., the settling time) to ensure stability and good performance.
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
The prediction and control horizons are core design parameters in MPC. These related terms define the mathematical problems, stability tools, and computational methods that interact with these horizons to create an effective controller.
Receding Horizon Control
This is the fundamental operating principle of MPC. At each control step, the controller:
- Solves an Optimal Control Problem (OCP) over the prediction horizon.
- Applies only the first control input from the optimized sequence to the physical system.
- Shifts the horizon forward by one time step, incorporates new sensor feedback, and repeats the optimization. This rolling implementation makes MPC a feedback control law, allowing it to correct for model inaccuracies and disturbances.
Optimal Control Problem (OCP)
The OCP is the mathematical core solved at each MPC step. Its formulation is directly defined by the horizons:
- Prediction Horizon (Np): Sets the time window
[t, t+Np]for the problem's dynamics and constraints. - Control Horizon (Nc): Defines the window
[t, t+Nc]over which control variables are decision variables. The OCP is defined by a dynamic model (for prediction), a cost function (to minimize), and state/input constraints, all evaluated over these horizons.
Terminal Cost & Terminal Constraint
These are advanced design tools used to ensure closed-loop stability, especially with a finite prediction horizon.
- Terminal Cost: An additional term
V(x(t+Np))added to the cost function, penalizing the state at the end of the prediction horizon. It often approximates the cost-to-go from that point onward. - Terminal Constraint: A requirement that the predicted state at
t+Npmust lie within a terminal setX_f. This set is designed to be positively invariant. Together, they act as a surrogate for an infinite horizon, guaranteeing stability without needing to predict infinitely far into the future.
Real-Time Optimization (RTO)
This is the critical runtime requirement for MPC. The OCP defined by the horizons must be solved within the controller's sampling period (e.g., milliseconds).
- The length of the horizons (
Np,Nc) directly impacts problem size and solver time. - Linear MPC with a Quadratic Program (QP) can use fast, dedicated QP solvers.
- Nonlinear MPC (NMPC) requires more complex Nonlinear Programming (NLP) solvers, like Sequential Quadratic Programming (SQP), making horizon selection a key trade-off between performance and computational feasibility.
Moving Horizon Estimation (MHE)
MHE is the dual problem to MPC, used for state estimation. It also employs a horizon-based optimization.
- Estimation Horizon: A window of past measurements and inputs used to solve for the most likely current state.
- Like MPC, it uses a system model and can explicitly handle constraints and nonlinearities.
- The estimation horizon length is a tuning parameter balancing noise filtering, computational load, and memory of past data. MHE provides the initial state
x(t)for the MPC's prediction horizon.
Warm Start
A critical technique for meeting RTO demands, especially in Nonlinear MPC. It leverages the temporal structure imposed by the receding horizon.
- The solution from the previous time step (over horizon
[t-1, t-1+Np]) is shifted and used as the initial guess for the optimizer at the current step (horizon[t, t+Np]). - Since the predicted trajectories between consecutive steps are often similar, this provides a high-quality initial guess.
- This dramatically reduces the number of solver iterations needed, enabling the use of longer prediction and control horizons.

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