AnsweredAssumed Answered

Moving Average Explanation

Question asked by crossea on Jul 5, 2017
Latest reply on Jul 6, 2017 by jru

I am trying to do a moving average, but the way the moving average is working seems perplexing to me. Essentially what I have is almost like a step function. We run at rate of 30 units/minute or 0 units/minute. I want to see the average over the last 10 minutes. I want it to refresh every minute. So I use the PI Calc "Average" function of a speed tag. I set the "Calculation" interval to 10 minutes and the "Refresh Interval " to 1m.

What is perplexing is we have a 14 hour stop, as shown below (and smaller stops), and then the moving average starts to increase in the middle of the stoppage before we start up again. To me I would think a moving average would take the average of the last 10 minutes, and not look forward. This to me looks like it is looking forward. Granted this is using this calc looking at the past. The ultimate goal is to display the moving average on a ProcessBook display of the last 10 minutes real time. Can someone help with this on why the moving average works the way below, and how to get the real time previous 10 minute moving average that refreshed every 1 minute


PI Calc Graph.jpg