Tag History Interpolation Docs slightly confusing


I need to properly understand how the data interpolation algorithm works so I can choose which method is more appropriate for our client to see data graphed.

I have been reading through the documentation on how the Ignition Tag Historian stores data and presents it afterward, and I have found the docs on data interpolation to be a bit confusing, specifically in the section dealing with the Average interpolation method.

Throughout the explanation for how the interpolated value is calculated in Time Window 1, there’s data which suddenly appears, and is only referenced once throughout the entirety of the document. The docs read:

Add this result to the Average value of the last process calculation (between 1:42pm and 1:45pm) to include all time-weighted data. Then, divide by the total time that has passed, which is 57 minutes or 3,419,999ms:

(211,606,751.6271+18,520,997.1) /3,419,999=67.29

This is the first time that any “last process calculation” has been mentioned, the first time said value (18,520,997.1) has appeared in the document, and it doesn’t appear in any of the formula previously presented for the Average algorithm. That aside, the only time window I can see in the document that would mean 57 minutes had passed would be the before the “current time” of 2:30, which is the 1:33 datapoint at the start, but at no point is that datapoint mentioned in the same section.

I have tried several calculations applying the proposed Average formula using the previous datapoints in the Time Window to reach the 18,520,997.1 value but I haven’t been able to do so.

Additionally, this intermediate value doesn’t appear in the calculation for the second Time Window. I’m assuming this is because there’s no data within the Time Window to inform on the trend, but it still leaves me questioning where that 18,520,997.1 value comes from at all.

Additionally: Do the SimpleAverage and Average Aggregation Modes follow the same formula as the interpolation methods?

Thanks in advance.

P.S: I have sent an email to the Docs team saying the same thing, but I'm wondering if someone in the forums might've caught something that's flying over my head so it might get recorded for future users with similar questions :sweat_smile:

I took a look at the page and updated it to better reflect how these values are calculated. For a quick summary, the last process calculation of 18,520,997.1 is found by using the Average Value formula on all the data included in Time Window 1 and adding those results together. Now, with this information, it’s more apparent that we are indeed starting from the 1:33 time as you suspected, which confirms that as how the 57 minutes was found.

Average Value formula:

(0.5 * abs((currVal - prevVal) * timediff)) + (timediff)(min(currVal,prevVal))

The page updates can be found here.

1 Like