Overview
The health assessment system converts anomaly scores into actionable business metrics using a Cumulative Degradation Index (DI). Unlike instant health scores, DI tracks accumulated damage over time, providing a physics-inspired approach to prognostics.Cumulative Degradation Index (DI)
The DI is a monotonically increasing damage accumulator based on Miner’s Rule from fatigue analysis:Core Properties
Monotonic
DI never decreases (except on explicit purge). A quiet minute doesn’t erase past damage.
Dead-Zone
Scores below 0.65 (healthy noise) produce zero damage to prevent phantom accumulation.
Persistent
DI is saved to InfluxDB and recovered on restart. State survives process restarts.
Resettable
POST /system/purge writes DI=0.0 to InfluxDB and clears all state.Miner’s Rule Formula
Damage accumulation follows quadratic severity scaling:Sensitivity Calibration
- Score = 0.50 (healthy noise) → damage_rate = 0.0 (dead-zone)
- Score = 0.70 (mild fault) → effective_severity = 0.14 → damage_rate = 0.000098
- Score = 0.85 (moderate fault) → effective_severity = 0.57 → damage_rate = 0.00162
- Score = 1.00 (severe fault) → effective_severity = 1.0 → damage_rate = 0.005
Time to Failure: At max fault (score=1.0), DI increases by 0.005/second:
Real-world faults (score ~0.85) take 4-5 minutes to drive health from 100 → 0.
1.0 / 0.005 = 200 seconds = 3.3 minutesReal-world faults (score ~0.85) take 4-5 minutes to drive health from 100 → 0.
Health Score Derivation
Health is directly derived from DI:| DI Value | Health Score | Interpretation |
|---|---|---|
| 0.00 | 100 | Brand new |
| 0.15 | 85 | Early fatigue |
| 0.30 | 70 | Moderate wear |
| 0.50 | 50 | Half-life |
| 0.75 | 25 | Critical |
| 1.00 | 0 | Failed |
Inversion: DI represents accumulated damage, so health is
100 × (1 - DI). As DI increases, health decreases.Risk Level Classification
Health scores are mapped to four risk levels using named threshold constants:Risk Classification Logic
Risk Level Characteristics
LOW Risk (Health 75-100)
LOW Risk (Health 75-100)
Color: Green (#10b981)
RUL: 30-90 days
Action: Continue standard monitoring
Dashboard: No red lines, green health ringTypical Scenario:
All sensors within 5% of baseline, DI < 0.25, damage rate ≈ 0
RUL: 30-90 days
Action: Continue standard monitoring
Dashboard: No red lines, green health ringTypical Scenario:
All sensors within 5% of baseline, DI < 0.25, damage rate ≈ 0
MODERATE Risk (Health 50-74)
MODERATE Risk (Health 50-74)
Color: Yellow/Amber (#f59e0b)
RUL: 7-30 days
Action: Add to next maintenance cycle
Dashboard: Yellow health ring, anomaly markers appearTypical Scenario:
Vibration 10% above baseline, DI = 0.30-0.50, damage rate = 0.001/s
RUL: 7-30 days
Action: Add to next maintenance cycle
Dashboard: Yellow health ring, anomaly markers appearTypical Scenario:
Vibration 10% above baseline, DI = 0.30-0.50, damage rate = 0.001/s
HIGH Risk (Health 25-49)
HIGH Risk (Health 25-49)
Color: Orange (#f97316)
RUL: 1-7 days
Action: Schedule maintenance within 48-72 hours
Dashboard: Orange health ring, red shaded anomaly regionsTypical Scenario:
Vibration 25% above baseline, power factor degraded, DI = 0.50-0.75
RUL: 1-7 days
Action: Schedule maintenance within 48-72 hours
Dashboard: Orange health ring, red shaded anomaly regionsTypical Scenario:
Vibration 25% above baseline, power factor degraded, DI = 0.50-0.75
CRITICAL Risk (Health 0-24)
CRITICAL Risk (Health 0-24)
Color: Red (#ef4444)
RUL: 0-1 days
Action: Immediate inspection required
Dashboard: Red health ring, continuous anomaly shading, critical alertTypical Scenario:
Vibration > 50% above baseline, current spikes, DI > 0.75, damage rate > 0.003/s
RUL: 0-1 days
Action: Immediate inspection required
Dashboard: Red health ring, continuous anomaly shading, critical alertTypical Scenario:
Vibration > 50% above baseline, current spikes, DI > 0.75, damage rate > 0.003/s
Remaining Useful Life (RUL)
Physics-Based RUL
RUL is calculated from the current degradation state:| DI | Damage Rate | Remaining | RUL |
|---|---|---|---|
| 0.20 | 0.001/s | 0.80 | 222 hours (9.3 days) |
| 0.50 | 0.002/s | 0.50 | 69 hours (2.9 days) |
| 0.75 | 0.004/s | 0.25 | 17 hours (0.7 days) |
| 0.90 | 0.005/s | 0.10 | 5.6 hours |
Heuristic RUL (Fallback)
When damage rate is near zero, use risk-based lookup:DI Threshold Milestones
The system logs warnings when DI crosses specific milestones:Milestone Detection
"⚠️ Motor fatigue reached 15%"
DI Persistence & Hydration
Write to InfluxDB
DI is persisted every second during monitoring:Recovery on Restart
State Survival: If the backend restarts mid-session, DI is recovered from InfluxDB’s last value. Damage accumulation continues seamlessly from the previous state.
Health Report Structure
HealthReport Schema
Example Report (Moderate Risk)
Explanation Generation
The system provides context-aware explanations based on risk level:CRITICAL risk MUST have at least one explanation per CONTRACTS.md requirement. LOW risk explanations are optional.
Purge & Reset
Full System Reset
- Write DI=0.0 to InfluxDB
degradation_statemeasurement - Clear in-memory baselines and detectors
- Clear sensor history buffer
- Reset state machine to IDLE
- Clear all cached reports
Source Code Reference
Key implementation files:- DI Engine:
backend/rules/assessor.py:355-473- Cumulative degradation functions - Health Scoring:
backend/rules/assessor.py:153-187- Score computation - Risk Classification:
backend/rules/assessor.py:189-208- Threshold-based logic - RUL Calculation:
backend/rules/assessor.py:210-228(heuristic),414-431(physics-based) - DI Persistence:
backend/api/system_routes.py- InfluxDB write/read operations
Next Steps
Fault Simulation
Test health assessment with controlled fault injection
Reporting
Generate PDF/Excel reports with health metrics