Page tree

The Eigen Calculation Engine acts as a virtual data historian to allow a user to create Virtual Timeseries (calculations) based on any other historian data source.

There are two basic types of calculation you can do: Maths functions (CALC) and signal generation (SIGGEN).

The CALC historian supports operations across tags from multiple different data sources.  It takes as input any tag available through the Eigen Historian Servlet and returns a time-series set of values as the result of the requested operations (e.g. add two tags together).  The dataset returned can itself be treated as a tag and used as input to another calculation because it implements the Eigen Historian interface.

Examples of use cases are:

  • Units conversion: Mostly tag x constant. For the case of temperature it's (tag x A) + B, or (tag - B) x A

  • Add two tags together: Tag 1 + Tag 2

  • Masking: Value of Tag 1 When Tag 2 is >=< a constant

The graphs opposite show examples of adding, units conversion and signal generation to track the oil produced against a target, and the lower one shows using "THRESHOLD" to create a virtual digital tag from an analogue value, in this case a running status from the turbine speed.

CALC Syntax with examples:

Syntax is: FUNCTION(comma separated list).  Each entry must be prefixed by it's historian, e.g. pi/... or siggen/... etc.

Functions supported are:

  • ADD(list of values, comma separated): add(historian/18XSV2209:BCL,4)
  • SUB(list of values, comma separated): Works from left to right i.e. (((A -B)-C)-D) sub(historian/18FT3104:X.VALUE,10,10)
  • MUL(list of values, comma separated): mul(historian/18XSV2209:BCL,4)
  • DIV(list of values, comma separated): Works from left to right i.e. (((A/B)/C)/D) div(historian/18FT3104:X.VALUE,10,10)
  • MAX(list of values) - the max of two or more series at a point in time e.g. MAX(siggen/sin4@300,2)
  • MEDIAN(list of values) - returns the median across all tags in the list at a point in time
  • MEAN(list of values) - returns the mean across all tags in the list at a point in time
  • STDDEV(list of values) - returns the standard deviation across all tags in the list at a point in time
  • VARIANCE(list of values) - returns the variance across all tags in the list at a point in time
  • SQRT(x) - the Square root of each point in a series

  • LN(x) - the natural Log of each point in a

  • EXP(x)

  • LOG(x,y) -- log x base y

  • POW(x,y) -- x ^ y

  • THRESHOLD(a,b,c,d) - If a is above b then c else d - e.g. THRESHOLD(historian/80SE1417A:Z.X.VALUE,3000,1,0)

  • IFEQUALS(a,b,c,d) - If a = b then c, else d  - e.g. IFEQUALS(historian/18_B1_FlowStatus,"flowing",1,0)

  • UNITCONVERT(source tag, output units) - this will only work on tags with properly configured units

  • SLIDINGAGG(source tag, function, time window) - e.g. (historian/4D-PI130102.AI,AVG,1h) - Functions = AVG, MIN, MAX, STDDEV, VAR, SUM, COUNT, NUMGOOD, NUMBAD, time window = 1d, 1h etc.

  • TOTALISE(basetag,windowsize,offset,rateunit) - e.g. TOTALISE(historian/18FT1204:X.VALUE,1d,0,1h)   OR
    TOTALISE(basetag, windowsize, startdate, rateunit) e.g. TOTALISE(pi/18FT1204:X.VALUE,365d,2016-01-01,1d)

  • TOTALISE2(basetag, windowDefinition, anchorDefinition, dataRate [, rangeTotaliseHint [, singlePointTotaliseHint]] )
  • UNITCONVERT(source tag, output units) - this will only work on tags with properly configured units

To add a Virtual Timeseries to a KPI or Trend, select the Calculation tab in the "Add tag" popup.  Then click "Build calc"

Select the calculation operation you want and drag and drop tags (or type constants or variables) or search for them for each of the parameters.  Operations can be nested.

SIGGEN syntax

Syntax is (without the spaces):

function amplitude +/- y-offset @ period +/- x-offset (in seconds)

e.g. sin10-30@600-3600 — sinewave of amplitudes -10 and 10; offset by -30 (i.e. between -40 and -20); period of 600 seconds; offset by -3600 seconds (1 hr)*

Function supported are:

  • sin (sine)
  • cos (cosine)
  • saw (saw wave)
  • sq (square wave)
  • sc (S-curve)

Have a look at the example in the "Production vs Target" graph (top right) to see how the target production throughout the day can be calculated


  • No labels