Technical note

Calculating unit KPIs with Python in RIMX

10 November 2026 · ~12 min read

Control-room screens showing unit KPI dashboards and a Python notebook
Unit KPIs belong next to the historian, not in a weekly spreadsheet rebuild.

Most process plants already collect the tags a good KPI needs: feed and product flows, steam and fuel, analyzer quality, and a mode or run-status bit. The gap is not instrumentation. It is that those series live in a DCS or historian while the calculation lives in Excel, rebuilt after every outage. RIMX is built so the same Python an engineer already uses for Pandas work can run against trusted history — dashboards, Excel exports and scripts on one data set.

This note is a practical pattern, not a product tour. It follows how ISO 50001 treats energy performance (same boundary, same period, a driver such as production) and how ISO 22400 manufacturing KPIs must be adapted for continuous process units.

Process-unit KPIs are not discrete OEE

ISO 22400 is the usual reference for manufacturing KPIs (throughput rate, quality ratio, utilisation, scrap). A 2018 gap analysis in Procedia Manufacturing (Zhu, Johnsson, Varisco and Schiraldi) showed that process plants still need extra definitions: quality is often a continuous spec band rather than a pass/fail count, several units run at once on shared utilities, and energy intensity matters as much as piece-count OEE.

For a continuous unit, start with four numbers that operations already argue about:

Rule: every KPI must name its boundary (which meters), its period, and its mode filter. Without the filter, a turnaround week looks like a process problem.
From DCS tags to a unit KPI DCS / PLC tags flow, steam, quality, mode RIMX historian time-aligned series Python mask · integrate · ratio KPI dashboard · Excel · alert
Keep the calculation on the historian path so the dashboard and the engineer’s script cannot drift apart.

A calculation you can defend in a morning meeting

Assume tags are already in RIMX (from OPC UA, Modbus, MQTT or REST). The pattern is always: read a regular interval, mask by mode, integrate, then divide. Instantaneous ratios of noisy flows are not KPIs.

# Illustrative pattern. Replace rimx.read with your site’s historian query.
import pandas as pd

tags = {
    "feed": "UNIT.FIC101.PV",      # t/h
    "prod": "UNIT.FIC201.PV",      # t/h on-spec product
    "steam": "UNIT.FI_STEAM.PV",   # t/h
    "qual": "UNIT.AI_RVP.PV",      # quality
    "mode": "UNIT.MODE.PROD",      # 1 = production
}

df = rimx.read(list(tags.values()), start="2026-10-01", end="2026-10-31", interval="1min")
df.columns = tags.keys()

online = df["mode"] == 1
hours = 1 / 60  # 1-minute samples → hours

feed_t = (df.loc[online, "feed"] * hours).sum()
prod_t = (df.loc[online, "prod"] * hours).sum()
steam_t = (df.loc[online, "steam"] * hours).sum()

kpis = {
    "yield": prod_t / feed_t if feed_t else None,
    "specific_steam_t_per_t": steam_t / prod_t if prod_t else None,
    "quality_sigma": df.loc[online, "qual"].std(),
    "utilisation": online.mean(),
}
print(pd.Series(kpis))

Three details that keep the number honest:

  1. Integrate, then ratio. Specific energy is ∑steam / ∑product over the period, not the average of steam/product at each scan.
  2. Treat bad status as missing. OPC UA (and most historians) carry a status with every value. Drop Bad/Uncertain before summing, or you will “save energy” during a dead transmitter.
  3. Normalise when load moves. ISO 50006-style energy performance uses a driver model, for example steam ≈ b0 + b1·production + b2·hours on a baseline year, then reports residual versus expected. A University of Skövde (2025) manufacturing dashboard used the same idea: align energy intervals with operating state before ranking bottlenecks.

What to put on the unit dashboard first

Start with one page operations will actually open on night shift:

Python in RIMX is there so that page is a calculation, not a screenshot. When the DCS tag list changes, you change the mapping once; reports, Excel and the alert that fires when specific steam exceeds the baseline all move together.

Sources

← All insights

Have a process problem worth solving?

Talk to an engineer, not a salesperson. Tell us about your unit and we will suggest where to start.

Request a technical consultation Request a RIMX demo