Overview
Injects synthetic fault patterns into the sensor data stream to test anomaly detection, health scoring, and alerting systems. Supports four fault types with three severity levels, enabling targeted validation of ML model performance.Endpoint
Query Parameters
Asset identifier to inject fault into
Type of fault pattern to injectOptions:
SPIKE- Sudden extreme values (voltage/current surges)DRIFT- Gradual degradation over timeJITTER- Normal averages but high variance/noiseDEFAULT- General fault pattern (random within severity range)
Severity level of the faultOptions:
MILD- Targets MODERATE risk (health 50-74)MEDIUM- Targets HIGH risk (health 25-49)SEVERE- Targets CRITICAL risk (health 0-24)
Fault Type Specifications
SPIKE - Sudden Surges
Simulates electrical transients or mechanical shocks:| Signal | MILD | MEDIUM | SEVERE |
|---|---|---|---|
| Voltage | 235-240V (+5-10V) | 240-255V (+10-25V) | 255-280V (+25-50V) |
| Current | 16-18A (+1-3A) | 18-22A (+3-7A) | 22-30A (+7-15A) |
| Power Factor | 0.84-0.87 (-0.05 to -0.08) | 0.77-0.84 (-0.08 to -0.15) | 0.62-0.77 (-0.15 to -0.30) |
| Vibration | 0.20-0.27g (1.3-1.8x) | 0.30-0.60g (2.0-4.0x) | 0.75-2.25g (5.0-15.0x) |
DRIFT - Gradual Degradation
Simulates bearing wear, insulation breakdown, or mounting looseness:| Signal | MILD | MEDIUM | SEVERE |
|---|---|---|---|
| Voltage | 235-238V (lower drift range) | 240-248V | 255-265V |
| Current | 16-17A | 18-20A | 22-26A |
| Power Factor | 0.84-0.86 | 0.77-0.81 | 0.62-0.70 |
| Vibration | 0.20-0.24g | 0.30-0.45g | 0.75-1.50g |
JITTER - High Variance Noise
Simulates electrical noise, loose connections, or bearing chatter:JITTER is the key test for batch model superiority. The 1Hz legacy model sees healthy averages and misses the fault. The 100Hz batch model detects it via
std and peak_to_peak features.| Signal | MILD | MEDIUM | SEVERE |
|---|---|---|---|
| Voltage Mean | 230V (healthy) | 230V (healthy) | 230V (healthy) |
| Voltage Jitter | ±8V | ±15V | ±25V |
| Current Mean | 15A (healthy) | 15A (healthy) | 15A (healthy) |
| Current Jitter | ±2A | ±4A | ±7A |
| PF Mean | 0.92 (healthy) | 0.92 (healthy) | 0.92 (healthy) |
| PF Jitter | ±0.06 | ±0.10 | ±0.15 |
| Vib Mean | 0.15g (healthy) | 0.15g (healthy) | 0.15g (healthy) |
| Vib Jitter | ±0.10g | ±0.20g | ±0.40g |
- ❌ Legacy model: Misses (averages look healthy)
- ✅ Batch model: Detects (high std/peak-to-peak)
DEFAULT - General Fault Pattern
Random fault within severity range:- Uses same ranges as SPIKE but with random variation
- Good for general testing when specific fault type is unknown
Response
Always returns
"started" when fault injection beginsHuman-readable confirmation with fault details
New system state:
"FAULT_INJECTION"Example Requests
cURL - JITTER SEVERE
Python - SPIKE MEDIUM
JavaScript - DRIFT MILD
Example Responses
200 OK - Success
400 Bad Request - Invalid State
Expected Health Impact
After ~3-5 seconds of fault injection, health scores should align with severity targets:| Severity | Target Health | Target Risk | Expected DI Range | RUL |
|---|---|---|---|---|
| MILD | 50-74 | MODERATE | 0.26-0.50 | ~10-19 days |
| MEDIUM | 25-49 | HIGH | 0.51-0.75 | ~2-9 days |
| SEVERE | 0-24 | CRITICAL | 0.76-1.00 | 2 days |
Health degradation is cumulative. The Degradation Index (DI) increases monotonically during fault injection and does not reset when returning to healthy monitoring. Only
POST /system/purge resets DI to 0.0.Monitoring Fault Injection
PollGET /system/state to track metrics:
Live Metrics
fault_capture_rate≥90%: Strong detectionfault_capture_rate70-89%: Moderate detectionfault_capture_rate70%: Weak detection (consider severity increase)
Stopping Fault Injection
Two options:Option 1: Reset to Healthy Monitoring
MONITORING_HEALTHY state. DI is retained and may continue to increase if residual damage is detected.
Option 2: Stop Session
IDLE state. DI is retained. Requires recalibration to resume monitoring.
Use Cases
Model Validation
Test detection accuracy across all fault types and severities
Dashboard Testing
Verify UI updates (red anomaly lines, health score drops, alerts)
Alert Tuning
Trigger threshold-based alerts and validate notification delivery
Batch Model Advantage
Run JITTER faults to demonstrate 100Hz batch model superiority
Error Responses
POST /system/calibrate first.
fault_type and severity.
Performance Characteristics
- Latency: 200ms (injection runs in background)
- Data Rate: 100 points/second (10ms intervals)
- InfluxDB Writes: 100 points/second
- Memory Impact: Minimal (reuses existing buffers)
Related Endpoints
- GET /system/state - Monitor fault injection metrics
- POST /system/reset - Stop faults and return to healthy monitoring
- POST /system/purge - Deep reset with DI=0.0