MovingStep

Detects whether the specified PetroVisor signal returns to a certain level after it has changed within a specified amount of time.

Returns 1 when the signal has step changed, 0 when there is no step change. Returns 1 only when there was a stable trend before, so continuous changes are not detected. Returns 1 only, when the signal is not returning to the level it was before within the given time steps.

Syntax

MovingStep(expression, steps backward, tolerance stable, within min, within max, max allowed difference, direction)
  • expression: signal or data expression
  • steps backward: number of time steps backwards
  • tolerance stable: slope threshold of the specified signal to be considered stable
  • within min: minimum number of time steps to return to the level the signal was before
  • within max: maximum number of time steps to return to the level the signal was before
  • max allowed difference: tolerance of the level in percent
  • direction: spiking direction, either 'up', 'down', or 'both'

Example

MovingStep(“oil production rate” in “m3/h”, 24, 0.06, 2, 8, 5.5, “up”)