Icon

Day3_​S4_​Drift_​vs_​Degradation

1 · Read and Lock Constants

Read S3's state file and declare the 5 locked constants.

Step 1 · Read and prepare


  1. Read day03_state.csv with CSV Reader
  2. Parse the timestamp with String to Date&Time
  3. Declare K_SIG / H_SIG / LAMBDA with Variable Creator

2 · Build the CUSUM

Per pump: standardize the residual, then accumulate a running CUSUM statistic.

Step 2 · CUSUM per pump


  1. Loop per pump with Group Loop Start
  2. Standardize z = (residual-mean)/sd, then u = z - K_SIG with Math Formula
  3. Running sum and floor with Moving Aggregator x2, S = C - Cmin
  4. Flag S > H_SIG with Rule Engine

3 · Compare Detectors

An EWMA and a Shewhart 3-SD alert, for comparison.

Step 3 · Two more drift detectors


  1. Smooth with Moving Average, EWMA lambda=0.2
  2. Flag |z|>3 on the raw residual with Rule Engine
  3. Collect every pump back with Loop End

4 · Outputs

Plot both alarm styles and write the labeled alarm table.

Step 4 · Plot and write


  1. Plot CUSUM and its alert with Line Plot
  2. Plot 3-SD chart with a second Line Plot
  3. Write day03_s4_alarms with CSV Writer

Explore before deciding


  1. Profile the S3 output with Statistics
  2. Keep the reference period with Row Filter, plot with Histogram
Node 1Read CSVday03_state (S3)
CSV Reader
Node 2Parse timestampyyyy-MM-ddTHH:mm
String to Date&Time
EX Node 19Decision pictureresidual hist, ref period
Histogram
Node 3Locked constants5 constants
Variable Creator
Node 4Group Loop Startgroup = pump_id
Group Loop Start
Node 5z=(residual-mean)/sdstandardize
Math Formula
Node 6u = z - K_SIGCUSUM increment
Math Formula
Node 7Cum Sum(u)C = running total
Moving Aggregator
Node 10CUSUM alertS > H_SIG
Rule Engine
Node 8Cum Min(C)Cmin = running floor
Moving Aggregator
Node 13Loop Endstack all pumps
Loop End
Node 9S = C - CminCUSUM statistic
Math Formula
Node 14Plot CUSUMS + cusum_alert vs time
Line Plot
Node 11EWMA lambda=0.2n=9, alpha=2/10
Moving Average
Node 12Shewhart 3SD alertabs(z) over 3, raw
Rule Engine
EX Node 17Profile tablefrom S3 output
Statistics
EX Node 18Reference periodbefore 2025-01-01
Row Filter
Node 15Plot 3-SD chartz + 3SD alert
Line Plot
Node 16Write CSVday03_s4_alarms
CSV Writer

Nodes

Extensions

Links