Beyond Purdue No. 072 / Historians, Data interpretation, DCS, Data nodes
Same data, different results
Two engineers open the same archive, ask for the same signal and the same day, and come back with two different numbers. Both are right. The difference is in how the data was stored and how it was aggregated, and that has to be written down.

A few days ago I wrote about a gas-fired power station where we recalculated 66 gas days from the DCS archive and compared every day with the operator's meter reading. After one calibration parameter, 62 of the 66 days agreed within ±0.1 %.
One reader asked the question every good engineer should ask. Four days were outside ±0.1 %. The historian has the numbers, but the month-end report is still built from the manual reading. So which one did the plant trust, and what was behind the outliers?
My honest answer is that we did not choose. We went back to the raw data and let it explain the difference. But that only works if the raw data is still there, and if everyone knows exactly what was done to it on the way to the result. That is what this article is about.
The same number is not always the same number
Ask an engineer for "the flow on 2 October" and you will get a number. Ask a second engineer and you may get another one. Neither is lying. One took the average of all samples in the day. The other took a time-weighted average. A third read the last value before midnight. A fourth summed the counter.
The data is the same. The interpretation is not.
In the control room this rarely matters. In a billing dispute, a root-cause analysis or an AI model trained on plant history, it decides the outcome.
It starts with how the historian stores data
There are many historians and they are not equal.
The DCS archives we work with keep time-tagged data. A value is written only when it changes by a configured amount, and it carries its own timestamp and quality code. While a signal is stable nothing is written. Storage grows slowly, so years of history stay complete and every real change is still there.

Many other systems sample at a fixed rate, for example once per second. That fills disks quickly and limits how far back you can go. To keep the database alive, older data is compressed or averaged. The detail you would need for a dispute two years later is gone, and nobody remembers that it was ever removed.
So the first question about any result is not "what is the number" but "what was stored".

The aggregations
Because we kept having the same discussion with customers, we wrote a one-page description of what every aggregation does to the result. The message on that page is simple: same data, different results.

Raw data is kept as it was recorded, on change. Aggregated data is calculated for an interval of a second, minute, hour or day, using one of these methods:
- Hold last value: The last value before the end of the interval, as the DCS would show it
- Time-weighted average: Each value weighted by how long it was valid
- Average: The plain mean of the samples that happened to arrive
- Interpolative: A value drawn on a straight line between two samples
- Total: The integral over time, for example flow into volume
- Minimum, Maximum: The extreme values, with the time they occurred
- Delta, Range, End: Change, spread and closing value
- Standard deviation, Variance, Count: Scatter and the number of samples
Two details on that page matter more than they look. An interval that contains only one value is marked invalid for some methods. And quality codes travel with the value. A number without its quality code is half a measurement.



A simple example
Take a flow signal stored on change. For 4 minutes 50 seconds it sits at 100. Then, in the last 10 seconds of a five-minute interval, it rises to 140 and the historian records ten changes, each at 140.
- Average of samples: (100 + 10 × 140) / 11 = 136.4
- Time-weighted average: (100 × 290 s + 140 × 10 s) / 300 s = 101.3
- Hold last value: 140
- Maximum: 140
Four honest answers from the same eleven samples. The plain average is wrong for this kind of data because it counts samples, not time. When a value is written only on change, the busy moments produce many samples and the quiet hours produce almost none. That is why, for most DCS and PLC analogue signals, the time-weighted average is the right choice for a trend or a total.

But look again at the example. The time-weighted average hides the event. A rise of 40 % in the last ten seconds becomes 1.3 % in the five-minute value.
Averages keep the trend and lose the event
When we presented this to a utility's engineering team, and later at a performance network meeting, one slide showed the original signal next to its five-minute mean and its five-minute time-weighted average. The trends looked the same. The short transient was flattened or distorted in both.

Nassim Taleb makes the same point in The Black Swan. A trip, an excursion or a sudden efficiency loss is a rare event. In a model built on averages and normal distributions it looks like an outlier, and it is the first thing removed. Once it is averaged away, no statistical method can bring it back. You cannot create information where there is none.
So our rule is strict. Every event detection starts from the raw time-stamped data. Averages are for display, never for detection.
When every change is kept, you see things
Two examples from real plants show what the raw data makes possible.
On a cooling water pump, the long-term trend showed that the behaviour changed in week 26. After that, the bearing trend kept climbing week after week. In a daily-average report the change looked like noise. In the raw data it had a start date.
On a gas turbine we plotted vibration against power over two months, with each point coloured by time. The video at the top of this article shows that plot moving through the weeks. The same load point sat at clearly different vibration levels in September and in October. Averaged by load class, those two clouds would have become one number.
Back to the four outlier days
So what was behind the four days? Wrong operator record? Yep - its done manually ...
We read 1,983,627 raw values for the gas flow over 66 gas days. Each value was held until the next change, values with a bad quality code were not used, the low-flow cut-off was applied, and every gas day was calculated exactly as the operator reads it, from 07:00 to 07:00. One calibration parameter was fitted on the same 66 days, so the totals agree by construction. The test is the daily spread around them: a standard deviation of 0.066 %, with no trend.

Three of the four days were low-load days at +0.12 %. On those days the plant burned about 72 MMScf instead of 120, so a small difference becomes a larger percentage. One day, 2 October, was +0.32 %. That is the day to investigate, and because the raw changes are still in the archive, it can be investigated.
On another day the operator's report turned out to be a copy of an earlier day. The report for 14 September repeated the 134.87 MMScf of 7 September, while the DCS archive showed 148.10. The raw data showed it immediately. A manual reading cannot defend itself. A time-tagged archive can.

This is a calibrated comparison between the archive and the operator readings. It is not an independent billing validation, and it does not replace the fiscal meter. What it does is show, day by day, where two numbers agree and where they do not, and why.
The same lesson in tariff metering
On a tariff-metering project, the meters were replaced while the wiring and test terminals were kept. Pulses were replaced by Modbus, the gateways are redundant, and the metering runs on its own network.
The part that matters here: hourly and minute readings are kept as files, next to a browser dashboard. Those files are the evidence. If a number is ever questioned, the answer is not an opinion about which screen to trust. It is a file with a timestamp.
Document the interpretation, not only the result
If the same data can produce different results, then a result without its recipe is incomplete. Every number that leaves the plant for a report, a dispute or an AI model should carry:
- The source: which archive, which signal, raw or already compressed.
- The interval and its boundaries, including time zone and the definition of the day.
- The aggregation method, and why it was chosen.
- How quality codes, gaps, single-value intervals and cut-offs were handled.
- Any calibration parameter applied, with its date and how it was derived.
- The software and version that produced it.
Our gas report states all of it on the first page. Anyone can repeat the calculation and get the same number.

That is the difference between data and information. Data is what the DCS recorded. Information is data with its interpretation written down, so that the next engineer, auditor or AI system reads it the same way.
How we do this
The 66 gas days were calculated with TXPCalc, our data-node engine. It reads the data the DCS already has, live and from the archive, and never writes to the control system. Each signal becomes a data node: its own history of value, timestamp and quality, written only on change, with its unit, range and source document. Every hour is checked against the DCS archive before it is published, and gets a status, so you know which numbers are verified and which are not. Past days can be replayed from the archive and compared with the operator's readings, with a printed protocol.
Today it runs on one plant, read-only, alongside the existing system. Other calculations and one-way operation are next. TXPCalc is being prepared as a product.

If you want to know how your own figures hold up, send us an extract of your DCS archive. We recalculate your quantities and show where your current figures and the recipe-based result agree or differ. Or message me and get on a call with me (no obligations on your part).
What this means for you
- Before you buy analytics, find out what your historian really stores and for how long.
- Never let an AI or a report run on averages alone. Keep the raw changes.
- Pick the aggregation for the question, and write it next to the result.
- When two numbers disagree, go back to the raw data before you go to a meeting.
This continues Your AI analytics platform is built on a chain of broken rulers (LinkedIn), where the precision is lost in the integer and float formats of S5 and S7, and Your control system already has the data (LinkedIn), where the 66 gas days come from. More on the idea behind data nodes is on beyondpurdue.com/data-nodes. The ruler has to be right, the data has to be kept, and the way we read it has to be written down.
Petr Roupec, Beyond Purdue


