Hi, I hope that you are all keeping yourself safe.

I recently needed to explain how PI stores values and DataLink interpolates the data it returns to rebuild the activity which was being recorded. I used the extremely helpful YouTube videos for this, including this one for DataLink: OSIsoft: PI Data Interpolation and Retrieval Modes in PI DataLink (PI DL 2013 Excel Add-in) - YouTube

Upon closer inspection of our data, I find myself confused as to exactly what DataLink is really doing, because the results do not match a manual interpolation calculation or the shape of the line plotted from the compressed data.

Attached are a couple of images from Excel showing the compressed data (which I have checked against an extraction using PIconfig directly from the server) and the various values returned for specific time values which fall between the stored data points. 'Sampled data' and 'Timed data' both return identical values which are also identical to the interpolated 'Archive Value' method described in the YouTube video above. 'Calculated data' using average values returns a closer fit to the compressed data but still not as close as a manual interpolation.

Can anyone explain why the values don't match the curve of the original data or if I should be extracting it in a different way?

Thanks.

Hi Tom,

I have done some testing with a test tag (sinusoid). PI Datalink uses linear interpolation (For time stamps between two recorded values, the function determines the value at the time stamp using linear interpolation between the recorded values. )

In the above screenshot the red line indicates the interpolated fit for the four timestamps (highlighted in yellow) between the two timestamps of the raw data (highlighted in green).

I think the slope and the intercept used in the excel screenshot provided might be using the boundary values and might not be re calibrated for each pair of time stamps.

If you could provide the slope and intercept used in the calculation, we could cross -verify that.

Hope this helps!

-Pranav