Predictive maintenance from vibration
Sensors on industrial machines stream vibration and temperature; an unsupervised model flags a failing bearing days ahead.
- MQTT (Mosquitto)
- InfluxDB
- Apache Airflow
- scikit-learn
- Grafana
Interactive demo
Inject a fault
Time speed
Drag to orbit · scroll to zoom · Training the Isolation Forest on 400 healthy windows…
Day–
Bearing temp.–
Vibration RMS–
Kurtosis–
Anomaly score–
Status–
Things to try
- Inject bearing wear and watch the spectrum: impacts excite a resonance near 2.3 kHz long before the overall RMS moves. The model sees it; the classic alarm doesn’t.
- Reset and inject imbalance: here the 1× rotation peak grows and RMS works fine too. The model’s advantage is smaller, and the timeline shows it honestly.
- Lower the threshold and let the healthy machine run: false alarms appear. Every alert threshold is a trade between lead time and operator trust.
The problem
Failures are rare, so there is almost nothing labelled to learn from. The model has to learn what normal looks like for each machine and notice drift, without drowning operators in false alarms.
How it works
- Sensors publish over MQTT; a bridge writes raw readings to InfluxDB.
- Airflow computes spectral features (FFT bands, RMS, kurtosis) per machine every few minutes.
- An Isolation Forest per machine scores each window; a smoothed score crossing a threshold opens an alert.
- This is the one project designed to run live on this server, with simulated machines.
What is real, what is simulated
Real
- The FFT, the features (RMS, kurtosis, crest factor, band energies) and the Isolation Forest are implemented from scratch and run in your browser.
- The model is trained when the page loads, only on healthy windows; the threshold is the 99.5th percentile of their scores.
- Lead times in the timeline come from the model’s actual alerts in your run.
Simulated in this demo
- The vibration signal is synthetic: shaft harmonics, noise, and bearing impacts at the outer-race defect frequency ringing a structural resonance.
- Degradation follows a fixed 21-day exponential curve; time is compressed.
- Known limitation: overheating moves a single sensor, and the Isolation Forest score saturates above its training range, so for that fault the model is usually not earlier than the classic temperature alarm.
Not built yet
- Hybrid detector: per-sensor physical limits alongside the model
- MQTT broker, InfluxDB and Airflow running live on this server
- Validation on a public bearing dataset (e.g. NASA IMS / CWRU)
- Grafana dashboard