MovingAvg

Moving average of a freely definable range. it calculates the arithmetical average of the elements within the range defined by the user via number of data points.

In case of entering zero data points before and after the output is a copy of the input.

Syntax

 MovingAvg(expression, # of data points before, # of data points after)
  • expression: signal expression
  • # of data points before - integer number of points in the signal expression before the current date in the aggregation range
  • # of data points after - integer number of points in the signal expression after the current date in the aggregation range

Example

 MovingAvg("produced water per time increment" in "STB", 1, 1)

As you see in the following table the MovingAvg with 1 data point back and 1 data point forward in time produces following output based on the 'original signal' as input:

 

Date/Time

 

Original Signal

MovingAvg
1 datapoint backwards in time
1 datapoint forward in time

01.02.2007 00:00

8

4

01.03.2007 00:00

0

7.666666667

01.04.2007 00:00

15

12.33333333

01.05.2007 00:00

22

20.33333333

01.06.2007 00:00

24

19.66666667

01.07.2007 00:00

13

21.33333333

01.08.2007 00:00

27

15.33333333

01.09.2007 00:00

6

12