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.
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.
Ai-OPs
·Hydrotreater ML Control01
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.
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.
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
·Hydrotreater ML Control02
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.
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.
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.
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
·Hydrotreater ML Control2.3
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.
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
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.
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.
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
·Hydrotreater ML Control04
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.
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.
"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
·Hydrotreater ML Control05
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:
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.
| Protocols | EtherNet/IP · OPC‑UA · Modbus TCP · BACnet & more |
| Deployment | On‑prem · air‑gapped |
| Install | Single Docker image / ISO |
| Min. hardware | 4‑core 64‑bit · 8 GB RAM · 128 GB SSD · 1 GbE |
| Per license | Unlimited devices, tags & models · historian & diagnostics · support |