🎓 Lesson 9
D5
Edge-Based Anomaly Detection with Python
Edge-based anomaly detection is spotting unusual patterns in sensor data right where it’s collected—like on a blasthole monitor—so problems like misfires or equipment faults can be caught instantly, before they cause delays or safety issues.
🎯 Learning Objectives
- ✓ Explain the architectural trade-offs between cloud-centric and edge-native anomaly detection in SCADA-integrated blasting systems
- ✓ Design a threshold-based edge detector for detonator continuity voltage signals using empirical noise statistics
- ✓ Analyze time-series accelerometer data from a drill rig to identify anomalous pre-blast vibrations using moving-window z-score detection
- ✓ Apply sliding-window statistical features (mean, std, kurtosis) to classify normal vs. faulty blasthole stemming conditions
📖 Why This Matters
In open-pit mines, a single undetected misfire or faulty detonator can delay production by hours, trigger regulatory investigations, or endanger personnel during secondary blasting. Cloud-based analytics often fail here: satellite-linked SCADA networks suffer >8s latency; cellular coverage drops near highwalls; and raw sensor streams from 200+ blastholes per shift overwhelm bandwidth. Edge-based anomaly detection solves this by acting locally—flagging a 3σ voltage drop in an e-clip circuit *before* the shotline is armed. This isn’t just faster—it’s mission-critical reliability.
📘 Core Principles
Edge anomaly detection rests on three pillars: (1) Signal fidelity—understanding sensor noise floors, sampling rates, and quantization limits (e.g., 12-bit ADCs in blast monitoring units); (2) Computational constraints—deploying algorithms that fit within <512 KB RAM and execute in <50 ms on ARM Cortex-M7 microcontrollers; (3) Operational context—embedding domain rules (e.g., 'no detonator continuity signal should vary >±15 mV over 100 ms pre-initiation') into detection logic. Unlike enterprise AI, edge methods prioritize interpretability (thresholds, rule chains) over complexity—because a maintenance technician must trust and act on the alert *now*, not debug a black-box model.
📐 Sliding-Window Z-Score Detection
The z-score quantifies how many standard deviations a data point deviates from the local mean—ideal for detecting abrupt anomalies in low-latency edge streams. It’s computationally light (only running mean/std required) and avoids assumptions about global data distribution. Used widely in vibration monitoring of drill rigs and detonator continuity verification.
💡 Worked Example
Problem: A blasthole proximity sensor samples continuity voltage every 10 ms. Over a 1-second sliding window (100 samples), the running mean = 4.98 V, std = 0.012 V. A new reading is 4.92 V. Is this anomalous at α=0.01 (|z| > 2.58)?
1.
Step 1: Compute z = (x − μ) / σ = (4.92 − 4.98) / 0.012 = −5.0
2.
Step 2: Compare |z| = 5.0 > 2.58 → exceeds critical threshold
3.
Step 3: Flag as anomaly; trigger diagnostic sequence (e.g., retest continuity, log timestamp, halt initiation sequence)
Answer:
The result is z = −5.0, which falls outside the safe range of [−2.58, +2.58]. This indicates a high-confidence continuity fault requiring immediate operator intervention.
🏗️ Real-World Application
At Newmont’s Boddington Mine (Western Australia), edge anomaly detection was deployed on 142 SmartShot™ initiation controllers. Each unit runs a 32-sample sliding z-score on detonator loop resistance (sampled at 200 Hz). During commissioning, the system detected a batch-specific insulation degradation in 17 emulsion-loaded detonators—showing resistance drift >4σ over 500 ms—2.3 seconds before arming. Field technicians replaced the batch pre-shot, avoiding a $2.1M delayed shift and potential OSHA-reportable incident. No cloud upload occurred; detection and logging were fully autonomous on the controller’s RTOS.
📋 Case Connection
📋 Oil & Gas Pipeline Leak Detection SCADA Upgrade
False alarm rate > 12/day due to pressure transients, lack of sensor fusion, and no hydraulic model integration