Model Predictive Control

Simulation
Introduced by
Jacques Richalet
Year
1978
Type
algorithm
Family
Optimal Control

What does it do?

Model Predictive Control (MPC) is a control strategy that uses an explicit process model to predict future system behavior over a finite horizon, and it solves an optimization problem at each control step.

Richalet et al. introduced the approach in 1978 under the name model predictive heuristic control, and it has since been applied across process industries, from chemical plants to autonomous vehicles. Because constraints are part of the optimization problem, MPC can handle them directly and can weigh several objectives within one cost function.

The intuition behind the method

MPC uses a mathematical model of the system to evaluate possible future input sequences and selects the one that keeps predicted outputs close to their setpoints while respecting limits on inputs and states. At each sampling instant, the controller predicts the output over the horizon, solves the constrained optimization, and applies only the first input of the resulting sequence. At the next sampling instant, new measurements are taken and the whole calculation is repeated. This receding-horizon feedback is what allows the controller to correct for disturbances and model error, although it does not remove the dependence on model quality.

History

Richalet and co-authors published model predictive heuristic control in 1978. Garcia, Prett and Morari (1989) reviewed the theory and practice of model predictive control. Mayne, Rawlings, Rao and Scokaert (2000) analysed constrained MPC with a focus on stability and optimality. Later work extended the approach to nonlinear MPC and to faster optimization methods suitable for real-time implementation.

When to use it

Choose MPC when the control problem involves explicit input or state constraints, such as valve limits or safety bounds, or when several interacting inputs and outputs must be coordinated. It suits systems whose dynamics are slow to moderate, so that the optimization can be completed within each sampling interval, and it is a reasonable choice when disturbances are significant. Where non-linear behavior is significant, nonlinear MPC is possible, but it requires a non-convex solver and carries local-minimum and real-time computation risk, so a linear MPC based on a linearized model is often the safer first choice. Do not choose MPC when the sampling rate is so fast that the optimization cannot be solved within one control step, or when no model of the process of adequate accuracy is available. For simple single-loop regulation without constraints, a conventional controller is usually simpler to implement and maintain.

Limitations and considerations

  • Each control step requires solving an optimization problem, so computation time may be incompatible with very fast processes. The worst-case solve time should be compared with the sampling interval before MPC is selected.
  • Performance depends directly on model accuracy; a poor model degrades the predicted trajectories on which the optimization is based.
  • For nonlinear MPC the optimization problem is non-convex, so iterative solvers may converge to local minima rather than the global optimum.
  • Closed-loop stability and recursive feasibility are not automatic; they depend on the formulation, including the cost, horizon, and terminal conditions. Standard designs add a terminal cost and a terminal constraint set, as analysed by Mayne et al. (2000), and these should be verified before deployment.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Constraints on inputs and states are part of the optimization and are enforced at each solve, when the problem is feasible, rather than being handled by ad hoc override logic.
  • Multiple inputs and outputs are coordinated within one optimization problem, which a set of independent single-loop controllers does not do.
  • The receding-horizon feedback loop recomputes the plan from new measurements at every step, which counters disturbances and model mismatch to a degree.
  • Future reference trajectories or set-point changes known in advance can be included in the prediction.

Applications

  • Chemical process control: regulating temperature, pressure and flow in reactors and distillation columns while keeping operation within safety constraints.
  • Autonomous vehicles: managing acceleration, steering and braking to follow a trajectory while respecting road and obstacle constraints.
  • Power grid management: scheduling generation and maintaining voltage and supply-demand balance over a rolling forecast horizon.
  • Building HVAC systems: coordinating heating, cooling and ventilation to hold comfort setpoints while limiting energy use.
  • Robotics path planning: computing trajectories that respect actuator limits and collision constraints.

How it works

How it works

1

Using the process model, the current measured state, and a candidate input sequence, compute the predicted outputs over the prediction horizon. The horizon length is a design choice that must be set relative to the system's main response dynamics.

2

Solve a constrained optimization problem for the input sequence over the prediction horizon. A typical formulation minimizes a cost that sums, over the horizon, penalties on the deviation of predicted outputs from their references and on the size of the control inputs (or their changes), with the process model entering as equality constraints on the predicted states and outputs and with bounds on inputs and states.

3

Implement only the first control input from the optimized sequence on the process.

4

Measure the new system state, update the prediction, and repeat the full cycle at the next sampling time.

Common pitfalls

  • A prediction horizon that is too short gives myopic control that ignores slower consequences of current actions; a horizon that is too long increases computation and can make the constrained problem harder to solve.
  • Cost-function weights that balance tracking error against control effort must be chosen with care: poor weighting can produce sluggish responses or aggressive input movements.
  • An oversimplified model that omits important dynamics leads to predictions that diverge from the real process, and the closed loop then performs poorly despite correct optimization.
  • If the constraints cannot be satisfied from the current state, the optimization may become infeasible, so the implementation needs a defined response to infeasibility. Common responses include softening the constraints with slack variables that are penalized in the cost, or switching to a fallback control law.

Frequently asked questions

What is the receding horizon principle and why is it important?

The receding horizon principle means solving an optimization problem over a finite future window, applying only the first control action, and then shifting the window forward. This creates a feedback loop that corrects for errors and disturbances at each step, which is why MPC can tolerate imperfect models better than an open-loop plan would.

How do I choose the prediction horizon length?

The horizon should be long enough to capture the main effects of current control actions on the outputs, which depends on the system's dominant dynamics. A horizon that is too short leads to myopic behavior, while one that is too long increases computation and can make the constrained problem harder to solve. In practice the horizon is usually chosen by simulation and by checking closed-loop behavior with the actual model.

Can MPC handle nonlinear systems?

Yes, nonlinear MPC (NMPC) uses a nonlinear model. The resulting optimization is non-convex and requires iterative solvers that are slower and may converge to local minima. Linearization around a nominal trajectory or approximation methods are often used to reduce computation time.

What software is available for implementing MPC?

Both commercial toolboxes and open-source optimization libraries are available. The choice should depend on the class of the optimization problem (linear, quadratic or nonlinear), on whether the solution must run on embedded hardware, and on the solver's ability to meet the required sampling interval.

Related methods

Sources

  1. Richalet, J., Rault, A., Testud, J., & Papon, J. (1978). Model predictive heuristic control. Automatica, 14(5), 413-428.

    Open DOI reference
  2. Garcia, C. E., Prett, D. M., & Morari, M. (1989). Model predictive control: Theory and practice. Automatica, 25(3), 335-348.

    Open DOI reference
  3. Mayne, D. Q., Rawlings, J. B., Rao, C. V., & Scokaert, P. O. (2000). Constrained model predictive control: Stability and optimality. Automatica, 36(6), 789-814.

    Open DOI reference