CNC Condition Monitoring
Record Length and Windowing in CNC Vibration Analysis
Understand why unequal record lengths affect RMS, FFT resolution and machine-learning inputs—and how to handle them.

Real machining records rarely arrive in perfect equal-sized blocks. A longer file contains more process time and gives finer FFT bins, but it may also include a different mix of machine states.
Why duration matters
RMS changes when quiet and cutting periods are included in different proportions. FFT resolution also depends on record duration.
Fixed windows
A fixed one-second window is easy to compare when it starts at the same process event. Without alignment, it may capture different actions.
Event-based windows
Controller markers or repeatable signal events can define tool entry and exit. Event windows vary in length but preserve process meaning.
Machine-learning inputs
Models may require a fixed shape. Padding, cropping and resampling are choices that can add artifacts. Document them and verify that useful events remain.
Resolution versus stationarity
At 2 kHz, a two-second FFT uses 4,000 samples and has roughly 0.5 Hz bin spacing. A ten-second FFT has roughly 0.1 Hz spacing.
The longer record has finer bins only if the process remains stable. If speed or engagement changes, one long spectrum blends states together.
| Window at 2 kHz | Samples | Approx. FFT bin spacing |
| 1 second | 2,000 | 1 Hz |
| 2 seconds | 4,000 | 0.5 Hz |
| 10 seconds | 20,000 | 0.1 Hz |
Common mistakes to avoid
- Padding zeros and calling it new resolution.
- Cropping away the fault event.
- Comparing different windows without labeling them.
Frequently asked questions
Does zero padding add information?
No. It interpolates the displayed spectrum.
Should windows overlap?
Overlap can improve time coverage, but neighboring features become correlated.
What window length is best?
The shortest length that captures the phenomenon with adequate frequency resolution.
Practical workflow for this method
Record length changes both the physical content and the mathematics. At 2 kHz, a one-second window contains 2,000 samples and basic FFT bin spacing of about 1 Hz. Two seconds gives about 0.5 Hz. This does not guarantee that every bin is accurate; sensor response, filtering, leakage and changing speed still matter.
For RMS trends, a fixed event-aligned window is usually easier to explain. For run-up or changing-speed behavior, a time-frequency method may be more appropriate than one FFT over the complete record. The method should follow the process question rather than forcing every file into the same calculation.
Store the chosen start rule, duration, overlap, detrending and window function as part of the feature definition. Otherwise two teams may use the same feature name while calculating different numbers.
About the data used in this guide
The charts use a small teaching sample selected from machines M01, M02 and M03, primarily operations OP01 and OP02. 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.