State Machine
The system operates in one of four states:MONITORING_HEALTHY
System is streaming sensor data and monitoring for anomalies. Normal operation mode.
Control Buttons
1. Calibrate
🎯 Calibrate
Available in: IDLE stateAction: Starts the calibration process to build a healthy baseline.Duration: ~15 seconds (collects 100+ sensor readings)Outcome: Trains the Isolation Forest models and transitions to MONITORING_HEALTHY.
- Backend calls
POST /api/system/calibratewithasset_id="Motor-01" - Data generator produces 100 healthy samples at 100 Hz
- Features are extracted (6-D legacy + 16-D batch)
- Two Isolation Forest models are trained:
- Legacy Model: 6 features, 1 Hz sampling
- Batch Model: 16 features (mean/std/peak/RMS), 100 Hz windows
- Baseline targets are computed (mean voltage, current, vibration, power factor)
- System transitions to MONITORING_HEALTHY
Calibration uses the 3-Sigma Validation rule to ensure baseline data quality. Samples beyond 3 standard deviations are rejected.
2. Inject Fault
⚡ Inject Fault
Available in: MONITORING_HEALTHY stateAction: Simulates a fault condition to demonstrate anomaly detection.Configuration: Select Fault Type and Severity Level before clicking.
Fault Types
- Random Fault
- Sudden Spike
- Gradual Drift
- Jitter (Advanced)
Type: DEFAULTBehavior: General fault pattern with mixed sensor deviationsDetection: Both Legacy and Batch models
Severity Levels
Severity determines the target risk level and magnitude of sensor deviations:| Severity | Target Risk | Health Score | Color | Example |
|---|---|---|---|---|
| 🟡 MILD | MODERATE | 50-74 | Yellow | Minor bearing wear |
| 🟠 MEDIUM | HIGH | 25-49 | Orange | Significant misalignment |
| 🔴 SEVERE | CRITICAL | 0-24 | Red | Imminent failure |
Severity levels are calibrated to specific risk zones using amplitude multipliers in the fault injection logic. SEVERE faults produce health scores in the 0-24 range.
3. Reset
🔄 Reset
Available in: FAULT_INJECTION stateAction: Returns the system to healthy operation (MONITORING_HEALTHY).Effect: Stops fault injection and resumes normal data generation.
4. Stop
⏹️ Stop
Available in: MONITORING_HEALTHY or FAULT_INJECTIONAction: Stops data generation and returns to IDLE state.Effect: Dashboard stops receiving new sensor data.
5. Purge & Re-Calibrate
🗑️ Purge & Re-Calibrate
Available in: Any stateAction: DESTRUCTIVE — Deletes all sensor data, ML models, and resets to IDLE.Effect: Wipes InfluxDB, clears baselines, resets Degradation Index (DI) to 0.0.
- All sensor data in InfluxDB (
sensor_data,features,maintenance_logs) - In-memory ML baselines and trained Isolation Forest models
- Event history and degradation state
- Cumulative Degradation Index (DI) reset to 0.0
Demo Workflow
Follow this sequence for a complete demonstration:Calibrate Baseline
Click 🎯 Calibrate and wait ~15 seconds for completion.You’ll see:
- State badge turns green (MONITORING_HEALTHY)
- Baseline targets appear on Status Cards
- Chart starts filling with sensor data
Observe Healthy Operation
Watch the dashboard for 30-60 seconds:
- Health Score stays in 75-100 (green)
- No red lines on the chart
- Risk level shows LOW
Watch Anomaly Detection
Within 5-10 seconds:
- Health Score drops to 0-24 (red ring)
- Red dashed lines appear on chart
- Risk badge changes to CRITICAL
- Explanations appear in Insight Panel (e.g., “Vibration 3.2σ above normal”)
State Badge Indicator
The State Badge in the control panel shows the current system state with color coding:| State | Color | Meaning |
|---|---|---|
| IDLE | Gray | System is inactive |
| CALIBRATING… | Blue | Building baseline models |
| Monitoring (Healthy) | Green | Normal operation |
| Fault Injection Active | Red | Simulating degraded conditions |
Performance Metrics
Below the control buttons, you’ll see Demo Flow Instructions and validation metrics:- Training Samples: Number of baseline samples collected during calibration
- Healthy Stability: Percentage of healthy samples correctly classified
- Fault Capture Rate: Percentage of faulty samples correctly detected
Next Steps
Metrics & Health Scoring
Understand how health scores and risk levels are calculated
Operator Logs
Log maintenance events to correlate with sensor anomalies