Skip to content
← All projects

2026 · Master’s thesis, MSc in Big Data & Visual Analytics, UNIR · with Ikerlan

A wear bench that runs itself

A brass bushing wears out on a test bench at Ikerlan, about a tenth of a millimetre a day. I built the system around it that measures that wear, forecasts it and shows it live, with no one in the loop.

The problem

Every experiment needed a technician to move files, run scripts and draw plots by hand.

What I built

An event-driven pipeline, a backend and a dashboard, deployed as two Docker images.

What it showed

No purely data-driven model wins in every regime: the case for physics-informed ones.

Predicting a part’s death

Prognostics and health management (PHM) asks a simple question with an expensive answer: how long until this component fails? Answer it well and maintenance happens just before the failure, not after it, and not months too early on a schedule. Answering it needs sensor data processed as it arrives, a model of how the part degrades, and a way for engineers to see and trust what the model says.

Ikerlan’s AI & Data team studies this on a bench that reproduces a crank–slider mechanism, the same geometry that turns rotation into linear motion in engines, compressors and pumps. The part under study is the bushing in the joint between crank and rod. As it wears, the joint loosens.

Measuring wear without touching it

You cannot put a gauge inside a turning joint. But a looser joint lets the rod reach a little further, so the slider’s stroke grows with wear. A laser reading the slider’s position is therefore a soft sensor for the bushing: take the crest mim_i of each cycle, and the wear accumulated since the start is how far the crest has moved,

Wn=∑i=1n(mi−mi−1)=mn−m0.W_n = \sum_{i=1}^{n} (m_i - m_{i-1}) = m_n - m_0 .

The crest moves by nanometres per cycle, far below the laser’s noise, so the raw estimate is jagged and the occasional acquisition glitch produces jumps no bushing could make. The wear module rejects those jumps and smooths what is left. Run the bench below to watch the estimate converge on the true wear.

Pick a component to see what it does. The amber tick under the slider marks how much further it now travels than at the start.

cycle 0 / 140 · wear 0.00 mm
  • Crest of each cycle
  • Rejected as a glitch
  • Wear estimate
  • True wear
0.000.250.500.751.0003570105140mm

cycles (each stands for hours of a real experiment)

A simulation of the bench, not its data. The mechanism follows ideal crank–slider kinematics, with the clearance drawn 14 times larger than life; wear follows a run-in phase and then a steady rate. The laser reading gets noise and occasional glitches, and the estimate is built the way the pipeline builds it: crest of each cycle minus the first crest, jumps rejected, then exponential smoothing.

On the real bench, each experiment runs for about a week. The wear curves are far from the straight line a simple model would draw: a fast run-in while the surfaces bed in, long plateaus, sudden steps. After a week, one bushing has lost half a millimetre and another a full one.

Test

Test 3. The sharpest run-in: 0.15 mm in the first few hours, then a slow, even climb to 0.7 mm.

0.000.250.500.751.0001234567daysmm

Loading the curves…

Bushing wear measured with the laser soft sensor in five bench experiments, each run for about a week. Curves digitised from the thesis figure, so values are accurate to about 0.01 mm. Pick a test or hover a curve.

A pipeline that waits for the bench

The acquisition software, LabVIEW, logs the motor, the laser and the load cell at 1 kHz into separate files, one set per five-minute block. Before my work, turning those files into a wear curve and a forecast was a manual job, and so was every change to a model or its parameters.

I wrote the pipeline as four Python modules driven by events rather than a schedule. It does nothing until a block is complete, processes it and then waits again, so the bench can stop, restart or change speed without anyone touching the software. Each module reads and writes plain files with a fixed format, which makes them swappable: a new wear estimator or model drops in without the rest noticing.

In the lab, every five minutes

Anywhere, as events arrive

Live signals skip the batch: LabVIEW → backend → dashboard over TCP, in under a second.

Python, lab PC

wear

Turns the laser signal into a wear curve.

  • Takes the crest of the slider position in every cycle; wear is how far the crest has moved.
  • Changes that are implausibly large for one step are flagged as anomalies and re-interpolated before smoothing.
The automated environment. Steps 1–5 run in one Docker image on the lab PC next to LabVIEW, with the data, models and configuration mounted as volumes; the backend and dashboard ship in a second image that can run on any machine. Pick a step to see what it does.

The fiddliest step is the merge. The three sensors are logged by separate acquisition tasks whose clocks disagree by a fraction of a cycle, and a fraction of a cycle is the difference between the spring pulling and pushing. Since all three see the same motion, their peaks must coincide. The pipeline finds the peaks in each stream, matches them and shifts the streams until they line up.

  • Laser position
  • Load-cell force
  • ×Detected peak
0 s1 s2 s3 s4 s5 s6 s×××××××××
mean gap between matched peaks: 310 ms
Illustration with synthetic signals. Each sensor is logged by its own acquisition task, so their clocks disagree by a fraction of a cycle. Both see the same motion, so their crests must coincide: the pipeline finds the peaks in each signal, pairs each with its nearest partner and shifts one stream by the mean gap before merging.

Forecasts that say how sure they are

Four architectures forecast the wear curve from the sensors: two recurrent networks (LSTM and GRU), a temporal convolutional network (TCN) and PatchTST, a transformer that reads the series in patches. The pipeline runs whichever one is selected, and I evaluated all four on the bench.

A point forecast is not enough to schedule maintenance on: you need to know how far to trust it. The predict module uses Monte Carlo dropout. Dropout, normally switched off after training, stays on, so each forward pass samples a slightly different network. Over T=100T = 100 passes,

y^=1T∑t=1Tfθt(x),σ^2=1T−1∑t=1T(fθt(x)−y^)2,\hat{y} = \frac{1}{T}\sum_{t=1}^{T} f_{\theta_t}(\mathbf{x}), \qquad \hat{\sigma}^2 = \frac{1}{T-1}\sum_{t=1}^{T}\bigl(f_{\theta_t}(\mathbf{x}) - \hat{y}\bigr)^2 ,

the mean is the forecast and the spread says how much the sampled networks disagree. To score forecasts that come with a spread, RMSE is not enough, because it only looks at the mean. The continuous ranked probability score (CRPS) compares the whole predicted distribution FF with the value that actually happened,

CRPS(F,y)=∫−∞∞(F(z)−1{z≥y})2 dz,\mathrm{CRPS}(F, y) = \int_{-\infty}^{\infty} \bigl(F(z) - \mathbb{1}\{z \ge y\}\bigr)^2 \, dz ,

and so rewards a forecast that is both close and honestly uncertain. For a forecast with no spread at all, it reduces to the absolute error.

Metric
Show
+12 h
+24 h
+48 h
+72 h
24 h
0.028GRU
0.054TCN
0.080TCN
0.088LSTM
48 h
0.026TCN
0.040TCN
0.049GRU
0.041GRU
72 h
0.024TCN
0.028PatchTST
0.042GRU
0.043GRU
96 h
0.029TCN
0.028GRU
0.025PatchTST
0.081TCN

Rows: hours of history the model sees. Columns: how far ahead it forecasts. Stronger colour: larger error (mm).

Modes won, out of 16

  • PatchTST2
  • LSTM1
  • GRU6
  • TCN7
Show as table
WindowHorizonPatchTSTLSTMGRUTCN
24 h12 h0.052590.050200.027970.04653
24 h24 h0.097840.084280.060430.05425
24 h48 h0.118680.102180.096700.07978
24 h72 h0.168040.088440.089690.09942
48 h12 h0.074220.065870.028950.02570
48 h24 h0.105350.076610.053030.04025
48 h48 h0.066090.060280.049160.05445
48 h72 h0.132450.065360.041240.08282
72 h12 h0.028750.048880.028020.02444
72 h24 h0.028070.070900.040910.03405
72 h48 h0.088310.043350.041990.04822
72 h72 h0.045770.045370.043000.04685
96 h12 h0.044480.050580.040440.02883
96 h24 h0.029630.042810.027610.02836
96 h48 h0.024690.050080.061710.04497
96 h72 h0.096290.163230.119420.08122
Forecast error of the four architectures on the bench, by how much history they see and how far ahead they forecast. Leave-one-out over six experiments: train on five, test on the sixth, average the six results. RMSE scores the mean forecast; CRPS scores the whole predictive distribution. Both in millimetres, lower is better. Hover a cell to compare all four models.

No architecture wins everywhere. TCN is best in 7 of the 16 regimes on both metrics, GRU in 6 by RMSE, and PatchTST takes 4 by CRPS, mostly with long histories. The best error in a regime ranges from 0.024 to 0.088 mm, which against a millimetre of total wear means relative errors up to about 8 %. Errors grow with short histories and long horizons, exactly where a purely data-driven model has least to go on.

That last point is the real finding. Wear is governed by physics that is partly known: Archard’s law says the worn volume grows with the load and the sliding distance,

V=K FN sH,V = K \, \frac{F_N \, s}{H} ,

with a wear coefficient KK and the hardness HH of the softer material. Models that build this in and learn only what it leaves out (hybrid, physics-informed models) are the obvious next step. The environment exists to make testing them cheap.

Putting it in front of engineers

The dashboard is a React app talking to a Flask and Socket.IO backend. It shows the laser, motor and load cell live; the wear curve with the forecast and its band, against a failure threshold; a remaining-life estimate; and a history view to load past experiments and compare models with their metrics side by side. Control panels change the model, the window, the horizon and the bench speed, and the backend writes those changes back to the pipeline’s configuration.

Dashboard showing the measured wear curve, the live forecast approaching a failure threshold, model and prediction settings, and a remaining-useful-life panel
The live forecast view during development: measured wear (blue), the forecast (orange) heading for the failure threshold (red), and the controls for model, window and horizon.

Does it hold up?

I validated the whole environment with the research team on the real bench: signals in the dashboard identical to LabVIEW’s own, computed wear identical to what the pipeline wrote, and the system left running through pauses, restarts, gaps in the data and weeks of continuous operation.

< 2 min

to process each five-minute block

< 1 s

latency of the live signals

< 1 %

failed blocks in a week of running

1

exception in three weeks non-stop

Usability mattered as much: any setting takes one interaction to change, and loading a past experiment and adding it to a comparison takes four at most. Before, the same tasks needed someone who knew the code.

Limits and what comes next

The environment was designed and validated on one bench with one set of sensors, so carrying it to another machine would need its own validation. The hand-off from LabVIEW goes through files, which is robust and simple but adds latency that a faster process might not tolerate. And the models, as the matrix shows, are not yet accurate enough for an industrial decision.

What I take from it is the other half of doing science with data. A model is only as useful as the system that feeds it clean data on time and puts its answer, with its uncertainty, in front of the person who has to decide. It is the same discipline I now bring to brain-imaging data.

Tools. Python (pandas, NumPy, SciPy, PyTorch), Flask, Socket.IO, React, Docker, LabVIEW.

Data. All bench data belongs to Ikerlan and is not published here. The model metrics and wear curves are those reported in the thesis, the curves digitised from its figure; the bench and peak-alignment figures are simulations.

Credits. Master’s thesis for the MSc in Big Data & Visual Analytics at the Universidad Internacional de La Rioja (UNIR), carried out with the AI & Data department of Ikerlan.