0

Interpolated Bounding Values using SteppedInterpolation

Hi Everyone

I know that Canary can do Simple Bounding and Interpolated Bounding when it's aggregate some time series.

I supuse that it use SlopedInterpolation method (described by the OPC Foundation https://reference.opcfoundation.org/Core/Part13/v105/docs/3.1.8 ), and I think that is the simplest and natural way to calculate bounds (just a straight line between know data).

I would like to explore the SteppedInterpolation (on the same link the explanation). But in simple words, is just take only the last known TVQ before the bound timestamp.

Is there any way to do that on aggregations?

Can I do some calculation every minute and save in the same origin tag the value at 00:00 seconds?

Thank you!

9 replies

null
    • smason
    • 1 yr ago
    • Reported - view

    Hi rodrigopoyanco ,

    Our aggregates use the SteppedInterpolated method described in this article with the exception of our Interpolative aggregate which uses the SlopedInterpolated method.

    I'm not sure I understand your question at the end though. Can you clarify?

      • rodrigopoyanco
      • 1 yr ago
      • Reported - view

      Hi Steve , thank you for your reply

      I read on Canary documentation the following:

       

      Simple Bounding Value - uses the data points immediately before and after the boundary timestamps to estimate the bound, even if these points carry a 'Bad' data quality.

      Interpolated Bounding Value - uses the first non 'Bad' quality data points found before and after the timestamp to estimate the bound.

       

      What I understand from this, is that both methods take 2 data points: the before and after, and then (using SlopedInterpolation, in fact a straight line between the two data points), estimate the bound. The only difference between two methods are the treatment of Bad Quality data.

      In SteppedInterpolation, on OPC Foundation documentation, they says:

      Interpolated Bounding Values using SteppedInterpolation are calculated as follows:

      • if a non-Bad Raw value exists at the timestamp then it is the bounding value;
      • find the first non-Bad Raw value before timestamp;
      • use the value as an estimate of the bounding value.

      As you can see, in this case they only use one data point, the data before. In fact, it isn't an Interpolation, they use only the last known data point.

       

      It's clearer now my question? 

      Thank you again!

       

      • smason
      • 1 yr ago
      • Reported - view

      rodrigopoyanco 

      I think your understanding is correct. SteppedInterpolation uses the first value before the timestamp as the bounding value (if no value exists on the timestamp) and does not interpolate with the first value after the timestamp.

      • rodrigopoyanco
      • 1 yr ago
      • Reported - view

      Steve Mason Thank you

      Ok, so Canary's Interpolation isn't Stepped, because it use the data before and after. So....is possible to do some Stepped Interpolation in Canary's aggregations? Or, Can I do some calculation to do this?

      • smason
      • 1 yr ago
      • Reported - view

      rodrigopoyanco 

      Canary does use SteppedInterpolation for all of its aggregates except for our Interpolative aggregate. It's the only one that uses SlopedInterpolation.

      • damon_vinciguerra.1
      • 2 mths ago
      • Reported - view

      Steve Mason I just ran into this myself. I think it's a minor wording issue in the definition of Simple Bounding.

      I had to prove it to myself (See image). But I can now see that StartBound, which uses Simple Bounding (and I think is exactly what rodrigopoyanco  was looking for) takes the first value before time timestamp.

      The confusion is in the definition of Simple Bounding. It says "uses the data point immediately before AND after the boundary timestamp". A quick, laypersons reading of that sentence is that if I want a value at 12:00 AM, it's going to get the value from before AND after that time and do some kind of averaging to get me a value. What I believe it is saying is that for the beginning of an interval, it will use the data point immediately before the boundary timestamp and for the end of the interval it will use the data point immediately after the boundary timestamp. Am I interpreting this correctly? Can we simply update the documented definition (I think you have it a couple of places) to be more clear?

      • smason
      • 2 mths ago
      • Reported - view

      Damon Vinciguerra I updated the documentation (https://helpcenter.canarylabs.com/t/x2y8g1d/aggregate-list-version-24) as it was misleading. With the exception of the Interpolative aggregate, Canary uses Stepped Interpolation for all of its aggregates. In that case, it is the value point leading into the interval which serves as the bounding value. The Interpolative aggregate uses Sloped Interpolation. In that case, it uses the first value before and after the timestamp to determine the bounding value by drawing a line between the two.

      • damon_vinciguerra.1
      • 2 mths ago
      • Reported - view

      Steve Mason I love it! Thanks. I went through the aggregate list and made sure I understood them all in the context of the new definition. The only one I couldn't wrap my head around was

      EndBound Retrieve the value at the end of the interval using Simple Bounding Values.

      Will it return the last value before the end of the interval? Or the first value after the end of the interval. I'm assuming it has to be the one before the end, right?

      • smason
      • 2 mths ago
      • Reported - view

      Damon Vinciguerra Correct. It is the one before the end. The one after the end would be in the next interval.

      There is one caveat with the EndBound aggregate that it requires there to be a value at or beyond the bounding timestamp. This comes into play for the most recent interval since it will most likely be a partial interval. For example, if you're asking for an EndBound value over a 1-hour interval and it's 10:30, it won't return a value for the 10:00-11:00 interval until the Historian receives a new value at or beyond 11:00 or the Historian virtually time-extends the last known value (which happens about once a minute). The End aggregate will return the last value in the interval, regardless if it is partial or not.

Content aside

print this pagePrint this page
  • 2 mths agoLast active
  • 9Replies
  • 96Views
  • 3 Following