CNC Condition Monitoring
A CNC Vibration Data-Quality Checklist Before Analysis
Check file duration, missing values, clipping, sample rate, sensor orientation and process alignment before trusting features.

A sophisticated model cannot repair a measurement that was clipped, mislabeled or taken from the wrong process state. Data-quality checks belong before feature calculation.
Start with shape and duration
Confirm three channels, expected sample rate and plausible record length. Unexpected duration may indicate process variation or incomplete capture.
Check values
Count NaN, infinite and repeated values. Look for flat lines, saturation, abrupt steps and impossible ranges.
Check metadata
Validate machine, operation, label, date and sensor setup. Filename parsing should be tested rather than assumed.
Check process alignment
Plot start and end regions. A correctly shaped file may still contain the wrong machine state.
A minimum automated audit
For every HDF5 file, record path, array shape, duration, per-axis mean, RMS, minimum, maximum, missing-value count and repeated-extreme count.
Generate a report before analysis. Review outliers manually and assign a quality status with a reason instead of deleting them without trace.
| Check | Possible problem |
| Unexpected duration | Incomplete or different process |
| Repeated maximum | Clipping or saturation |
| Flat channel | Sensor or acquisition failure |
| Large offset change | Remounting or calibration shift |
Common mistakes to avoid
- Dropping files silently.
- Treating every outlier as a fault.
- Trusting labels without spot checks.
Frequently asked questions
Should bad-quality files train anomaly models?
Usually no, unless bad acquisition is an intended detectable class.
Can duration differences be valid?
Yes; investigate before flagging.
What should be saved?
The audit metrics, decision, reason and software version.
Practical workflow for this method
Run the same audit after every new download or conversion. Reproducibility includes quality rules.
Separate data-quality alarms from machine-condition alarms so operators know whether to inspect the sensor or the CNC process.
Use pass, review and reject outcomes with machine-readable reason codes. Review status preserves unusual files without calling them clean training data.
Test the audit with deliberately altered files such as missing channels, NaN values and clipped samples. Quality code also needs validation.
Add thresholds for acquisition quality separately from condition thresholds. Examples include expected three-channel shape, plausible duration range, zero missing values, no repeated saturation value, and sample-rate metadata equal to the configured rate. A failed quality check should suppress or qualify the condition score.
Create a small HTML or CSV audit report containing file path, findings and plots for flagged records. Review a sample of passed files too; an audit that only displays failures may contain systematic mistakes that remain invisible.
About the data used in this guide
The charts use a small teaching sample selected from machines M01, M02 and M03, primarily operations OP03 and OP04. The source records tri-axial acceleration at 2 kHz and labels available examples as good or bad. Label coverage is uneven across machine-operation groups, so missing groups are not treated as healthy evidence. These figures are transparent worked examples, not population estimates or universal fault thresholds.
Dataset: CNC Machining Data, CC BY 4.0. Recommended citation: Tnani, Mohamed-Ali; Feil, Michael; Diepold, Klaus. Smart Data Collection System for Brownfield CNC Milling Machines: A New Benchmark Dataset for Data-Driven Machine Monitoring. Procedia CIRP 107 (2022), 131–136. Research paper.
We explain what the selected data supports and avoid naming a mechanical fault when the dataset only provides a good/bad process label. A machine should be inspected by a qualified person before maintenance or safety decisions are made.