Manufacturing and Predictive Maintenance
Vibration analysis for rotating machines
A spinning machine vibrates at its own rotation speed, and specific faults add their own distinct extra vibration on top, which frequency analysis can pick out directly.
- 10 min read
- 3 reading levels
- Published
Read these first
On this page 5
One lesson, three depths. Pick the one that fits you today — you can switch any time.
Beginner — No maths. Plain English.
A spinning machine vibrates at its own rotation speed, and different faults add their own distinct extra shake on top of that. That extra shake can be picked apart and identified.
Think about a ceiling fan that has come slightly loose or unbalanced. It does not make random noise. It wobbles once per rotation, in a steady, repeating way you can almost predict. A little shake, a little shake, a little shake, once every turn. An experienced technician can often tell, from that pattern alone, roughly what is wrong: a bent blade, a loose mount, a worn bearing each shake differently.
Vibration analysis is that same skill, done with a sensor and mathematics instead of a trained ear.
Why it exists
Every rotating machine — a motor, a pump, a fan, a compressor — vibrates a small amount even when perfectly healthy, at exactly its rotation speed. Engineers call this the 1x frequency: once per revolution. A motor spinning at 1,800 rotations per minute vibrates, in a healthy state, mildly at 30 times a second.
Specific faults add extra vibration at specific, predictable frequencies on top of that healthy baseline. An unbalanced rotor — like a ceiling fan with a bit of mud stuck to one blade — is easy to spot. It creates a strong, clean vibration right at that same 1x frequency, only much larger than normal. A misaligned shaft tends to show up at twice that frequency. A damaged bearing shows up at its own characteristic frequency, calculated from the bearing's physical geometry.
This matters. It turns "the machine feels a bit off" into something specific. It becomes "the vibration at exactly 30 Hz has grown 200 times larger than normal." That is imbalance, and this is roughly how bad it is.
How it works
Raw vibration signal over time: looks like a noisy, wobbly line -- hard to read directly
|
v
[ break the signal into its frequency content ]
|
v
Healthy motor: no single dominant frequency, only background noise
Faulty motor: one huge spike, exactly at the rotation frequency
-> a strong signature of imbalanceThis frequency-breakdown step is called a Fourier transform. It is a mathematical way of asking "how much of this signal's shakiness happens at each possible frequency?" It turns a messy wiggling line into a clear list of which frequencies are unusually strong.
Where you have already seen it
- A washing machine on spin cycle that suddenly starts thumping loudly. The clothes bunched up on one side create an imbalance, vibrating hard at the drum's rotation speed — you can often feel it through the floor.
- A car's steering wheel shaking at a specific speed. Mechanics use this to diagnose an unbalanced wheel, since the shake appears at a frequency tied directly to how fast the wheel is spinning.
- A ceiling fan on its highest setting wobbling more than on its lowest setting — because the imbalance vibration scales with rotation speed.
Remember this
- A healthy spinning machine still vibrates a little, steadily, at its own rotation speed.
- Specific mechanical faults add extra vibration at specific, predictable frequencies on top of that baseline.
- Breaking a vibration signal into its frequency content turns a vague "something feels wrong" into a specific, checkable diagnosis.
What to learn next
- Visual defect inspection — a different sensor type, catching a different class of manufacturing problem.
- Predictive maintenance — where a vibration signature like this one fits into a wider early-warning system.
- What is computer vision? — not directly related, but a useful comparison for how differently two sensor types can be analysed.
Developer — Code and libraries.
Setup
pip install numpyMinimal runnable code
We simulate two seconds of vibration data from a motor spinning at 1,800 RPM — once healthy, once with a classic imbalance fault — and use a Fourier transform to tell them apart.
import numpy as np
rng = np.random.default_rng(19)
# A motor spinning at 1800 RPM turns 30 times a second -- its "1x" frequency.
rpm = 1800
rotation_hz = rpm / 60
sample_rate = 1000 # samples per second
duration = 2 # seconds
t = np.arange(0, duration, 1 / sample_rate)
# A healthy motor: mostly random mechanical noise, no strong single tone.
healthy_vibration = rng.normal(0, 0.05, len(t))
# An unbalanced motor: the same noise, PLUS a strong, clean vibration at
# exactly its rotation frequency -- the classic signature of imbalance.
faulty_vibration = healthy_vibration + 0.6 * np.sin(2 * np.pi * rotation_hz * t)
def top_frequencies(signal, sample_rate, n=3):
spectrum = np.abs(np.fft.rfft(signal))
freqs = np.fft.rfftfreq(len(signal), d=1 / sample_rate)
top_idx = np.argsort(spectrum)[::-1][:n]
return list(zip(freqs[top_idx].round(1), spectrum[top_idx].round(1)))
print(f"machine rotation frequency (1x): {rotation_hz:.1f} Hz")
print()
print("healthy motor -- strongest frequencies (Hz, amplitude):")
print(top_frequencies(healthy_vibration, sample_rate))
print()
print("faulty motor -- strongest frequencies (Hz, amplitude):")
print(top_frequencies(faulty_vibration, sample_rate))
print()
def amplitude_at(signal, sample_rate, target_hz):
spectrum = np.abs(np.fft.rfft(signal))
freqs = np.fft.rfftfreq(len(signal), d=1 / sample_rate)
idx = np.argmin(np.abs(freqs - target_hz))
return spectrum[idx]
healthy_1x = amplitude_at(healthy_vibration, sample_rate, rotation_hz)
faulty_1x = amplitude_at(faulty_vibration, sample_rate, rotation_hz)
print(f"amplitude at 1x rotation frequency -- healthy: {healthy_1x:.1f}, faulty: {faulty_1x:.1f}")
print(f"faulty motor's 1x amplitude is {faulty_1x / healthy_1x:.0f}x higher -- classic imbalance signature")machine rotation frequency (1x): 30.0 Hz healthy motor -- strongest frequencies (Hz, amplitude): [(203.5, 5.5), (355.0, 5.4), (198.5, 5.3)] faulty motor -- strongest frequencies (Hz, amplitude): [(30.0, 597.9), (203.5, 5.5), (355.0, 5.4)] amplitude at 1x rotation frequency -- healthy: 2.8, faulty: 597.9 faulty motor's 1x amplitude is 214x higher -- classic imbalance signature
What actually happened
np.fft.rfft computes the Fast Fourier Transform, decomposing the time-based vibration signal into how much of each frequency it contains. np.fft.rfftfreq labels each output value with its actual frequency in Hz, using the sample rate to work out the scale.
The healthy motor's top frequencies are scattered and unremarkable — random noise does not concentrate at any one frequency, so its strongest peaks are wherever the randomness happened to land. The faulty motor's top frequency is a completely different story: 30.0 Hz, exactly the rotation frequency, with an amplitude over 200 times larger than the healthy motor shows at that same frequency. That sharp, isolated spike at 1x is the textbook signature engineers look for to diagnose rotor imbalance.
Common mistakes
Sampling too slowly for the frequencies you care about. The Nyquist theorem requires a sample rate at least twice the highest frequency you want to detect. A bearing fault frequency at 400 Hz needs a sample rate well above 800 Hz — the 1000 Hz used here would already be too slow for some real bearing faults.
Reading the raw time-domain signal directly instead of its frequency content. The raw wiggly line in this example looks similarly messy whether healthy or faulty. The fault only becomes obvious once it is broken down by frequency.
Ignoring that different faults live at different frequencies. This example only demonstrates imbalance at 1x. Misalignment, looseness and bearing wear each have characteristic frequencies of their own, calculated from the machine's specific rotation speed and, for bearings, its physical geometry — a single 1x check does not catch every fault type.
Trusting a single snapshot instead of tracking the trend. A one-time vibration reading tells you the current state. Tracking the amplitude at the fault frequency over weeks or months, as in Remaining useful life, tells you whether a developing problem is getting worse.
Try it yourself
Add a second, smaller sine wave at exactly 2 * rotation_hz to faulty_vibration, simulating a misalignment fault appearing alongside the imbalance. Re-run and check that top_frequencies now shows two distinct suspicious peaks instead of one.
What to learn next
Researcher — Mathematics and papers.
The Fourier transform, formally
For a discrete signal x[n] of length N, sampled at rate f_s, the discrete Fourier transform is:
X[k] = SUM_{n=0}^{N-1} x[n] * exp(-2*pi*i*k*n/N), k = 0, ..., N-1x[n]— then-th time-domain sampleX[k]— the complex-valued spectral coefficient at frequency bink- The frequency represented by bin
kisk * f_s / NHz
The Fast Fourier Transform (Cooley and Tukey, 1965, An Algorithm for the Machine Calculation of Complex Fourier Series) computes this in O(N log N) rather than the naive O(N^2), which is what makes real-time frequency analysis of high-rate vibration sensors (often sampled at tens of kHz) computationally practical.
Characteristic fault frequencies
Rolling-element bearing faults produce vibration at frequencies calculated directly from bearing geometry, not only the shaft speed:
BPFO = (n/2) * f_r * (1 - (d/D) * cos(theta)) Ball Pass Frequency, Outer race
BPFI = (n/2) * f_r * (1 + (d/D) * cos(theta)) Ball Pass Frequency, Inner racen— number of rolling elementsf_r— shaft rotation frequencyd— ball/roller diameter,D— pitch diametertheta— contact angle
These formulas, standard in the condition-monitoring literature (Randall and Antoni, 2011, Rolling Element Bearing Diagnostics: A Tutorial, Mechanical Systems and Signal Processing), mean a specific bearing's fault frequencies can be computed in advance from its datasheet, before any fault ever occurs — turning "is there a bearing fault" into "is there an unusually strong peak at this exact, precomputed frequency."
Beyond the plain FFT: envelope analysis and time-frequency methods
Bearing fault energy is often not a clean sinusoid at the fault frequency itself, but an amplitude-modulated high-frequency impact response — the fault frequency shows up as sidebands around a resonance, not as a clean spike. Envelope analysis (demodulating the high-frequency signal with a Hilbert transform before taking the FFT of the envelope) is the standard technique for making this pattern visible, and is considered essential rather than optional for reliable bearing diagnostics in practice.
Where a fault's frequency signature changes over time — as is common during run-up, run-down, or a developing fault that shifts frequency as damage grows — a plain FFT averages away that time variation. Short-time Fourier transform (STFT) and wavelet transforms trade some frequency resolution for time resolution, producing a spectrogram that shows how the frequency content evolves, which a single FFT over a long window cannot.
From signal processing to learned features
Modern condition-monitoring systems increasingly feed the raw or lightly processed vibration spectrum directly into a 1D convolutional neural network or a gradient-boosted model trained on engineered spectral features (peak amplitude at known fault frequencies, spectral kurtosis, envelope spectrum energy), rather than relying on a human-specified threshold at one frequency. This does not remove the physics — the input features are still built from the same Fourier and envelope-analysis machinery — but it lets the model learn fault signatures that a hand-picked frequency list might miss, at the cost of the direct physical interpretability a classical spectrum plot offers an experienced vibration engineer.
Key references
- Cooley, J. & Tukey, J. (1965). An Algorithm for the Machine Calculation of Complex Fourier Series. Mathematics of Computation 19(90).
- Randall, R. B. & Antoni, J. (2011). Rolling Element Bearing Diagnostics: A Tutorial. Mechanical Systems and Signal Processing 25(2).