Part VIII: Industrial, Energy, and Infrastructure Sensor AI
Chapter 35: Industrial Sensing Systems

Machines, processes, and telemetry

"They gave me forty thousand numbered tags and no map. Somewhere in there a pump was dying, and the tag that would tell me was named FIC_2071.PV."

A Freshly Deployed AI Agent

Prerequisites

This section builds on the measurement view of Part I: that every reading is a lossy, biased transducer output rather than ground truth, developed in Chapter 2, and the sampling, timestamp, and synchronization vocabulary built in Chapter 3. No process-engineering background is assumed; the plant vocabulary you need (tags, assets, setpoints) is introduced here. The specific transport layers that move this data, SCADA, PLCs, and historians, arrive in Section 35.2, so treat telemetry here as an abstract stream of timestamped, named channels.

The Big Picture

A factory or power plant is not a single sensor; it is a hierarchy of thousands of them, wired to physical equipment that spans nine orders of magnitude in timescale, from a bearing vibrating at kilohertz to a furnace that drifts over weeks. To build AI on this, you first need a mental model of what is being sensed and how the data is organized. Two ideas do most of the work. First, an industrial site is a nested tree of assets, and every measurement is a named tag hanging off a node in that tree. Second, the equipment splits into machines, discrete pieces of rotating or reciprocating hardware, and processes, the continuous transformations of material flowing between them. Get this framing right and forty thousand anonymous tags become a navigable structure. Get it wrong and you will train a model on the plant equivalent of shuffled, unlabeled pixels.

Machines versus processes: two kinds of thing being sensed

The first distinction to internalize is between a machine and a process, because they generate fundamentally different signals and demand different models. A machine is a bounded piece of equipment that does mechanical work: a pump, a motor, a compressor, a gearbox, a turbine. What you sense on a machine is mostly the physics of moving metal, vibration, shaft speed, bearing temperature, motor current, and its healthy behavior is quasi-periodic and tied to rotation rate. A machine has a small number of well-defined failure modes (imbalance, misalignment, bearing wear, cavitation), and its most informative signals live at high frequency, which is why they get their own treatment in Section 35.3.

A process, by contrast, is the continuous transformation the plant exists to perform: heating a fluid, separating a mixture, reacting chemicals, drying a web of paper. What you sense on a process are the thermodynamic and flow state variables, temperature, pressure, flow rate, level, composition, and these move slowly, coupled to each other through mass and energy balances rather than through a rotating shaft. A process signal is often under active feedback control: a controller compares a measured value to a target and manipulates a valve to close the gap. That control loop is why process data looks so calm, and why the calm is deceptive. The measurement can sit rock-steady on setpoint while the valve behind it swings wildly to compensate for a developing fault. To read a process you must look at the manipulated variable, not just the controlled one.

Key Insight

Feedback control hides faults in the controlled variable and exposes them in the manipulating variable. A flow controller holds flow \(F\) at setpoint by moving valve position \(u\); as a pump degrades, \(F\) stays flat while \(u\) climbs to compensate. A model that watches only \(F\) sees a perfectly healthy plant right up to the moment the valve saturates and control collapses. This is the single most common blind spot in first attempts at industrial AI: choosing the reassuring, on-target signal and ignoring the effort the controller is spending to keep it there.

Telemetry: what actually arrives, and in what shape

Telemetry is the stream of measurements a plant emits, and its defining property is heterogeneity. Unlike a wearable that samples a handful of channels at one clean rate, an industrial site multiplexes thousands of channels acquired at wildly different rates by different subsystems. A single asset might expose a bearing-vibration tag streamed at 20 kHz for a few seconds on demand, a motor-current tag logged at 1 Hz, and a lube-oil temperature reported only when it changes by more than a threshold. The result is a ragged, multi-rate, irregularly sampled collection, not a tidy matrix. Before any model can consume it, you must decide how to place these channels on a common time reference, an alignment problem that leans directly on the sampling and synchronization discipline of Chapter 3.

Each channel is identified by a tag, a stable string name that is the plant's primary key. Tags usually follow an instrumentation convention such as ISA-5.1: the leading letters encode the measured variable and function (F for flow, T for temperature, P for pressure, L for level, followed by I for indicator, C for controller, T for transmitter), and a numeric loop identifier ties instruments on the same control loop together. So FIC_2071 is the flow indicating controller on loop 2071, and its .PV (process value), .SP (setpoint), and .OP (output to the valve) are three tags describing one control loop. Learning to read a tag name is the industrial equivalent of reading a sensor's datasheet: the name alone tells you the physical quantity, the role in the control scheme, and where it sits in the asset tree.

In Practice: the cooling-water pump that never looked sick

An engineering team at a chemical plant is asked to predict failures on a bank of cooling-water pumps. They pull the obvious tag, discharge flow, and find it flat and healthy for months across every pump, including two that seized. Puzzled, they widen the query to the whole control loop and plot the valve output alongside it. The story is immediately legible: on the failing pumps the valve had crept from 40 percent open toward 95 percent over six weeks, the controller quietly compensating for falling pump efficiency to hold flow constant. The predictive signal was never in the flow tag; it was in the manipulated variable the flow tag was designed to keep steady. The team's model, retrained on the valve-position trend and the flow-to-effort ratio, flagged the next degradation twelve days before the operators noticed, feeding directly into the remaining-useful-life methods of Chapter 36.

The asset hierarchy: giving forty thousand tags a shape

The final piece of framing is spatial. Tags do not float freely; they hang off a tree of physical equipment, and that tree is your map. A common structure runs Enterprise \(\rightarrow\) Site \(\rightarrow\) Area \(\rightarrow\) Unit \(\rightarrow\) Equipment \(\rightarrow\) Instrument, a nesting formalized in standards such as ISA-95 and increasingly encoded in modern asset models like the OPC UA information model. This hierarchy matters for AI in two concrete ways. First, it defines the natural scope of a model: you usually train per equipment type or per unit, because a centrifugal pump and a distillation column share nothing physically. Second, it defines relatedness: two tags under the same unit are coupled by real pipes and shared feedstock, which is exactly the structure that graph and multivariate models exploit later in Chapter 37. A flat list of tags throws this information away; the hierarchy is a prior you get for free.

Reconstructing that hierarchy and aligning multi-rate tags onto a shared grid is the unglamorous first task of every industrial project. The listing below takes a small bundle of raw, irregularly timestamped tags and does the two essential operations: it parses each tag name into its loop and role, then resamples every channel onto one regular time index so a model can see them as a coherent matrix.

import pandas as pd

# Three raw tags from one control loop, each with its own irregular timestamps.
raw = {
    "FIC_2071.PV": pd.Series([50.1, 50.0, 49.9],
        index=pd.to_datetime(["2026-05-01 08:00:02", "08:00:07", "08:00:11"])),
    "FIC_2071.OP": pd.Series([41.0, 63.0, 88.0],   # valve output, climbing
        index=pd.to_datetime(["2026-05-01 08:00:00", "08:00:05", "08:00:10"])),
    "TI_2071.PV":  pd.Series([61.2, 61.4],         # bearing temperature, slow
        index=pd.to_datetime(["2026-05-01 08:00:00", "08:00:09"])),
}

def parse_tag(tag):
    name, field = tag.split(".")
    variable = name[0]          # F=flow, T=temperature, P=pressure, L=level
    loop = name.split("_")[-1]  # numeric control-loop id
    return {"variable": variable, "loop": loop, "field": field}

# Align every channel to one regular 2-second grid via forward-fill (hold-last-value).
grid = pd.date_range("2026-05-01 08:00:00", "08:00:12", freq="2s")
aligned = pd.DataFrame(
    {tag: s.reindex(s.index.union(grid)).ffill().reindex(grid)
     for tag, s in raw.items()})

print(parse_tag("FIC_2071.OP"))   # -> {'variable': 'F', 'loop': '2071', 'field': 'OP'}
print(aligned)
Listing 35.1. Parsing ISA-style tag names into structured metadata and resampling three irregularly sampled tags onto a common 2-second grid by forward-fill. The forward-fill (hold-last-value) reconstruction treats each tag as piecewise-constant between reports, the correct assumption for change-logged process tags but not for a genuinely band-limited vibration signal; choosing the interpolation to match how the tag was recorded is a decision covered in Chapter 3.

As Listing 35.1 shows, the aligned frame makes the pump story from the practical example legible at a glance: FIC_2071.PV holds near 50 while FIC_2071.OP marches from 41 to 88, precisely the controlled-flat, manipulated-climbing pattern that hides a fault. The forward-fill choice is load-bearing, though. Holding the last value is right for a tag that is only logged when it changes, and wrong for a signal that was band-limited and regularly sampled, where linear interpolation or proper resampling is called for.

The Right Tool

The hand-rolled alignment in Listing 35.1 works for three tags but scales badly and mishandles the case where two tags share no timestamps at all. For merging irregular streams by nearest-in-time matching, pandas.merge_asof replaces roughly 30 to 40 lines of manual index bookkeeping and tolerance logic with a single call:

import pandas as pd
# Merge a slow temperature tag onto every fast flow sample, nearest earlier match
merged = pd.merge_asof(flow_df.sort_values("t"), temp_df.sort_values("t"),
                       on="t", direction="backward", tolerance=pd.Timedelta("5s"))
Listing 35.2. merge_asof aligns two irregular time series by nearest-earlier timestamp within a tolerance, the standard join for multi-rate telemetry, collapsing about 35 lines of hand-written matching into one. It handles the empty-overlap and out-of-tolerance cases correctly; deciding the tolerance and direction so you never join a future reading onto a past sample (a leakage trap revisited in Chapter 5) remains your judgment.

Exercise

You are given three tags from one loop: LIC_3140.PV (tank level), LIC_3140.SP (level setpoint), and LIC_3140.OP (outlet-valve output). Over a week the PV tracks the SP almost perfectly, yet a downstream engineer complains the tank is behaving strangely. In two or three sentences, explain which tag you would inspect first and why, and describe one degradation the PV-tracks-SP view would completely hide. Then state how you would resample .OP if it is logged only on change of more than 1 percent.

Self-Check

1. Give one signal you would expect from a machine and one you would expect from a process, and explain why their healthy behavior has such different timescales.

2. Decode the tag PIC_4402.OP: what physical variable, what role in the control loop, and what does .OP report as distinct from .PV?

3. Why is forward-fill the right reconstruction for a change-logged process tag but the wrong one for a regularly sampled vibration channel?

What's Next

In Section 35.2, we open the pipes that actually move this telemetry: the PLCs that run control logic on the plant floor, the SCADA layer that supervises them, and the historian databases that compress and store decades of tag data. You will see why the historian's deadband compression, invisible in the tidy frames of this section, silently reshapes every signal before your model ever sees it.