Blog

A historian remembers everything and understands nothing

Ask a plant for its data and you are handed ten years of it. Every tag, every second or so. It looks like wealth.

Date

A flat line that was not flat

The first time I pulled a year of a single temperature out of a historian I thought the instrument was broken. The trace ran dead level for forty minutes, jumped two degrees, ran level again. Real temperatures do not move like that. They wander.

The instrument was fine. The historian was being thrifty. To save disk space, back when disk space cost real money, it had been told to store a new value only when the reading moved by more than a set amount. Anything smaller it threw away as not worth remembering. What I had was a faithful record of the big moves and no record at all of the small ones. And small moves, for a model, are frequently the whole story.

That is the thing to understand about a historian. It is a magnificent machine for remembering. It was built so that an engineer could look back at last Tuesday and see what happened to the column pressure. For that job it is superb. It was never built to explain anything, and it does not know what any of its numbers mean.

The things nobody wrote down

Consider what the archive cannot tell you.

It cannot tell you the plant was down. A flow of zero might be a shutdown, a failed transmitter, or a line that was valved out for the week. To the historian these are all the same zero.

It cannot tell you that tag FI-2041 was moved to a different pipe during the last turnaround and kept its old name. The numbers before and after look like one continuous series. They are two different measurements wearing the same hat.

It cannot tell you what the operator was trying to do. A setpoint changed at 03:12. Why? A grade change, a high alarm, a hunch? The reason lives in a shift log, in handwriting, or in the head of a man who has since retired to grow tomatoes.

It will also, cheerfully, interpolate. Ask for one-minute data from a tag that was stored every ten minutes and you will get one-minute data. Nine tenths of it invented, as a straight line between two real points, and not marked as such.

None of this is a complaint. A library is not at fault because the books do not read themselves.

Turning a memory into a dataset

So before any model, there is a stretch of plain detective work. I have never found a way round it and I have stopped looking.

You sit with a process engineer and a drawing, and you go through the tags. Which are real instruments and which are calculated? Which were replaced, and when? You find out how each one was compressed, and where it matters you ask for the raw values. You mark the periods when the unit was down, starting up or running a trial, so that the model learns from the plant behaving normally and not from the plant falling over.

Then you line things up in time. Material takes a while to travel from one end of a unit to the other, and a reading at the feed has to be matched with the product it eventually became. And you join in the things the historian never held: lab results, grade schedules, maintenance records. That join is usually where the value is, and it is usually where the swearing is too.

People are sometimes disappointed to hear that most of a machine learning project on plant data is this. They pictured something cleverer. But I would say it is the clever part. Choosing an algorithm takes an afternoon. Knowing that a level transmitter read low for the whole of March because of a blocked impulse line takes somebody who has stood next to it.

The pleasant surprise comes at the end. Once the tags are understood and the bad stretches marked, ten years usually shrinks to two or three that can be trusted. That sounds like a loss. It isn't. Two honest years will teach a model more than ten years of zeros, straight lines and mislabeled pipes.

The historian remembered everything. Somebody still had to do the understanding.