Rotating Machinery Features

Three analyses address the specific needs of rotating machinery: tracking the fundamental frequency of a periodic sound, recovering shaft speed when no tachometer was connected, and condensing a gearbox recording into the classical gear condition indicators.

They form a natural sequence. Fundamental Frequency (YIN) follows the pitch of the sound; RPM from Sound converts that pitch into a speed curve; Gear TSA Indicators uses a speed curve — measured or estimated — to average the signal synchronously with the shaft and extract FM0, FM4, NA4*, ER and SBI.

YIN Fundamental Frequency Tracking

The algorithm

YIN estimates the period of a frame by looking for the lag at which the signal best repeats itself. It starts from the squared difference function

d(τ) = Σi ( x[i] − x[i+τ] )²

which is small wherever the waveform repeats. Because d is also small at very short lags for trivial reasons, it is replaced by the cumulative mean normalized difference function, which removes that bias and makes a single absolute threshold usable:

d′(τ) = d(τ) · τ / Σj≤τ d(j)

The first lag at which d′ falls below YinThreshold is taken (following the valley down to its local minimum); if no lag satisfies the threshold, the global minimum in the allowed lag range is used, and if even that minimum stays high the frame is declared unvoiced and reported as empty. The chosen lag is then refined by parabolic interpolation between its two neighbours, and the fundamental frequency follows as

F0 = fs / τrefined

The lag search is limited to the range implied by F0Min and F0Max, and the integration length is half the frame, so a frame of YinFrameMs can resolve periods up to half its length.

Median smoothing

Frame-wise pitch estimates occasionally jump by an octave when a harmonic momentarily dominates. A median filter of width MedianWidth frames removes such isolated outliers without smearing genuine glides. Unvoiced frames are passed through as empty: if fewer than half of the frames inside the filter window are voiced, the output frame stays empty rather than borrowing a value from its neighbours.

The curve reports F0 in Hz over time; its single value is the median of all voiced frames, which is a robust summary of the dominant pitch of the recording.

Parameters

ParameterDefaultNotes
YinFrameMs50 msFrame length; must cover at least two periods of the lowest expected F0
YinHopMs10 msAdvance between frames — the time resolution of the track
F0Min60 HzLowest fundamental searched
F0Max1600 HzHighest fundamental searched
YinThreshold0.1Absolute threshold on d′; lower values are stricter and produce more unvoiced frames
MedianWidth5Width of the median filter in frames; use an odd number

RPM from Sound

From F0 to speed

Order analysis normally requires a tachometer or pulse channel. When none was recorded, the speed can often be recovered from the sound itself: a rotating machine radiates a strong component at a fixed multiple of the shaft frequency — the number of blades on a fan, the pole pair count of an electric motor, the number of teeth of a gear. Once that multiple is known, the speed follows directly from the tracked fundamental:

RPM(t) = 60 · F0(t) / FundamentalOrder

Internally the frame-wise F0 track is median-smoothed and linearly interpolated to a per-sample trajectory, so the resulting speed curve is continuous and can serve as the speed source for subsequent analyses. The displayed curve is decimated back to one point per hop; its single value is the mean speed over all valid points.

Choosing the fundamental order

MachineDominant componentFundamentalOrder
Axial fan, blowerBlade passingNumber of blades
Electric motor (electromagnetic noise)Twice the supply-related rotational orderDepends on pole pairs and winding — determine once from a reference run
Gear stageTooth meshingNumber of teeth on the shaft being tracked
Shaft imbalance, first orderOnce per revolution1 (default)

The safest way to fix this number is to record one run with a real tacho, compare the two speed curves and adjust FundamentalOrder until they coincide. From then on the estimate can be used on its own.

Parameters

ParameterDefaultNotes
FundamentalOrder1Order of the tracked component relative to shaft speed; values ≤ 0 are treated as 1
YinFrameMs50 msAs above
YinHopMs10 msAs above; also the output point spacing
F0Min10 HzLower than in the pitch analysis, so that slow shafts are still covered
F0Max1600 HzHighest fundamental searched
YinThreshold0.1Absolute threshold on d′
MedianWidth5Median filter width in frames
An estimated speed is only as good as the assumption behind it. If the tracked component disappears (load change, coasting through a resonance, another source becoming louder), the estimate follows the wrong component and the speed curve jumps — usually by an exact integer factor. Always check the curve for such jumps before using it as a speed source.

Gear TSA Indicators

Time synchronous averaging

Time synchronous averaging (TSA) is the standard preprocessing step for gear diagnosis. The shaft angle is obtained by integrating the per-sample speed,

θ(i+1) = θ(i) + RPM(i) / 60 / fs   [revolutions]

the signal is resampled at SamplesPerRev equally spaced angular positions by linear interpolation, and all complete revolutions are averaged. Everything synchronous with the shaft adds coherently; everything else — other shafts, noise, non-synchronous resonances — decays with the square root of the number of revolutions.

Revolutions are stacked on the angle axis and averaged rev 1 rev 2 rev R 0° … 360° (SamplesPerRev points each) average local anomaly stays visible TSA waveform, 0° … 360° non-synchronous content decays as 1/√R

Because the averaged waveform is exactly one revolution long, spectral line k of its Fourier transform is order k — the meshing component of a gear with Z teeth sits exactly at line Z.

Regular, Residual and Difference signals

The indicators are built from three derived signals, obtained by selectively reconstructing orders from the TSA spectrum:

SignalContentPurpose
RegularShaft orders 1 and 2 plus the mesh harmonics h · Z, h = 1…MeshHarmonicsThe expected, healthy gear signature
ResidualTSA minus Regular — sidebands are retainedSensitive to modulation caused by a local tooth defect
DifferenceResidual with the sidebands h · Z ± s (s = 1…SidebandOrders) also removedIsolated events that are neither mesh nor sideband

FM0, FM4, NA4*, ER and SBI

With A(o) the amplitude of order o in the TSA spectrum and kurt(·) the fourth central moment normalized by the squared variance:

FM0 = peak-to-peak(TSA) / Σh A(h · Z)
FM4 = kurt( Difference )    NA4* = kurt( Residual )
ER = RMS( Difference ) / RMS( Regular )
SBI = ( A(Z−1) + A(Z+1) ) / 2
IndicatorReacts toTypical behaviour
FM0Major changes in the mesh patternRises when the peak-to-peak value grows while the mesh amplitudes do not — heavy wear, tooth breakage
FM4Isolated defects on one or a few teethNear 3 for a healthy, noise-like difference signal; rises with localized damage
NA4*Defects together with their modulation sidebandsMore sensitive than FM4 in the early stage, because the sidebands are kept
EROverall energy not explained by the regular signatureGrows as damage spreads over several teeth
SBIFirst-order modulation of the meshDirect measure of the sideband level next to the meshing order

The analysis outputs the TSA waveform over 0…360°, annotated with all five indicators and with the number of revolutions averaged, plus a second curve carrying the five indicators in the order FM0, FM4, NA4*, ER, SBI.

The indicators are computed from a single recording. NA4* is therefore the kurtosis of the residual signal of this record; the running-variance normalization used in some published formulations requires a history of earlier records and is not applied here.

Parameters

ParameterDefaultNotes
TeethCountrequiredNumber of teeth Z of the gear on the tracked shaft; the analysis stops if it is below 2
SamplesPerRev512Angular resolution of the TSA waveform; must be at least 8 and should be well above 2 · the highest order of interest
SidebandOrders1How many sideband orders on each side of a mesh harmonic are removed for the difference signal
MeshHarmonics3Mesh harmonics included in the regular signal and in the FM0 denominator
RpmChannelautoTacho channel; the pulse-decoded speed is preferred when available

Applications

The gear indicators follow the classical published definitions of FM0, FM4, NA4 and the energy ratio, and the pitch tracker follows the published YIN algorithm with the difference function, cumulative mean normalization, absolute threshold and parabolic interpolation.

© 2026 Deepsona. All Rights Reserved.