Industrial IoT & Unsupervised Learning

Deployed

MetroPT3 Clustering

Unsupervised sensor clustering on 1.5M readings from urban train air compressors, mapping 99.3% of failure events to a single operating state.

Key Performance Metrics

99.3
FAILURE SHARE985 of 992 failure windows in one mode
6.05
HIGH LOAD SHAREOf 50,513 total windows
0.43
SILHOUETTE SCOREK=3: Idle, Cycling, High Load

Executive abstract

With only four recorded compressor failures across seven months on a Lisbon Metro train, training a supervised failure predictor was statistically impossible. Instead, this project uses unsupervised clustering to group 1.5 million sensor readings by operational behavior, discovering that failure events concentrate almost exclusively in one rare operating mode.

Empirical exhibit

Exhibit 5.1: Cluster separation and anomaly overlap

K-Means Sensor Mode Partitioning (50,513 5-Minute Windows)

Clustering evaluation of 50,513 five-minute sensor windows on the MetroPT-3 compressor dataset. Sustained High Load mode represents only 6.05% of all operating time, yet captures 985 of the 992 total failure windows (99.3%).
Idle

Lowest APU pressure and minimal motor draw

Total Windows:34,096
Failure Windows:7 (0.7%)
Start/Stop Cycling

Normal intermittent compressor operation

Total Windows:13,361
Failure Windows:0 (0%)
Sustained High Load

Highest continuous motor current and air throughput

Total Windows:3,056
Failure Windows:985 (99.3%)
Key methodological takeaway and honest limitation

Although 99.3% of all failure windows concentrate inside the "Sustained High Load" mode (a 16x concentration over baseline), only 32.2% of windows in that mode represent active failures. Therefore, unsupervised clustering successfully identifieswhere failures occur physically, but cannot serve as an actionable predictive alarm without pre-failure lead-time labeling.

5-Minute Feature Windowing & Cleaning

Telemetry from 15 sensors, about 1.5 million readings at roughly 10-second intervals, was segmented into 5-minute windows described by 36 summary features: mean, standard deviation, minimum and maximum for 7 continuous sensors, plus the mean of 8 binary signals. Windows with fewer than half the expected readings were dropped, leaving 50,513.

K-Means Clustering Without Failure Labels

K-Means (K=3, Silhouette 0.43) was fitted on scaled features without ever seeing failure records. The clusters naturally mapped to three physical operating modes: Idle (67.5% of windows), Start/Stop Cycling (26.45%), and Sustained High Load (6.05%).

Failure Overlap & Operational Reality

Cross-referencing clusters against maintenance records revealed that 985 of the 992 failure windows (99.3%) fell into the Sustained High Load mode. However, only 32.2% of windows in that mode represent active failures, meaning high load describes where failures occur rather than serving as an actionable alarm.

What I would do differently

To build a true predictive maintenance model, I would collect sensor data from a larger fleet of compressors and construct survival models tracking degradation over time leading up to failure.

Technical implementation stack

PythonK-MeansUnsupervised LearningPCAPower BIStreamlit
Notification message