envelope_spectrum — ACOUSTICS bearing op

資料種類:signaltable

呼叫:import acoustics; acoustics.envelope_spectrum(x, rate, low, high, order=4, n_peaks=5)(或 opsacoustics.get("envelope_spectrum"))

用法

帶通 → 解調 → 變換。軸承缺陷真正顯現的地方。

> 以下的詳細說明為原文 —— 摘要與標題已翻譯。

The three steps are each already available (`dsp.bandpass`,

`dsp.envelope, numpy.fft`); what is not available anywhere in

:mod:dsp is the *composition*, and the composition is the diagnostic. The

raw spectrum of a defective bearing shows a resonance at some kHz and

nothing at the defect rate; the envelope of that resonance band, transformed,

shows the defect rate as a clean line.

`low / high` are the demodulation band in Hz and are required,

not optional. Choosing the band is the analysis; a default would hide the

one decision that has to be made. :func:spectral_kurtosis finds a

candidate band when there is no prior knowledge of the resonance.

The envelope's mean is removed before the transform (otherwise a large DC

line dominates every plot), amplitudes are single-sided (`2/N`), and DC is

excluded from peak picking.

Returns a dict: `freqs, magnitude, peak_freq, peak_amplitude`,

`peak_freqs / peak_amplitudes (the n_peaks` largest, descending),

`band, envelope_mean, resolution_hz`, plus two numbers that exist

because **this operator always returns a peak frequency, including when

there is nothing there**:

`peak_prominence`

the peak divided by the median of the magnitude spectrum.

`band_fraction`

the RMS of the band-passed signal divided by the RMS of the input — how

much of the record actually lives in the demodulation band.

Found by adversarial audit and not repaired by an exception, because there

is nothing invalid to refuse: a constant signal band-passed over

100-2000 Hz has an envelope made of rounding error, and this operator dutifully

reported `peak_freq = 8.0000 Hz`. Nothing raised, nothing was NaN, and

`8 Hz` is a perfectly plausible number to write down. Measured, the four

cases separate on the returned numbers rather than on any invented

threshold:

================ ======== ========= =========== =============

input peak Hz peak amp prominence band_fraction

================ ======== ========= =========== =============

AM, defect 107 107.0000 4.997e-01 10018.6 9.999e-01

impulse + noise 107.0000 1.968e-01 9384.7 9.201e-01

white noise 128.0000 2.785e-02 365.2 3.745e-01

constant signal 8.0000 1.691e-12 173.0 1.995e-12

================ ======== ========= =========== =============

No cut-off is imposed here: a defect that is genuinely 20 dB into the noise

is a real finding and refusing it would be worse than reporting it. The

numbers are returned so the caller can see the difference between row 1 and

row 4, which `peak_freq` alone does not show.

Measured on :func:synthesize_bearing_signal (25600 Hz, 1 s, 3 kHz carrier,

107 Hz defect, `m = 0.5) demodulated over 2000-4000 Hz: `peak_freq =

107.000000` Hz, peak_amplitude = 0.499677` — the modulation depth

itself, because the analytic envelope of that signal is exactly

`1 + 0.5 cos(2 pi 107 t)`. The ordinary spectrum of the same signal has a

one-sided amplitude of 4.291662e-16 at 107 Hz: the defect rate is not

present as a frequency component at all, which is the entire point of the

operator.

**That number needs a scaling step that used to be missing from this

sentence.** `dsp.spectrum returns the raw |rfft|`, not an amplitude —

the raw value in that bin is 5.493328e-12, and the one-sided amplitude

above is `mag * (2.0 / len(x)), here 2/25600 = 7.8125e-05`. This

operator and :func:order_spectrum apply that `2/N` *internally* and so

return amplitudes directly (carrier 3000 Hz: raw 12800, amplitude

1.000000; sidebands 2893 / 3107 Hz: raw 3200, amplitude 0.250000 = m/2).

The two conventions coexist in the library, so do not apply `2/N` twice

when comparing a `dsp` spectrum against one of these.

Raises `ValueError: everything :func:_as_signal and dsp.bandpass`

refuse (non-finite, complex, masked, non-1-D, a band edge outside

`(0, rate/2)`, a signal too short for zero-phase filtering), plus a

non-positive `n_peaks`.

詳細使用指南

acoustic_condition_monitoring 族使用指南

參考(範例資料・文獻)

• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。

• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。

• 演算法的正典(作者・年份)與用途見上面的族使用指南

可執行的範例(實際呼叫該運算子並已驗證的樣例)

acoustic_condition_monitoringpy -3.11 examples/acoustic_condition_monitoring.py

型別可銜接的下一個運算子(可接受 table 作為輸入)

istft

同類別(bearing)

bearing_defect_frequencies · spectral_kurtosis · cepstrum


*Provenance: acoustics.py — ACOUSTICS 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.