Refinery optimization has always been a margin game. The difference between a profitable quarter and a disappointing one often comes down to how well a site turns its planning model into operating decisions, from crude selection through product blending.
The opportunity sits in the gap between what the LP plans and what refinery operations achieve. Margin lost to an hour of off-target operation cannot be recovered downstream, and the traditional optimization stack was not designed to close that gap in real time.
Why planned and actual refinery margin rarely match
Every refinery relies on a three-layer optimization hierarchy, and it was designed for stability. The linear program (LP) guides crude selection and production targets on near-term economics. Below it, advanced process control (APC) holds individual units at their targets. Below APC, basic regulatory control keeps pressures, temperatures and flows inside safe bounds.
Where the LP and APC fall short
The hierarchy does what it was built to do. LP models, though, assume linear relationships in a world of nonlinear chemistry, update on planning cycles instead of operating cycles, and treat each unit as an independent block. Their unit representations reduce complex behavior to linear yield vectors that do not capture how physical constraints shift between planning runs.
LP accuracy degrades quickly outside the conditions it was built on. By the time the next planning run catches up, the refinery may have been running away from its best point for hours or days. Meanwhile the plan depends on recurring decisions, made every shift by different people with different information.
APC optimizes inside a single unit's boundaries with no connection to plant-wide economics, and basic regulatory control keeps the process safe with no view of margin. Nothing in the traditional stack coordinates across these layers against current market conditions. The result is a persistent gap between what the plan says the refinery should earn and what it captures across the crude oil refining process.
How conservative operation widens the gap
When crude quality shifts between cargoes, column behavior changes in ways the LP did not anticipate. Operators compensate by running conservatively, with temperature cushions, extra reflux and quality buffers that protect against off-spec product at the cost of yield and energy. Each cushion is prudent on its own. Running 2 to 3°F above the best point at every column, on every shift, compounds into measurable yield and energy losses over a quarter.
APC does not solve this, because each controller sees its own unit. A hydrocracker controller does not know that the FCC downstream could absorb a different cut point. A furnace controller does not weigh product pricing in its firing strategy. Local optima rarely add up to a global optimum.
Energy price sensitivity
Energy price volatility compounds the problem. Natural gas prices reach refinery operating cost through thermal duty, electricity and hydrogen production at the same time. Most refineries produce the bulk of their thermal energy from internal fuel gas and buy the rest as natural gas, so the best operating point moves with market prices faster than periodic APC tuning can follow.
As hydrogen demand grows with tighter sulfur specifications, that sensitivity increases. When crack spreads tighten, the margin lost to poor energy allocation across fired heaters and steam systems becomes harder to absorb.
How models learned from plant data recover what the LP misses
Real-time optimization works alongside the LP and APC. It fills the space between them by learning the nonlinear, plant-specific relationships that neither tool captures well. The LP keeps guiding crude selection and production planning, APC keeps the units stable, and the new layer updates setpoints on current process conditions and economics. The existing control infrastructure stays in place.
A model trained on years of a site's operating data and lab results builds a representation of how process variables interact across units. Where LP yield vectors are linear, these models capture the nonlinear effects of crude variability, catalyst aging and equipment condition on product quality and yield.
Rigorous first-principles simulators remain valuable, but keeping one calibrated to a unit as fouling and catalyst activity change takes sustained effort. A model learned from the plant's own data, guided by first principles, reflects how the unit actually runs. It can represent effects that neither physics nor planning models capture well, such as how a specific crude blend behaves in a particular CDU under current fouling, or how FCC conversion responds to feed quality at different catalyst ages.
Energy
The models learn the real heat duty each distillation column and furnace needs under current conditions. Fuel-air ratios, column reflux and heat exchanger performance interact, and adjusting them together in real time, instead of holding fixed targets, reduces specific energy consumption by running existing equipment more precisely, with no new hardware. When margins tighten, those small reductions add up across heaters, reboilers and steam systems, which is the core of energy management in oil and gas.
Yield
Real-time adjustment of cut points and severity captures high-value barrels that daily LP cycles leave behind. When gasoline margins rise, the optimizer can shift FCC severity. When diesel economics favor middle distillate, hydrocracker targets adjust without waiting for the next LP run.
Quality giveaway
Most refineries blend conservatively to avoid off-spec penalties, and that caution has a cost. A model that sees the whole product pool at once can tighten blend targets toward specification limits and recover the margin that cautious blending gives up.
These gains compound when the optimizer sees the whole facility. Running one unit slightly below its local optimum can raise site margin if a downstream unit captures more value from the trade-off. That coordination needs visibility that no single-unit tool provides.
What plant-wide coordination delivers
The bigger margin improvements usually come from coordinating decisions across units that share feed streams, energy systems and product pools. Pushing one unit harder gives diminishing returns when the rest of the plant cannot use the added value.
Coordinating across the value chain
Consider a shift in diesel economics. The crude unit sets initial cut points, the hydrocracker and hydrotreater set severity and conversion, and blending sets final product quality. At each step, operators and engineers decide against their own unit's targets, often set days earlier by the LP.
When diesel pricing moves midweek, those targets no longer reflect the highest-value operating point. An optimizer that evaluates these variables against current economics can coordinate adjustments from the crude unit through blending in the same optimization cycle, capturing margin that sequential, unit-by-unit decisions miss. It can see the link between a crude unit temperature change and its downstream effect on FCC yield, compressor loading and blending economics before the next LP run.
How shared visibility changes teamwork
When operations, planning and engineering share one model of plant behavior, decisions move from competing opinions to trade-offs backed by evidence. Planning can see why operations deviated from the LP target, and operators can see the economic reasoning behind a recommended setpoint change. A missed plan becomes something the teams can diagnose together.
Because the models are trained on years of operating history, they also preserve part of what experienced operators have learned, which supports knowledge transfer as the workforce changes.
How the Imubit Platform applies
In refining, the Imubit Platform applies Map, Model and Control to the gap between the LP plan and the plant. Map traces that gap to the recurring decisions behind it, such as cut points, severity, heater fuel and blend targets. Model uses Deep Learning Process Control® (DLPC®) to learn a nonlinear dynamic model of each unit from the refinery's own history, guided by first principles. Control takes the critical decisions to closed loop, writing setpoints to the existing APC and DCS minute by minute, inside limits set by plant engineers. Plants start in advisory mode and move to closed loop as the model earns trust. In refining, deployments have delivered a $0.25/bbl margin improvement.



