OP
Edge AI · Predictive Coagulation

Predictive Alum Auto-Dosing

Edge-AI fuses upstream river, JPS hydrology and weather with downstream SCV/SCD and jar-test recipe to forecast NTU spikes and recommend the alum setpoint before the disturbance reaches the intake.

PLC has final control
Operator view · Live
Stage 1 · Advisory
Forecast NTU
22NTU
↑ spike in 0 min
Recommended dose
+0%stroke
38 → 38 ppm
Loop status
PLC in control
Stage 1 · Decision support
Loop nominal — SCV −105 tracking, no dose change recommended.
Confidence
86%
Model: rainfall→NTU · v3.2 · Edge inference @ UTHM node
Raw-water NTU · actual vs forecast
Next 3h · 15-min step
Actual (past 60 min) Forecast Predicted spike
Live dosing plan · execution

PLC setpoint ramp 38 → 38 ppm(0 steps · ETA 0 min · ramp ±4 ppm/5 min)

Recipe v1 · base 38 ppm · pH 6.8 · guardrail 24–68 ppm
Now
38 ppm
current
Recommended dose is driven by recipe base × (1 + forecast %), clamped to jar-test guardrails. Apply a jar-test to refresh instantly.
Predictive actuator auto-tune · Edge-AI advises PID/PLC

PID · stroke length · pump frequency fused upstream forecast + downstream SCV feedback

Advisory · PLC executes, operator decides
Upstream feed-forward
peak 22 NTU in — · ff gain 0%
Downstream feedback (SCV)
SCV -108 · target -100 · err -8
Spike urgency
0% · coag pH 6.85
PID gains
Kp
1.201.20
Ki
0.1500.155(+0.005)
Kd
0.400.40
Kp/Kd ride the forecast; Ki settles residual SCV offset.
Dosing pump stroke
%
Stroke length
56%56%
baselinetuned
4–20 mA stroke command · target dose 38 ppm within 24–68 ppm envelope.
VFD pump frequency
Hz
Frequency
35.0 Hz35.3 Hz(+0.3)
baselinetuned
VFD held 20–50 Hz. Lifts ahead of NTU spike to pre-load coagulant.
Early-warning SCV setpoint
SCV SP
-100-100
Predictive layer nudges the PID target more negative before the spike lands, keeping SCD/PID in control.
Guardrails & fail-safe
  • • Kp ≤ 2.5 · Ki ≤ 0.35 · Kd ≤ 1.0 (tuning envelope from jar-test regression)
  • • Stroke clamped to 24–68 ppm equivalent
  • • VFD 20–50 Hz · ramp ±4 ppm/5 min
  • • Fail-safe trip: SCV < −250 or filtered NTU > 4 → revert to baseline
  • • Every write logged to audit centre with recipe version + snapshot
  • • AI advising — PLC has final authority
Spike simulator · Replay forecast patterns

Auto-tune response replay synthetic upstream/downstream shock — no plant impact

t = +0 minNTU now 25 · peak 41 in 45m · SCV -100
Kp
1.201.62
Stroke
56%56%
VFD
35.0Hz40.5Hz
SCV SP
-100-114
Forecast drivers
Forecast NTU (upstream)40.50 NTU
NTU nowNTU peak
29917.21
SCV feedback (downstream)-100 µA
SCVtarget
-90.00-245
Actuator responses — baseline vs tuned
Kp (proportional gain)1.62
baselinetuned
2.011.20
Ki (integral gain)0.19
baselinetuned
0.270.15
Kd (derivative gain)0.49
baselinetuned
0.690.40
Pump stroke length56.00 %
baselinetuned
56.0056.00
VFD frequency40.50 Hz
baselinetuned
48.9035.00
Early-warning SCV setpoint-114 µA
baselinetuned
-100-128
Replays are simulated — actuator writes are suppressed. Baseline traces show the reactive PID; tuned traces show the predictive layer's advisory setpoints.
Predict

Upstream signals

Rainfall (JPS station 3313040)
0.0 mm/h
River level (Selangor U/S)
2.10 m
Catchment lag
≈ 45 min
Weather (next 3h)
—
Fuse

Process signals

Raw NTU (intake)
22.0 NTU
Streaming current (SCV)
−108 (target −100 ± 50)
Coagulation pH
6.85
Filtered turbidity
0.28 NTU (target < 1.0)
Act safely

Recipe & guardrails

Jar-test recipe
38 ppm · pH 6.8 · pAC boost off
Dose limits (guardrail)
24 – 68 ppm
Max ramp rate
±4 ppm / 5 min
Failsafe trip
SCV < −250 or NTU > 4 (filtered)
Staged pathway to autonomy

Advisory → Supervised → Guarded autonomy

Every step earned with validated real-plant evidence
Twin model

Rainfall → NTU → dose · v3.2

Training window
180 days
Predict horizon
45 min
Bench calibrations
0 applied
Rolling dose MAE
2.10 ppm
Confidence boost
+0%
False-alarm rate
0.06 / day
Continuous learning
Awaiting first bench calibration. Each accepted bench recipe is fused with the upstream rainfall/NTU forecast and downstream SCV/pH residuals, then written to the audit trail so drift is traceable.
Audit trail

Recent decisions

  • Dose recommendation
    —
    +8% stroke · target SCV −105 · by AI
  • Recommendation accepted
    —
    Setpoint 38 → 41 ppm · applied via PLC · by Operator
  • Model retrained
    —
    Rainfall model refreshed · UTHM node · confidence 0.91 · by AI
Expected outcomes · pilot

What the twin puts in front of the plant

Earlier spike detection
≥ 45 min
vs reactive PID/SCD
Coagulant saved
6 – 12%
vs 7-day baseline
Filtered NTU excursions
−80%
above 1.0 NTU / week
Operator interventions
−60%
manual dose changes / shift