Technical note
Calculating unit KPIs with Python in RIMX
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:
- Specific energy — steam, fuel or electricity per tonne of product (or per tonne of feed), only while the unit is in a defined production mode.
- Yield — on-spec product over feed, same period and same mode mask.
- Quality sigma — standard deviation of a key quality against the spec, not a single daily lab point.
- Time utilisation — hours in production mode over calendar hours (or over scheduled hours if you have a plan tag).
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:
- Integrate, then ratio. Specific energy is ∑steam / ∑product over the period, not the average of steam/product at each scan.
- 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.
- Normalise when load moves. ISO 50006-style energy performance uses a driver model, for example
steam ≈ b0 + b1·production + b2·hourson 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:
- Last 24 h and last 30 d of specific energy and yield, with the production-mode mask shown as a strip.
- Quality as a histogram against spec limits — Bauer and Craig’s control-economics work is built on variance, not on the mean alone.
- A short table of “hours excluded” (shutdown, trip, analyzer out of service) so nobody disputes the denominator.
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
- L. Zhu, M. Johnsson, J. Varisco, M. Schiraldi, “Key performance indicators for manufacturing operations management – gap analysis between process industrial needs and ISO 22400,” Procedia Manufacturing 25 (2018) 374–381. doi:10.1016/j.promfg.2018.06.060
- ISO 22400 (KPIs for manufacturing operations management); ISO 50001 / ISO 50006 (energy performance and baselines).
- University of Skövde, “Identifying Energy Bottlenecks in Manufacturing,” 2025. PDF