Ai-OPs
Ai-OPsKOIOS PLATFORM
Technical White PaperRefining & Petrochemicals
Hydrotreater · Separator Inventory Control

Machine‑learning control for hydrotreater stability and reactor margin.

A single‑loop reinforcement‑learning (DQN) controller that holds the hot‑separator inventory steady, stabilizing feed/effluent heat exchange and the reactor's temperature and pressure profile, so this liquid‑phase unit can trim chronic hydrogen overuse without giving up margin. Deployed closed‑loop on the plant's existing Allen‑Bradley PLC over native EtherNet/IP, running since late 2020.

15%
less hydrogen used
makeup H₂ per barrel treated
<6 mo
payback period
against a 2‑year target
346 t
CO₂ avoided / yr
from reduced H₂ production
~5 yr
maintenance‑free
ongoing ROI, no retraining
Executive summary

At a North American fuels refinery, a hydrotreater was burning more hydrogen than the chemistry required. The root cause was upstream of the reactor: the hot‑separator level swung enough to disturb liquid flow and the feed/effluent heat exchange feeding the reactor, so operators ran with excess hydrogen as a safety buffer, paying for it in H₂ cost and carbon.

Ai‑OPs deployed a pre‑trained Koios control model in direct control of the separator outlet valve, managing vessel inventory for steady flow and stable heat exchange to the reactor. Holding the separator steady cut level variance by 60% and, in turn, calmed the reactor's temperature (−48%) and pressure (−64%) profiles, recovering the reactor margin that conservative control had consumed. With the unit stable, the refiner trimmed hydrogen use by 15%. The model writes back in closed loop to the plant's Allen‑Bradley PLC over EtherNet/IP, with a supervised, bumpless transfer back to the native PID loop on any fault.

Phillip Hansel, Chief Executive Officer
Ai‑OPs · Industrial Intelligence, Reimagined
ai-ops.com
61 St. Joseph Street, Suite 300
Mobile, Alabama 36602
Ai-OPs ·Hydrotreater ML Control
Refining & Petrochemicals

01

Background & objective

The objective was direct: cut the hydrotreater's operating cost, chiefly hydrogen consumption, without eroding reactor margin or product quality. The lever was stability, not severity.

This is a liquid‑phase hydrotreater: feed and dissolved hydrogen react over a catalyst at high temperature and pressure to remove sulfur and nitrogen, with a liquid recycle around the reactor in place of a recycle‑gas loop. Reactor effluent gives up its heat through the feed/effluent exchangers and drops into a hot separator that sends liquid product on to the stripper. The separator's level controller meters liquid out through the separator outlet valve, and that single loop sets how steady the whole front end runs.

The control problem

  • Separator level wandered under PID control, cycling the outlet valve and disturbing liquid flow back through the feed/effluent exchangers.
  • Heat exchange to the reactor moved with it, pushing the reactor's temperature and pressure profiles around and shrinking usable margin to constraints.
  • Hydrogen overuse: to stay safely clear of those swings, operators held excess H₂, a chronic cost the unit paid every hour it ran.
  • Deployment constraint: any solution had to ride on the existing Allen‑Bradley PLC and hand control back to the native PID loop cleanly, on demand or on fault.
Why stability is the lever

Hydrogen buffer is the price of variance. Every bit of separator‑level swing that reaches the reactor has to be covered by running richer than the chemistry needs. Take the swing out and the buffer is no longer required.

Hydrotreater front end
FEED + MAKEUP H₂
Charge
↓
FEED / EFFLUENT
Heat exchangers
↓
FIRED HEATER
Reactor inlet
↓
CATALYST BEDS · LIQUID‑PHASE
Reactor
↓
HOT SEPARATOR · LEVEL LIC / OUTLET VALVE LV
Separator — controlled point
LIQUID RECYCLE
→ reactor
LIQUID PRODUCT
→ stripper

FIG. 1: PROCESS LOOP. The separator level LIC meters liquid out via the outlet valve LV. Because the hot separator sits between the feed/effluent exchangers and the stripper, and the unit recycles liquid rather than gas, its inventory governs both flow stability and the heat returned to the reactor. Reactor vent gas is taken off separately to treating.

Ai-OPs · Koios Platformai-ops.comPage 2 / 6
Ai-OPs ·Hydrotreater ML Control
Refining & Petrochemicals

02

Closed-loop control architecture

A single pre‑trained Deep Q‑Network (DQN) takes the live separator and pressure context, anticipates upsets, and drives the separator valve directly, while a PLC‑resident selector keeps the native PID loop tracking, ready to take back control at any instant.

PLANT SIGNALS
Live process data
Separator level LIC PV/SV/CV · downstream level LIC · reactor pressure PIC
KOIOS · DQN AGENT
Separator inventory agent
Inferences once per second on 10 min of runtime history to intercept upsets, and outputs a control value AiCV.
PLC OUTPUT SELECTOR
Separator outlet valve
Drives the valve from AiCV while AiOP is enabled.
NATIVE PID
Separator level loop
Held in tracking, ready for bumpless takeover.
AiCV
SYSTEM CONNECTIVITY · DIRECT ETHERNET/IP
PROCESS
Allen‑Bradley PLC
ControlLogix / CompactLogix · existing separator loop, unchanged.
⇄ ETHERNET/IP
EDGE AI
Koios
On‑prem edge controller · reads & writes the PLC directly, no internet.
Koios connects directly to the PLC over native EtherNet/IP, reading and writing across both controller‑scoped and program‑scoped tags, with no OPC server or gateway in between.

FIG. 2: CONTROL ARCHITECTURE. A PLC output selector arbitrates between the model's AiCV and the native PID output; the PID loop never stops solving, tracking the live command for a bumpless takeover. Koios reaches the loop directly over native EtherNet/IP, across both controller‑scoped and program‑scoped tags.

What the model watches

The model ingests separator level (PV, SV, CV), a downstream level, and reactor pressure — data‑driven, with no thermodynamic model or simulator. The DQN inferences once per second on the prior 10 minutes of runtime to catch upsets early.

What it controls

It outputs one value, the AiCV, that drives the separator outlet valve through the PLC selector, holding inventory tight so feed/effluent heat exchange stays steady and the reactor sees a calm, predictable feed.

Ai-OPs · Koios Platformai-ops.comPage 3 / 6
Ai-OPs ·Hydrotreater ML Control
Refining & Petrochemicals

2.3

Safety & bumpless transfer

Control of a hydrotreater never leaves a supervised state. A heartbeat and a model‑status tag, both resident in the PLC, decide moment‑to‑moment whether AI control is even permitted, and any failure drops the loop back to the native PID without a bump.

AI PERMITTED & ACTIVESUPERVISED →FALLBACK TO PID
STATE 01
AiOP active
Status = 1, heartbeat live. The model's AiCV drives the outlet valve. PID stays in tracking alongside it.
STATE 02
Permitted, idle
Model healthy, not selected. An operator can enable AiOP from the faceplate at any time, full transparency, no black box.
STATE 03
Fallback
Status ≠ 1 or heartbeat stale >5 s. AiOP trips to PID‑driven outlet valve, bumplessly, because PID was tracking.

FIG. 3: SUPERVISED CONTROL STATES. A 1‑second heartbeat (counts 1–1000) and a 3‑state model‑status tag gate AI control inside the PLC. Loss of either reverts to the operator's prior mode automatically.

03

Implementation & integration

PLC integration

Integration added four PLC tags around the existing loop: an output selector for the separator outlet valve, an AiOP enable boolean, a model‑status integer (0 inactive / 1 active / 2 failed), and a heartbeat that counts every second. The native PID code was set to tracking so set‑point and output follow the live command, the mechanism behind bumpless takeover.

Deploy & run

The model was trained and validated offline, then promoted from monitoring to closed‑loop control over the separator valve. It has run since late 2020 on the plant's on‑prem edge controller, roughly five years in direct control with no retraining or maintenance, still delivering ROI.

Operator authority

Operators enable or disable AiOP per loop from the standard faceplate. Disabling simply returns the loop to the selected Auto / Manual / Cascade mode, and an automatic fallback restores whatever mode was active before AI took the loop.

Ai-OPs · Koios Platformai-ops.comPage 4 / 6
Ai-OPs ·Hydrotreater ML Control
Refining & Petrochemicals

04

Results

Stabilizing one loop cascaded through the unit: tighter separator inventory calmed the reactor, recovered margin, and let the refiner pull hydrogen back, paying the project off in under six months against a two‑year target.

60%
separator level variance
reduction vs. PID control
64%
reactor pressure variance
reduction in profile swing
48%
reactor temp variance
steadier heat to the beds
15%
less hydrogen used
346 t CO₂ avoided / yr
Hydrogen makeup flow, before & after Koios
FIC-0503.PV · LIVE TREND
H₂ flow range mean flow Koios engaged

FIG. 4: HYDROGEN REDUCTION. Recreated from the plant HMI trend captured on‑site. Under old control, H₂ flow rode high and ranged widely, the overuse buffer. Once Koios held the separator steady, the flow band collapsed and mean consumption stepped down ~15%, without loss of treating performance.

In the operator's words

"The Ai‑controller helped the hydrotreater process unit operate with more stability, better heat distribution through the exchangers, less flow‑valve cycling, and longer run times. We are already looking at other processes to evaluate the software."

Process Unit Manager, refining operations

Ai-OPs · Koios Platformai-ops.comPage 5 / 6
Ai-OPs ·Hydrotreater ML Control
Refining & Petrochemicals

05

Where this applies

The same pattern, a data‑driven model intercepting upsets and driving one valve in closed loop on the existing PLC, with bumpless fallback, generalizes across refining and petrochemical units. Applications available today on Koios:

01Separator & drum level / inventory control
02Hydrotreater & hydrocracker stability
03Reactor temperature & pressure profile control
04Crude & vacuum distillation column control
05Fired heater & furnace efficiency
06Recycle gas & compressor optimization
07Fractionator product‑quality control
08Predictive maintenance, rotating equipment
09Energy & utilities load management

About Koios

Koios is Ai‑OPs' self‑hosted machine‑learning inferencing platform for deploying scalable AI models on industrial control systems. It is hardware‑agnostic, runs fully on‑premises and air‑gapped, and writes optimized control back to PLCs, SCADA and smart instruments in real time. Your models and data stay inside your plant; you own every model Koios trains.

It installs as a single Docker image from a Docker Verified Publisher, or as an offline ISO / virtual‑appliance image, and is licensed as an annual per‑instance subscription.

ProtocolsEtherNet/IP · OPC‑UA · Modbus TCP · BACnet & more
DeploymentOn‑prem · air‑gapped
InstallSingle Docker image / ISO
Min. hardware4‑core 64‑bit · 8 GB RAM · 128 GB SSD · 1 GbE
Per licenseUnlimited devices, tags & models · historian & diagnostics · support
Stabilize your hydrotreater
We'll scope your separator loop or reactor section, model the hydrogen upside, and show how fast we can deploy closed‑loop.
ai-ops.com
Phillip Hansel, CEO
Mobile, Alabama 36602
Ai-OPs · Koios Platformai-ops.comPage 6 / 6