Tech Blog · Algorithms Explained
[Prescription Methods 3] Control that calculates the future with a process model — MPC and APC
Model predictive control (MPC), standard technology in refineries and petrochemical plants, calculates minutes ahead to decide the move it makes now. We explain how it works, how it handles constraints, and why most of the cost of adopting it goes into the process model and step tests.
Jul 2, 2026 · OPTI-X
Series “Prescription Methods” · Part 3
In the control rooms of refineries and petrochemical plants runs a system called advanced process control (APC). Its core algorithm is model predictive control (MPC). If design of experiments in the previous part is a way to set a recipe once, MPC re-decides every move in continuous processes where raw materials and load keep changing.
How it works: look ahead, make only the first move
MPC uses a process model to calculate "if we operate like this from now on, how will the process behave over the next few minutes to hours?" It then finds the operating plan that best meets the target and executes only the first move of that plan. In the next cycle, it takes in new measurements and calculates again from scratch.
The plan has two horizons: a prediction horizon over which outputs are forecast, and a control horizon within which moves can change. The optimization minimizes four things: deviation from the target trajectory, the amount by which constraints are exceeded, deviation of the manipulated variables from their targets, and the size of each move. Setting the weights on these four terms is tuning.
Variables fall into three types: manipulated variables that are moved directly (cooling water flow, feed rate), controlled variables that must meet targets (temperature, concentration), and disturbance variables that cannot be moved but are measured (feed temperature). Qin et al. (2003) frame each cycle's calculation as three questions. Where is the process now, and where is it heading? Where should it be at steady state? What is the best way to get there?
One MPC cycle
This repeats every few seconds to minutes (receding horizon)
- 1Measure the current stateUpdate the process state from sensor values and correct for the gap between prediction and realityNext
- 2Set targets and optimize the futureSet a steady-state target reachable within the constraints, and optimize the operating plan to get there with the process modelPlan satisfying constraints foundNo solution → safe default action
- 3Execute only the first moveSend only the first step of the plan to the equipment, and recalculate in the next cycleSend setpoint
Where MPC sits in the plant
The receding-horizon idea already appeared in the literature of the 1960s. Qin et al. see industry's contribution as running that idea on real equipment. Shell engineers made a first application in 1973 and presented dynamic matrix control (DMC) in 1979, and Richalet et al. presented IDCOM in 1976.
Optimal control theory (LQG), successful in aerospace at the time, did not take hold in the process industries. It struggled with constraints, nonlinearity and model uncertainty, and because each process unit is different, the cost of building models from physics and chemistry was hard to justify.
MPC does not run alone. In the typical structure Qin et al. describe, plant-wide economic optimization sets targets daily and unit-level economic optimization hourly. MPC moves the process toward those targets minute by minute, and the PID controls below it move valves second by second.
The process control hierarchy
MPC links economic targets to basic control
The conventional approach handled this middle layer with a combination of PID, lead-lag blocks and high/low select logic. MPC replaces that combination with a single controller. The authors note that the requirements at this level are often hard to translate into a conventional combination of blocks.
Worked example: operating close to the cooling limit
Consider a reactor where you want to raise throughput, but more throughput means more heat, so the cooling water valve hits its limit first. Qin et al. point out that a process's economic operating point often lies where several constraints meet. A good controller must run as close to the constraints as possible without crossing them.
MPC's steady-state calculation targets the highest throughput the cooling capacity allows. The dynamic optimization plans in what order to raise the feed rate to reach that target, and discards plans predicted to push temperature above its upper limit. If feed temperature rises, it uses the disturbance variable to calculate the effect in advance and adjusts the feed rate.
There is also a set priority for when objectives conflict: first, prevent constraint violations; second, drive controlled variables to their targets; third, use the remaining degrees of freedom to drive manipulated variables to their targets; fourth, prevent excessive movement of manipulated variables. Constraints are split into hard constraints that must never be crossed and soft constraints that may be crossed slightly at a penalty. Moves are penalized too, which keeps them small and also gives some margin against model error.
Adoption: the cost comes from the process model
The design procedure vendors describe runs: define variables, test the plant, build the model, simulate offline, check open-loop on the real equipment, then close the loop. Many vendors consider the plant test the single most important phase.
In the plant test, manipulated variables are stepped while the response is recorded. According to Qin et al., each manipulated variable is stepped 8 to 15 times, engineers monitor around the clock, and the test can take 5–15 days depending on the process. No PID tuning changes are allowed during the test, and if PID tuning changes significantly later, the model may need to be rebuilt.
What it takes to adopt MPC
Most of the cost goes into building the 'process model', not the algorithm
The authors also listed the limits of the technology at the time. With no tool to judge whether the collected data are adequate, plants are often over-tested, and there are few methods to check whether the model has deteriorated after commissioning. Models built from test data also cannot be expected to predict process behavior accurately outside the range of the test. The authors therefore expected identification technology that shortens testing to have a large impact on users' bottom line.
Where it has been used, and where it struggles
In Qin et al.'s survey of vendors in mid-1999, there were 4,542 linear MPC applications and 93 nonlinear MPC applications. That is more than twice the number in the survey five years earlier. Refining accounted for 67% of applications with a known area.
What counts as one application, however, differs by vendor, ranging from a single variable to 603 outputs and 283 inputs. Vendors also differed on whether to solve a large process with a single controller or split it into sub-processes.
Linear MPC applications by area
Vendor survey, mid-1999, excluding 1,601 unclassified applications
Refining is where MPC was first applied and built its track record. The authors expected nonlinear MPC to grow in processes where linear MPC is hard to apply, such as polymerization, but nonlinear MPC applications at the time were much smaller in scale than linear ones. The table below shows the general tendency of processes where MPC fits well and where it struggles.
Processes where MPC fits well and where it struggles
It depends on the characteristics of the process
How it relates to other methods
In this series, MPC is the main example of a method that builds a process model first and calculates on top of it. Bayesian optimization in the next part picks the next conditions from experimental results alone, without a process model. Reinforcement learning in Part 5 and surrogate-based optimization in Part 7 start from operating data already collected rather than from step tests. They carry the same problem as MPC, though: a model is hard to trust outside the range of its data.
Qin et al. note that the questions practitioners ask are about engineering more than algorithms: which variables to control with, when a model is good enough, and how to estimate a controller's benefits. The same questions remain whichever prescription method you use.
MPC is very powerful when the model is accurate, and most of its cost goes into building that accurate model. In the next part, we look at Bayesian optimization, which finds the optimum with few experiments and no process model.
References
Could this work for your process?
Talk to us