Acoustic Anomaly Detection for Industrial Machinery
10 min read · updated August 11, 2026
Rotating machinery is unusually cooperative: it fails at frequencies you can calculate in advance from its geometry. That makes acoustic condition monitoring one of the few machine-learning problems where you can write down what you are looking for before you collect any data.
The frequencies are predictable
A shaft turning at 1,500 rpm rotates at 25 Hz. Everything mechanically tied to that rotation appears in the spectrum at a frequency derived from it. A seven-bladed fan on that shaft produces a blade-pass tone at 7 × 25 = 175 Hz. Imbalance shows at the shaft rate itself; misalignment characteristically at twice it; looseness scatters energy across many harmonics.
Rolling-element bearings are the most useful case because their defect frequencies are non-integer multiples of the shaft rate and therefore land in gaps between the harmonics. The standard expression for the ball-pass frequency of the outer race is
BPFO = (n / 2) * f_r * (1 - (d / D) * cos(phi)) n number of rolling elements f_r shaft rotation frequency, Hz d rolling element diameter D pitch diameter phi contact angle With n = 8, f_r = 25 Hz, d/D = 0.30, phi = 0: BPFO = 4 * 25 * (1 - 0.30) = 4 * 25 * 0.70 = 70.0 Hz
So a developing outer-race defect on this bearing puts energy at 70 Hz and its harmonics — 70, 140, 210 — sitting between the shaft harmonics at 25, 50, 75, 100. That separation is what makes the diagnosis possible, and it is also what sets your resolution requirement.
Choosing the FFT size
You need to resolve 70 Hz from the 75 Hz shaft harmonic, 5 Hz away. Frequency bin width is the sample rate divided by the FFT length, and the window duration is the FFT length divided by the sample rate:
sample rate 48,000 Hz N = 8,192 -> bin width 5.86 Hz -> window 170.7 ms N = 16,384 -> bin width 2.93 Hz -> window 341.3 ms N = 32,768 -> bin width 1.46 Hz -> window 682.7 ms
At N = 8,192 the bin width is 5.86 Hz and 70 Hz and 75 Hz fall in adjacent or identical bins depending on where the grid lands — the separation is not reliable. N = 16,384 gives 2.93 Hz, which resolves them with a bin to spare. The cost is a 341 ms window, over which the machine must run at a constant speed, because a speed change during the window smears every peak. On variable-speed equipment this is the binding constraint and the answer is order tracking: resampling the signal against a tachometer so the analysis is in revolutions rather than seconds.
Note that a longer window is not free in the other direction either. Averaging several shorter transforms (Welch’s method) reduces the variance of the estimate at fixed resolution, which is usually what you want for a stable baseline — a single 341 ms transform of a noisy signal is a noisy spectrum.
A worked baseline and deviation
The detection itself is not sophisticated and does not need to be. Collect spectra during known-good operation, take the mean and standard deviation of the energy in each band of interest, and score new spectra by how many standard deviations they sit above the baseline. The numbers below are labelled assumptions chosen to make the arithmetic legible; the arithmetic is the part to keep.
Baseline: 200 spectra collected over two weeks of normal running,
same load, same speed. Band energies in dB re 1 uPa^2/Hz.
band mean sd
25 Hz (1x) 71.0 1.2
70 Hz (BPFO) 62.0 1.5
140 Hz (2xBPFO) 57.0 1.8
175 Hz (blade) 68.0 1.1
Today's spectrum:
band value z = (value - mean) / sd
25 Hz 71.4 (71.4 - 71.0) / 1.2 = 0.33
70 Hz 68.0 (68.0 - 62.0) / 1.5 = 4.00
140 Hz 62.4 (62.4 - 57.0) / 1.8 = 3.00
175 Hz 68.2 (68.2 - 68.0) / 1.1 = 0.18
Broadband level: 74.9 dB vs baseline 74.6 dB, z = 0.25Two things in that table are the entire argument for band-wise scoring. The broadband level moved by 0.3 dB and would not trip any overall-level alarm — a 6 dB rise confined to one narrow band is invisible in a total that is dominated by the blade-pass tone. And the rise appears at BPFO and at its second harmonic together, which is the signature that distinguishes a defect from a stray resonance. A single-band excursion is a candidate; a harmonic series is evidence.
The z-scores are also why you should not convert this into a probability. Band energies are not Gaussian, they are correlated across bands, and z = 4 does not mean the 1-in-16,000 event that a normal distribution would imply. Use it as a ranking for a human, with a threshold set from the false-alarm rate you observe, not from a tail probability you assumed.
Why you end up unsupervised
The obvious next step is a classifier that recognises fault types. It almost never survives contact with a real plant, for a mundane reason: you do not have labelled failures. A well-maintained machine fails rarely, and when it does, nobody was recording the audio with the metadata you would need. You have thousands of hours of normal and perhaps three examples of the fault.
So the field converged on unsupervised anomalous sound detection: model normal only, score by how badly the model reconstructs or explains a new clip. An autoencoder trained on normal spectra will reconstruct normal well and abnormal poorly, and the reconstruction error is the anomaly score. This is a general pattern rather than an audio one; the wider treatment is in anomaly detection.
The DCASE challenge has run this as a formal task for several years, and its 2024 task description is worth reading for two things it makes explicit. First, the metric: AUC plus a partial AUC computed only over the false-positive-rate range [0, p] with p = 0.1, combined by harmonic mean. The partial AUC exists because a maintenance team will not tolerate a system that achieves good AUC by being right in a regime with a 40% false alarm rate. Second, domain shift: the task deliberately evaluates on target domains that differ in operating speed, load, viscosity, temperature and background noise, with as few as ten normal clips from the target domain.
What ruins it in the field
- Load and speed are confounders, not noise. A spectrum recorded at 80% load is genuinely different from one at 40%, and a model that has only seen one will flag the other. Record the operating state alongside the audio and either condition the baseline on it or restrict scoring to comparable states. Most deployments that “stopped working after a month” hit a seasonal load change.
- The microphone moved. Ten centimetres of position change alters the standing-wave pattern at the sensor and shifts every band. Any baseline is tied to a physical mounting; if the sensor is remounted, the baseline is void and must be recollected.
- Neighbouring machines. An airborne microphone hears the whole hall. A compressor cycling on a different line puts a tone in your spectrum that correlates with nothing about your machine. Contact accelerometers avoid this and lose the airborne information; many installations use both.
- The alarm nobody acts on. If the first month produces daily false positives, the system is ignored thereafter and no amount of later accuracy recovers it. Start with a threshold that is obviously too conservative, establish credibility, and lower it with evidence.