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 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
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:
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
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.
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.
| Parameter | Default | Notes |
|---|---|---|
YinFrameMs | 50 ms | Frame length; must cover at least two periods of the lowest expected F0 |
YinHopMs | 10 ms | Advance between frames — the time resolution of the track |
F0Min | 60 Hz | Lowest fundamental searched |
F0Max | 1600 Hz | Highest fundamental searched |
YinThreshold | 0.1 | Absolute threshold on d′; lower values are stricter and produce more unvoiced frames |
MedianWidth | 5 | Width of the median filter in frames; use an odd number |
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:
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.
| Machine | Dominant component | FundamentalOrder |
|---|---|---|
| Axial fan, blower | Blade passing | Number of blades |
| Electric motor (electromagnetic noise) | Twice the supply-related rotational order | Depends on pole pairs and winding — determine once from a reference run |
| Gear stage | Tooth meshing | Number of teeth on the shaft being tracked |
| Shaft imbalance, first order | Once per revolution | 1 (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.
| Parameter | Default | Notes |
|---|---|---|
FundamentalOrder | 1 | Order of the tracked component relative to shaft speed; values ≤ 0 are treated as 1 |
YinFrameMs | 50 ms | As above |
YinHopMs | 10 ms | As above; also the output point spacing |
F0Min | 10 Hz | Lower than in the pitch analysis, so that slow shafts are still covered |
F0Max | 1600 Hz | Highest fundamental searched |
YinThreshold | 0.1 | Absolute threshold on d′ |
MedianWidth | 5 | Median filter width in frames |
Time synchronous averaging (TSA) is the standard preprocessing step for gear diagnosis. The shaft angle is obtained by integrating the per-sample speed,
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.
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.
The indicators are built from three derived signals, obtained by selectively reconstructing orders from the TSA spectrum:
| Signal | Content | Purpose |
|---|---|---|
| Regular | Shaft orders 1 and 2 plus the mesh harmonics h · Z, h = 1…MeshHarmonics | The expected, healthy gear signature |
| Residual | TSA minus Regular — sidebands are retained | Sensitive to modulation caused by a local tooth defect |
| Difference | Residual with the sidebands h · Z ± s (s = 1…SidebandOrders) also removed | Isolated events that are neither mesh nor sideband |
With A(o) the amplitude of order o in the TSA spectrum and
kurt(·) the fourth central moment normalized by the squared variance:
| Indicator | Reacts to | Typical behaviour |
|---|---|---|
| FM0 | Major changes in the mesh pattern | Rises when the peak-to-peak value grows while the mesh amplitudes do not — heavy wear, tooth breakage |
| FM4 | Isolated defects on one or a few teeth | Near 3 for a healthy, noise-like difference signal; rises with localized damage |
| NA4* | Defects together with their modulation sidebands | More sensitive than FM4 in the early stage, because the sidebands are kept |
| ER | Overall energy not explained by the regular signature | Grows as damage spreads over several teeth |
| SBI | First-order modulation of the mesh | Direct 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.
| Parameter | Default | Notes |
|---|---|---|
TeethCount | required | Number of teeth Z of the gear on the tracked shaft; the analysis stops if it is below 2 |
SamplesPerRev | 512 | Angular resolution of the TSA waveform; must be at least 8 and should be well above 2 · the highest order of interest |
SidebandOrders | 1 | How many sideband orders on each side of a mesh harmonic are removed for the difference signal |
MeshHarmonics | 3 | Mesh harmonics included in the regular signal and in the FM0 denominator |
RpmChannel | auto | Tacho channel; the pulse-decoded speed is preferred when available |
© 2026 Deepsona. All Rights Reserved.