ai-toolbox
deep dive into applications and algorithms
Chatter detection in milling
Detecting milling chatter using AI Algorithms
Production Data
Testing Data
Raw Data - Training
2D-time-series data of spindle head accelerations: axes X and Y at 10 kHz sampling rate
Measured using a mounted accelerometer
Learn moreRaw Data - Testing/Production
2D-time-series data of spindle head accelerations: axes X and Y at 10 kHz sampling rate
Measured using a mounted accelerometer
Learn morePreprocessing - Training Data
- High_pass butterworth filter at 40 Hz
- Time_windowing - 2000 points long, 1500 points stride
- Extraction of harmonic to inharmonic peaks energy ratio
- Extraction of cyclostationarity variance
Preprocessing - Testing/Production Data
- High_pass butterworth filter at 40 Hz
- Time_windowing - 2000 points long, 1500 points stride
- Extraction of harmonic to inharmonic peaks energy ratio
- Extraction of cyclostationarity variance
Dataset - Training
A set of four dimensional vectors (f1,f2,f3,f4) where:
- f1 is axis X's energy ratio
- f2 is axis X's cyclostationarity variance
- f3 is axis Y's energy ratio
- f4 is axis Y's cyclostationarity variance
Dataset - Testing/Production
A set of four dimensional vectors (f1,f2,f3,f4) where:
- f1 is axis X's energy ratio
- f2 is axis X's cyclostationarity variance
- f3 is axis Y's energy ratio
- f4 is axis Y's cyclostationarity variance
Model Training
Training dataset is splitted into a train/test set with a ratio of 70/30
An sklearn instance of an SVM is fitted to the training data.
Learn moreModel Testing
Training dataset is splitted into a train/test set with a ratio of 70/30
An sklearn instance of an SVP is tested to the training data.
Tested Model
The tested SVM is put up for validation on production data.
While testing results are satisfying, some performance degradation is noticed due to a domain shfit in production data over time.
Motivation
Chatter during milling severely impacts surface quality, tool longevity, and machine health. To address this, there is a strong need for intelligent systems that can monitor and control cutting conditions in real time, enabling more efficient, reliable, and cost-effective CNC manufacturing.
Objective
The objective of the MCCi project is to develop and integrate an AI-powered system capable of real-time chatter detection during milling operations. Based on vibration data, it should enable proactive process adjustments. This contributes to smarter, more sustainable manufacturing aligned with European initiatives promoting AI adoption and circular economy practices.
Use of AI
Ai is used under the form of a support vector machine (SVM) that helps establish a threshold between acceptable and non acceptable vibration levels.
Service provider company
LORTEK
https://www.lortek.esDescription
LORTEK is a non-profit private technology centre that advances the digitalisation of manufacturing processes and transfers knowledge to industry, boosting competitiveness and sustainability. With a vision to lead in digital and smart manufacturing, LORTEK develops innovative solutions to address the challenges of digital transformation and the energy-climate transition.
Company service
- Process monitoring and control AI Services
Data
Raw Data
Raw data collection
Data acquisition was performed using a Micromega-IAC-CM-U-03 triaxial MEMS accelerometer connected to a Labjack T8 system, with a consistent sampling rate of 10kHz. The accelerometer was mounted on the spindle head of two different machines: a Yaskawa GP225 robotic machining cell and a Haas VF-2SS vertical machining center. The vibration signals were logged during side milling operations, with some experiments involving ramp coupons to capture chatter onset.
Experiments were conducted using various materials and process parameters. For the Yaskawa robot, Aluminum 7075-T6 and 316L Stainless Steel (via Direct Energy Deposition) were used, while the Haas machine processed low-alloy steel. Climb milling was performed without coolant. Each experiment corresponds to a single machining pass, saved in one or more files depending on process consistency. If chatter onset occurred mid-pass, separate files were created with identical parameters but different labels.
Raw data description
The dataset contains labeled vibration data collected during milling operations as part of the MCCi experiment under the AIRISE project. Each data point is tagged to indicate the presence or absence of chatter—a harmful vibration phenomenon in machining. The raw data consists of time-series acceleration signals from the X and Y axes of the machine
Chatter labeling was based on both surface inspection and auditory analysis of the machining sound. As described in Machining Dynamics by Schmitz and Smith, stable cuts produce clean, harmonic tones, while chatter results in harsh, non-harmonic sounds. This acoustic distinction guided the labeling process and informs potential feature extraction strategies in the time-frequency domain, such as identifying non-harmonic frequency components or sudden amplitude spikes.
Data preprocessing
Processing description
To prepare the dataset for training, the vibration data was first divided based on the source machine—Haas and Yaskawa. Given the high sampling rate (10kHz) and the relatively small number of time-series samples (59 in total), a time-windowing strategy was applied to increase the effective dataset size. Each signal was segmented into overlapping windows of 2000 samples with a stride of 1500.
The obtained complete dataset was then divided into a training and a testing set following a 70/30 split ratio.
Feature engineering
The 2D time-series data (X and Y axis accelerations) were transformed into a feature engineered 4D vector, based on inputs from scientific literature. For both axes, two key features were extracted:
- The energy peak ratio between harmonic and inharmonic frequency components, capturing the spectral purity of the signal, and
- The variance of signal cyclostationarity, reflecting periodicity and structural changes over time.
This resulted in a set of 4D vectors, one for each time window, more suitable for the application of a Support Vector Machine type algorithm.
Algorithms
Cyclostationarity Analyis
A signal processing technique that analyses the periodic statistical properties of a time series.
Harmonic Energy Ratio
A time series processing algorithm that extracts the ratio of harmonic to non-harmonic energy.
- The timeseries is transformed using the Fast Fourier Transform.
- The n_highest peaks are identified
- The ratiio is calculated as the sum of the n_harmonic peaks intensity to the n_inharmonic peaks intensity found.
Features
Cyclostationarity
Float
A measure of the variance of a cyclostationarity metric across the time series
Energy Ratio
Float
The energy ratio between harmonic and non-harmonic peaks in the fft of the signal.
Raw Data
Data preprocessing
Feature engineering
testing/val feature engineering
Datasets
A subset of all the transformed raw data.
License:
CC-BY
Size
258 x 4D time series
A set of data that is organised in a table with rows and columns.
Each row represent one observation, each column represent a feature of that observation.
Tabular data is similar to how an excel spreadsheet is organised.
Request Dataset
The complementary subset to the training dataset.
License:
CC-BY
Size
111 x 4D time series
A set of data that is organised in a table with rows and columns.
Each row represent one observation, each column represent a feature of that observation.
Tabular data is similar to how an excel spreadsheet is organised.
Request Data
Trained model/s
Model types
Model selection
Due to the low narrow width of the training datasets, and the classification nature of the task, a standard Support Vector Classification (SVC) model was chosen, leveraging a radial basis function (RBF) kernel.
Hardware used for training
Standard UNIX environment with CPU
Model training
Fitting of the SVC on training data. No particular training complexity.
Loss function
Hinge loss (standard SVC loss in scikit-learn)
Testing metrics
- Accuracy scoring,
- f1 scoring,
- Confusion matrix