Problem
Toothpaste products such as Sensodyne and Aquafresh follow similar manufacturing processes: a batch passes through distinct steps. Site operators need to know which step is running now and whether it is taking too long. Sensors inside the mixer stream pressure and temperature. A step can run faster or slower from batch to batch, so comparing by timestamp against a reference run fails.
Example from the article: Haleon's data science team built a step-detection model for a toothpaste site. It shows operators real-time progress on a dashboard and notifies them when a step runs longer than expected.
Solution in brief
Describe each step as a reference sensor pattern with its own distance threshold, then compare the live stream to these templates with FastDTW (an approximate dynamic time warping algorithm). A step is marked as detected when the distance drops below its threshold. Standardized features, one global threshold per step and a search for steps N and N+1 at once keep the detection stable.
Questions this case answers
- How to recognize which stage of a multi-step process is under way from a live multivariate sensor stream when each stage varies in duration
- How to set a match threshold for template-based pattern detection on streaming time series that produces many local similarity minima
- How to detect which step of a manufacturing process is running from a live stream of sensor readings?
- How to match streaming time series to reference step templates when the same step runs faster or slower each time?
Tools and methods
- FastDTW (fastdtw package) — near-linear-time approximation of dynamic time warping; returns a distance and a warping path, with SciPy
euclideanas the point distance - Reference step templates — expected signal pattern, optimal duration and distance threshold per step
- Standardization — rescales every feature to mean 0 and standard deviation 1 before matching
Google or a one-time email code. No password.