Skip to main content
Call Eric:863-698-8266
CURRYCONTROLS.COMControls & Automation Knowledge Hub
ReferenceSCADADesignAnalog

Historian Compression

How historians store years of data on a disk: exception deadbands at the collector, swinging door compression at the archive, what each discards and what it keeps, the settings that turn a trend into a staircase, lossless alternatives, and how to check that the compressed data still tells the truth.

8 min readUpdated Sep 5, 2026Published Sep 5, 2026By Eric Sullivan

The short answer

Historian Compression

Historian compression reduces stored data by keeping only the points needed to reconstruct the signal within a tolerance: an exception deadband at the collector drops values that have not moved, and a swinging door algorithm at the archive drops values that lie on a straight line between kept points, within a compression deviation. Both are lossy by design, the loss is the deviation setting, and a deviation set wider than the process detail turns a trend into a sequence of straight segments. Modern storage makes aggressive compression unnecessary for most utilities; the settings are chosen per tag from what the trend must show, and checked by comparing raw and stored data on the tags that matter.

Key points

  • Two stages: exception at the collector, compression at the archive. Each has a deviation setting.
  • Swinging door keeps the points that a straight line cannot predict within the deviation.
  • The deviation is the loss. Set it below the detail the trend must show.
  • Storage is cheap now. Aggressive compression solves a problem most utilities no longer have.
  • Verify by trending raw against stored on a critical tag. If they differ visibly, the setting is wrong.

Why compress at all

Historians were designed when disk was expensive and a plant had tens of thousands of tags. Storing every sample of every tag was impossible; storing only what was needed to redraw the signal was the solution, and the algorithms that do it are still in every historian. Disk is now cheap and a utility has thousands of tags, not hundreds of thousands, so the pressure is gone. What remains is that compression, well set, produces a cleaner archive and faster queries, and, badly set, produces a record that has lost the thing someone will later need to see. The settings deserve the same attention as the collection rates.

Exception and compression

StageWhereRuleSettingWhat it removes
ExceptionAt the collector, before sendingSend a value only if it differs from the last sent value by more than the exception deviation, or if the maximum time has passedException deviation and maximum intervalRepeats of the same value; noise within the deviation
CompressionAt the archive, before storingStore a value only if a straight line from the last stored point cannot pass within the compression deviation of every value since; the swinging doorCompression deviation and maximum intervalPoints that lie on a straight trend within the deviation

The two work together: exception thins the stream from the source, compression thins it again at the archive. Typical guidance sets the exception deviation to a little more than the measurement noise and the compression deviation to about twice the exception deviation. Both have a maximum interval, so that a perfectly steady value still stores a point periodically.

Swinging door

The compression algorithm most historians use is swinging door trending. When a value arrives, the archive asks whether a single straight line could be drawn from the last stored point through all the values received since, staying within the compression deviation of each. If yes, the newest value is held as a candidate and nothing is stored. If no, the previous candidate is stored as a new anchor and the line starts again from it. The result is a set of stored points from which the original signal can be reconstructed by straight-line interpolation within the deviation, and the count of stored points depends on how often the signal changes direction, not on how often it was sampled.

Settings by tag

TagExceptionCompressionNote
Control loop PV, during tuning or analysisSmall, at the noise levelZero, or offThe dynamics are the point
LevelA fraction of an inchAn inch or soThe cycles survive; the ripple does not
Compliance analyzer valueSmallZero or very smallThe record should be the measurement, not a reconstruction
Flow rateA percent of rangeTwo percentTotals come from a separate totalizer tag, not from integrating compressed rate
Motor currentA percent of rangeTwo percentWear trends are slow
Digital statesNoneNoneEvery transition is stored
SetpointsNoneNoneEvery change is stored
TotalizersNoneNoneA total is a fact at a time; never compress

The staircase and the flat line

Two symptoms say the settings are wrong. A trend that looks like a staircase, flat segments joined by steps, has an exception deviation wider than the movement of the value; the historian only stored the value when it had moved a whole step. A trend that is a straight line across hours while the value was moving has a compression deviation wider than the movement. Both are found by trending the live value from SCADA beside the stored value from the historian on the same chart. The live one is the truth; the stored one should match it as closely as the deviation allows.

Lossless and modern alternatives

Some historians and time-series databases now offer lossless compression, encoding the raw samples compactly without discarding any, at storage costs that are acceptable for utility tag counts. Where the platform offers it, a utility can store every sample of its critical tags losslessly and use deviation compression only on the bulk. The choice is per tag, and the compliance and the control analysis tags are the first candidates for lossless.

Frequently asked questions

What compression deviation should I use?
For most analog tags, about twice the exception deviation, which is itself a little above the noise: for a level with an inch of noise, an exception of one and a half inches and a compression of three. Then trend live against stored and adjust. For anything analyzed later, tighter, down to zero.
Does compression affect totals and averages?
Averages and totals computed from compressed data are approximations within the deviation, which is usually fine for a daily average level and not fine for a billing or a compliance total. Totals come from a totalizer tag in the controller stored uncompressed, never from integrating a compressed rate.
Can I turn compression off?
Yes, for a tag or for the archive, and with modern storage many utilities do for their critical tags. The archive grows faster and queries return more points; the platform documentation gives the storage estimate. A middle path is a small deviation, which removes the noise and little else.
Why does the historian trend not match the SCADA trend?
The historian is showing compressed data and the SCADA buffer is showing raw samples, or the two are drawn at different sampling. A visible difference on a value that matters means the deviation is too wide; a small smoothing on a noisy value is expected.

Direct contact

Have a controls question?

Reach Eric Sullivan directly about anything on this site, a controls or automation topic, or one of his personal projects.