Compdev slope calculation

I watched the explainer for compression & deviation at https://www.youtube.com/watch?v=89hg2mme7S0. It doesn't explain exactly how the slope is calculated for the swinging door algorithm. It uses the Compdev value, which is specified in engineering units. But the slope must be in eng units / time, as it represents a rate of change. What is the time base?

  • I don't think the details of the actual slope calculations are provided anywhere, but since we're talking about timeseries data here we know that values often come on an irregular basis, so the slope calculation isn't depending on fixed timesteps.

    Instead, the slope calulation is done comparing the angles of the max and min slope based on the last archived value and the previous snapshot value. When a new snapshot value comes in to be evaluated, it doesn't matter if 1 or 20 seconds have passed, it's evaluated to see if it falls within the dynamic range from the previuos value. The key here is that the range becomes narrower as time passes by.

     

    There are some nice examples here, showing step-by-step screenshots with different scenarios: https://docs.aveva.com/bundle/pi-server-s-da-admin/page/1021696.html