Production optimisation in process plants: from APC to real-time optimisation
Most of the money in a process unit is made at its constraints: the compressor at full power, the column near flood, the product right at specification. Getting closer to those limits safely is what advanced control and real-time optimisation are for. This piece walks through the control layers, where machine learning genuinely helps, and how to estimate and keep the benefit without overclaiming it.

The control hierarchy, layer by layer
Production optimisation in a continuous plant is not one system. It is a stack, and each layer runs on its own timescale and depends on the one below it.
| Layer | What it does | Timescale |
|---|---|---|
| Regulatory control (DCS) | PID loops holding flows, pressures, levels and temperatures at setpoint | Seconds |
| Advanced process control (APC / MPC) | Multivariable control that moves several setpoints together to hold qualities and push against constraints | Seconds to minutes |
| Real-time optimisation (RTO) | Steady-state economic optimisation that decides the targets APC should hold | Typically hourly |
| Planning and scheduling | Feed slate, product demand, maintenance windows | Days to weeks |
The dependency runs upwards. An MPC cannot compensate for a sticking valve, a flow loop that oscillates, or a level controller tuned so tightly that it passes every disturbance downstream. Before any APC project, audit the regulatory layer: valve performance, loop tuning, loops left in manual, and instruments operators no longer trust. That audit is cheap, and it often recovers part of the benefit on its own.
Why the money sits at the constraints
For most units the economic optimum is not in the middle of the operating window. It sits on one or more active constraints: maximum furnace firing, maximum compressor power, column flooding, a product purity limit, a cooling-water temperature limit on a summer afternoon. Operators know this, and they also know the process varies, so they hold a margin. The size of that margin is set by the variability they have seen.
That is the core mechanism of APC benefit: reduce variability, then move the average closer to the limit while keeping the same probability of violating it.
Illustration (made-up numbers): a column's overhead impurity specification is 1.0 mol%. Under regulatory control the impurity averages 0.70 mol% with a standard deviation of 0.10, so operators run about three standard deviations inside the limit. With MPC the standard deviation falls to 0.05. Keeping the same three-sigma margin, the target can move to 0.85 mol%. Every 0.1 mol% of extra impurity allowed is reflux and reboiler steam not spent — and how much steam that is comes from a test on the unit, not from an assumption.
Two cautions. The shift only happens if someone actually moves the target; reduced variability on its own is stability, not money. And the margin must be chosen with operations, because the consequences of a violation — off-spec product in a tank, a trip — differ by constraint.
Model predictive control in practice
Model predictive control uses a dynamic model of the unit to predict its behaviour over a horizon, computes a set of moves that respects every constraint, and repeats the calculation every cycle. The vocabulary is worth having straight:
- Manipulated variables (MVs) — the setpoints MPC writes to the regulatory layer: reflux flow, reboiler duty, feed rate.
- Controlled variables (CVs) — what it must hold within limits or at target: qualities, temperatures, pressures, valve positions, compressor load.
- Disturbance variables (DVs) — measured but not manipulated: feed composition, ambient temperature.
The model comes from plant testing: stepping each MV and recording how every CV responds, supplemented by historian data. Classic step tests are slow and occupy the console; designed test signals and closed-loop identification shorten them, but some testing is unavoidable, and its quality sets the quality of the controller. Constraints are ranked, so that when not all of them can be met the controller gives up the least important first. Move suppression trades speed for smoothness. Operators keep the switch: individual MVs and CVs can be taken out of the controller, and the whole application handed back to the regulatory layer in one action.
Not every problem needs a large multivariable controller. Split-range, override and well-tuned PID schemes solve many of them more simply. The APC module of Plant Autopilot covers that range — PID with anti-windup, split-range, fuzzy, adaptive, neural-network and predictive controllers, with auto-tuning — and can run a conventional loop and a model-based one side by side on the same process, so they are compared before either is trusted.
Real-time optimisation: deciding where steady should be
MPC holds the unit at its targets. Real-time optimisation decides what those targets should be, using a plant-wide steady-state model, current constraints and current prices. A typical RTO cycle confirms the plant is at steady state, reconciles the model to the measurements (estimating parameters such as exchanger fouling or reactor activity), solves the economic optimisation, and passes the resulting targets down to MPC.
RTO earns its cost when real degrees of freedom remain after the constraints are satisfied, and when the economics or the feed change often enough that yesterday's optimum is not today's. If a unit always runs at maximum throughput against a single obvious constraint, MPC alone captures most of the value and RTO adds little. RTO also comes after MPC, not instead of it: without a controller that can hold targets, there is nothing to dispatch them to.
Most RTO problems in practice come from the reconciliation step rather than the optimiser. If a flow meter is biased, the model is fitted to a wrong picture of the plant and its targets are wrong in a consistent, plausible-looking way. Gross-error detection on the measurements, a steady-state check that rejects transient data, and a review of which parameters the reconciliation is allowed to move are what keep the targets credible to the operators who have to accept them.
Where machine learning fits
Soft sensors for inferred qualities
The CVs that matter most are often qualities measured by the lab every few hours, or by an analyser that is slow and frequently out of service. A controller cannot act on a value that arrives four hours late. An inferential, or soft, sensor estimates the quality continuously from temperatures, pressures and flows. To be usable in control it must be trained on historian and lab data, validated against the lab on a holdout period before going live, corrected as new lab results arrive, and published with a confidence band. Our soft sensors are written back to the DCS as a tag, and their band widens when the inputs move outside the training range — the signal that a controller should stop relying on that estimate.
Virtual flow metering in upstream
On a producing field, per-well oil, gas and water rates are needed for allocation and well optimisation, but multiphase meters are expensive and well tests through a test separator are infrequent. Virtual flow metering estimates the rates from choke position, upstream and downstream pressures and temperature. The models need a physical reference — a multiphase meter or well tests — and they drift as water cut and reservoir pressure change, so they must be rechecked against that reference regularly. Autopilot's VFM module trains three candidate models per well and ranks them by their error against the multiphase meter.
Estimating benefits honestly
- Agree the method before the project. Write down the metric (throughput, energy per tonne, yield), the baseline period and how results will be normalised.
- Pick a representative baseline. The same feed type, similar throughput, and the same season where ambient matters — air coolers and cooling-water limits behave differently in a Gulf summer.
- Use the step-test data. Plant testing already yields the sensitivities: steam per unit of purity, throughput per degree of furnace margin. Combine them with the measured reduction in standard deviation.
- Compare on and off. Where operations allow, alternate controller-on and controller-off periods to separate the controller's effect from everything else.
- Exclude what the controller did not do. Price movements, a new catalyst and a mechanical repair are not APC benefits.
Sustaining the benefit
APC benefits decay quietly. Watch three measures every month: the service factor (the fraction of time the controller is on with its key MVs active), the number of MVs and CVs taken out of service, and limit creep — operators narrowing limits until the controller has no room left to optimise. Each is a symptom of lost trust, and usually for a reason: a model that no longer matches after a mechanical change, a soft sensor that drifted, a move the operator did not understand. A named control engineer who owns the application, reviews these numbers with operations, and re-tunes or re-identifies the model when the process changes is the difference between a controller that pays for years and one that is switched off within months.
If you want to know what an APC layer could be worth on one of your units, we can review your historian data and regulatory layer and agree a benefit-estimation method before any controller is built.
