Skip to content

nadjastojanovic/scenario-manager

Repository files navigation

Detecting surface condition in automated
screwdriving from torque–angle time series

Python scikit-learn Pandas NumPy Matplotlib NumPy pyts

Supervised surface-condition classification from torque–angle time series recorded by a Bosch CS351 automated screwdriving station used in stroller production, with the aim of detecting material build-up effects across repeated reuse cycles.

Supervised by Nikolai West, Institute of Production Systems, TU Dortmund.

The Problem

Workpiece pairs (top and bottom pieces) are reused across up to 50 runs due to the time-consuming nature of their production. Repeated fastening causes visible material build-up around the screw hole, which was hypothesised to shorten the angle required to reach peak torque. If detectable, this effect would imply that reuse protocols need revision. This project aimed to answer if the effect is visible in the torque–angle curves and if we can isolate it with ML.

Approach

The Scenario class ingests raw CS351 JSON records, pairs runs by DMC workpiece code, assigns rerun order by timestamp, and labels each run by experimental condition. Torque and angle time series are extracted per run, flattened, and padded to 715 samples.

Exploratory analysis quantified the angle required to reach peak torque across conditions using non-parametric tests:

Test Comparison p-value Effect size
Mann-Whitney U Baseline vs. Target 2.85e-65 Cohen's d = 0.44
Kruskal-Wallis All 5 conditions 4.49e-92 η² = 0.24

The effect is statistically significant but moderate in size -> the key question is whether it has practical predictive power.

Four classifiers were evaluated on two tasks: 5-class surface-condition identification, and binary discrimination of each condition against baseline.

Results

Multi-class classification (5 conditions: Baseline, Target, Lubricant, Polish, Sandpaper):

Metric SVC TSF KNN HGBC
Accuracy 0.4812 0.5124 0.4318 0.5318
Precision 0.4512 0.4862 0.3973 0.5142
Recall 0.4417 0.4802 0.3729 0.5091
F1 Score 0.4234 0.4808 0.3751 0.4098

Binary classification (Baseline vs. each condition, HGBC):

Metric Target Lubricant Polish Sandpaper
Accuracy 0.6144 0.9351 0.9534 0.9356
Precision 0.6513 0.9290 0.9496 0.9282
Recall 0.6136 0.9235 0.9460 0.9273
F1 Score 0.6126 0.9266 0.9478 0.9277

The surface manipulations that most strongly alter friction (lubricant, polish, sandpaper) are easily distinguished from baseline (F1 > 0.92). Target (the condition modelling natural reuse build-up) is the hardest to separate (F1 = 0.61), suggesting that material accumulation alone leaves a weaker signal in the torque–angle curve than artificial surface modifications. The hypothesis is supported statistically but not yet confirmed as practically detectable with the current feature set.

File Structure

scenario-manager/
├── scenario.py          # Scenario class: ingestion, grouping, pairing, plotting
├── screw_run.py         # ScrewRun: per-run attributes and step parsing
├── screw_step.py        # ScrewStep: per-step time-series access
├── utilities.py         # Shared helpers
├── hgbc.py              # HistGradientBoosting rerun-order classifier
├── rerun_classifier.py  # KNN + Time Series Forest pipelines
├── xgb-lengths.py       # XGBoost on time-series length features
├── xgb-shapes.py        # XGBoost on time-series shape features
├── clustering.py        # Clustering experiments
├── run.py               # Experiment runner
└── data/                # Raw CS351 JSON records (~8,500 runs across 5 conditions)

About

Supervised surface-condition classification from torque–angle time series recorded by an automated screwdriving station.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages